Skip to main content
DELETE
/
v1
/
api-keys
/
{keyId}
Revoke API key
curl --request DELETE \
  --url https://api.example.com/v1/api-keys/{keyId}

Overview

Revokes an API key, immediately invalidating it. Any system currently using this key will begin receiving 401 Unauthorized errors. Required role: admin or owner
Revoking a key is immediate. Any webhooks or integrations using this key will start receiving 401 errors right away. Update your monitoring tool configuration before revoking to avoid gaps in alert delivery.

Path parameters

keyId
string
required
The unique identifier of the API key to revoke. Example: key_01HX9VTPQR3KF8MZWBYD5N6JCE.

Response

Returns 204 No Content on success. No response body is returned.

Error responses

StatusError codeDescription
403forbiddenThe authenticated user does not have admin or owner role
404not_foundNo API key exists with the provided keyId for this tenant
409conflictThe API key has already been revoked

Examples

curl https://api.causeflow.ai/v1/api-keys/key_01HX9VTPQR3KF8MZWBYD5N6JCE \
  -X DELETE \
  -H "Authorization: Bearer <token>"