Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create token prune

POST/workspaces/{organizationId}/tokens/prune
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Request body
application/json
maxAgeHoursnumber
min 0 · max 8760 · default: 24
Responses
200

Stale ephemeral agent keys pruned

prunednumberrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/tokens/prune' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "maxAgeHours": 24
}'
Response
{
  "pruned": 0
}

Was this page helpful?