---
search:
  tags:
    - tokens
    - POST
seo:
  description: >-
    Create token prune. Reference for the POST
    /workspaces/{organizationId}/tokens/prune endpoint in the Pile API.
sidebar:
  label: Create token prune
  badge: POST
title: Create token prune
type: openapi-operation
---
`POST /workspaces/{organizationId}/tokens/prune`

**Request body** (`application/json`)

- `maxAgeHours` (number)

Request body example:

```json
{
  "maxAgeHours": 24
}
```

**Responses**

- `200` — Stale ephemeral agent keys pruned

Response example, 200:

```json
{
  "pruned": 0
}
```
