Revoke API Key
API Keys
Revoke API Key
Soft-revoke an API key (sets revoked_at, preserves the row for audit)
DELETE
Revoke API Key
Overview
Revokes an API key by setting itsrevoked_at timestamp. The key record is preserved so audit logs and historical usage records remain valid. Once revoked, requests using the key return 401 unauthorized immediately.
System keys cannot be revoked. Requires the api-keys:manage scope and an Idempotency-Key header; see Idempotency.
Path Parameters
API key ID (
key_...).Response
Echo of the revoked API key ID.
Always
api_key.Always
true on success.Unique request identifier for support and debugging.
Code Examples
Revocation is irreversible. To roll a key without downtime, use Rotate API Key: the old key remains valid for a 24-hour grace period.
Errors
Related Endpoints
- Rotate API Key, graceful key rotation
- List API Keys