Revoke an API key or disconnect an application.
POST/api/v1/api-keys/{api_key_id}/revokeapi_keys:revoke
A caller revokes the keys they created; Revoke Other Users Api Tokens allows revoking any key of the company. A revoked key stops working at once. Revoking the key this request authenticated with ends this session's access.
| Scope | api_keys:revoke (sensitive) |
| Asynchronous | No |
| MCP tool | revoke_api_key |
| Portal permissions | revoke_api_tokens |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
api_key_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json APIKeyRevocation |
400 | invalid_version | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | idempotency_in_progress | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
APIKeyRevocation
| Field | Type | Required | Description |
|---|---|---|---|
already_revoked | boolean | Required | |
api_key_id | string | Required | |
is_current_grant | boolean | Required | True when the revoked key is the one this request authenticated with. |
name | string or null | Required | |
revoked | boolean | Required | True when this call revoked the key; false when it was already revoked. |
revoked_at | string (date-time) or null | Required | |
was_connected_application | boolean | Required | True for a connected application (an MCP grant), false for an API key. |