> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trelent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke tokens

> Invalidate tokens before their natural expiration.

Revoke a token by its ID to immediately invalidate it. Requires `token:revoke` or `token:*` permission. Once revoked, the token can no longer be used for authentication.

## Request parameters

<ParamField body="token_id" type="uuid" required>
  The unique identifier (JTI) of the token to revoke.
</ParamField>

## Revoke a token

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
    // TODO: Add TypeScript SDK example for revoking tokens
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    # TODO: Add Python SDK example for revoking tokens
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "${API_URL}/v1/token/revoke" \
      -H "Authorization: Bearer ${API_TOKEN}" \
      -H "Content-Type: application/json" \
      -d '{
        "token_id": "550e8400-e29b-41d4-a716-446655440000"
      }'
    ```
  </Tab>
</Tabs>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "message": "Token revoked successfully"
  }
  ```
</ResponseExample>

## Error responses

| Status | Description                       |
| ------ | --------------------------------- |
| 403    | Missing `token:revoke` permission |
| 404    | Token not found                   |
| 400    | Token already revoked             |

<Info>
  Revoking an already-revoked token returns a 400 error. Use the [list endpoint](/data-ingestion/tokens/list) with `include_invalid=true` to check token status before revoking.
</Info>
