REST API: access tokens
Delete a permanent API token
Revoke a token you no longer use.
Purpose
Use this call to revoke a token, for example after a leak or when an integration is retired. Create the replacement first, switch your servers to it, then delete the old one.
Request
POST <API_BASE_URL>/token/delete. All calls are POST under your API address. Replace <API_BASE_URL> with the API address provided with your access.
Send a permanent API token in the token field of the body, or a user token in the token header. See authentication.
Content type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
token | string (uuid) | if no header | Your current permanent API token. Required unless you send a user token in the token header. |
token_id | string (uuid) | yes | The token to delete. |
Response
HTTP 200. The token no longer authenticates.
| Field | Type | Description |
|---|---|---|
status | string | Always ok on this body. |
Errors
400: The body failed validation. The answer hasstatusoferrorand adetailslist with one entry per offending field (path,expected,actual).401: The token is missing, expired or unknown.
A refusal can also come before the operation runs: an address outside your IP allowlist, a token bound to another address, or a body that is not valid JSON. See response format and errors.
Example
Request:
curl -X POST "<API_BASE_URL>/token/delete" \
-H "Content-Type: application/json" \
-d '{
"token": "<your permanent API token>",
"token_id": "<token id to delete>"
}'
Response:
{
"status": "ok"
}