Syntext DOCS
Get Started
API Revoke API Key
DELETE/v1/projects/{projectId}/api-keys/{keyId}

Revoke API Key

Permanently revokes a key. Requests using it fail with 401 immediately. Revocation cannot be undone — create a new key if needed.

Path Parameters

The project ID.

The ID of the key to revoke.

Example

curl -X DELETE https://api.syntext.dev/v1/projects/prj_abc123/api-keys/key_789 \
-H "Authorization: Bearer stx_abc12345_..."
await client.apiKeys.revoke('prj_abc123', 'key_789')

Response

{
  "data": { "id": "key_789", "revoked": true }
}

404 Not Found

Returned if the key doesn't exist or was already revoked.

Assistant
Responses are generated using AI and may contain mistakes.

Ask me anything about the documentation.

ESC