Revoke API Key
API Keys
Revoke API Key
Revoke an API key. The key is soft-deleted and cannot authenticate further requests.
DELETE
Revoke API Key
Request
Revocation is a soft delete: the key row is preserved in theapi_keys table with revoked_at populated, so audit trails and last-used timestamps remain queryable. All requests using the key after revocation fail with 401 invalid_key. There is no “unrevoke” - create a new key if needed.
Path Parameters
API key UUID.
Headers
Optional UUID. Repeated revokes with the same key return the same result without erroring.
Response
On success returns HTTP204 No Content. The response still carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID for observability.
Example Response
Errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing admin:api_keys permission, or the calling key is the last active admin key |
| 404 | not_found | API key not found |
| 429 | rate_limited | Rate limit exceeded |