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

Documentation Index

Fetch the complete documentation index at: https://docs.causeflow.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Revokes an API key, immediately invalidating it. Any system currently using this key will begin receiving 401 Unauthorized errors. Required role: admin
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 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>"