Revoke one of your API keys
/keys /{keyId}Revokes a key at once: its very next request is refused 401 key_revoked. A request
already in progress when you revoke finishes. Revoking a key that is already revoked
succeeds again and keeps the original revocation time. A key that is not one of yours
answers 404 key_not_found, exactly as a key that does not exist.
Revoking does not require a recent sign-in, so a leaked key can always be shut off at once.
Only a dashboard session may call this; an API key is refused 403 session_required. No
query parameters are accepted.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 429
Revoked. Sent with Cache-Control: private, no-store.
invalid_key_id: the key id is blank or longer than 64 characters. invalid_request: a query parameter was sent.
unauthorized: no credential was sent at all (breaking change: this used to beinvalid_api_key), or a dashboard session failed verification: the access token is missing, malformed or expired, or the identity token is missing or belongs to a different login.invalid_api_key:X-API-Keyis malformed, unknown, or belongs to a different Treasures API.key_revoked: this key has been revoked; mint a new one or ask Treasures.
session_required: an API key cannot manage keys; call this from a signed-in dashboard session. manager_suspended, manager_not_linked, organization_suspended and permission_denied as on every route.
key_not_found: not one of your keys.
More than 60 requests in the last minute across every key you hold, or more than 120 across your dashboard sessions; each kind has its own budget. The Retry-After header carries the seconds to wait.
Response Headers
Seconds to wait before retrying.