Syntext DOCS
Docs Agent Get Started
API Revoke API Key

Revoke API Key

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

DELETE/v1/projects/{projectId}/api-keys/{keyId}

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.

Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.

Ask me anything about the documentation.

ESC