Skip to main content

Delete an API Key

DELETE/v1/api-keys/{keyId}Try it
View request and response examples ↓

Soft-deletes an API Key in the organization of the authenticated API Key. Requires an API Key with the OrganizationAdmin role and a RequestId header.

A missing API Key, an API Key that was already deleted, or an API Key owned by another organization returns 404 APIKeyNotFound.

Authorization

X-API-Keystring · headerrequired

API key for /v1 requests.

Path parameters

keyIdstringrequired

API Key ID. API Key IDs returned by this API use the key_ prefix.

Pattern^(sk-[A-Za-z0-9_-]{32}|key_[A-Z0-9]{16})$
Examplekey_0123456789ABCDEF

Headers

RequestIdstringrequired

Idempotency key for write requests.

Use a globally unique UUID or similar token for each logical write request. Never reuse a RequestId across different operations or payloads. You can safely retry the same RequestId only when the method, path, path parameters, query string, and request body are identical.

Minimum length1
Example8f6b0c2e-6a9a-4f2e-9c4c-0a1f9a2b7d31

Response

API Key deleted successfully.

application/json
successbooleanrequired

Indicates whether the request succeeded.

Exampletrue
requestIdstringrequired

Request ID returned by the server for tracing.

Examplereq-20260402-001
dataobjectrequired

Empty success payload.

Additional propertiesnone

Enter to send · Shift+Enter for a new line