Revoke the current API key
Revokes the API key that you send with this request. Use it when a key leaks (for example in a git commit, a log, or a chat message), or when a script or integration no longer needs its key.
The key stops working at once. The next request with it returns 403. You cannot undo this: create a new key in the dashboard under Settings → API.
Every API key can call this endpoint, on every plan. This includes docs-only CI keys. The audit log records the revocation (action api_key.deleted, actor: the revoked key).
A repeated call with the same key returns 403, because the key is no longer valid.
Response
{
"id": "507f1f77bcf86cd799439011",
"object": "api_key",
"deleted": true
}Authentication
Use an organization API key. OAuth access tokens (MCP connectors) cannot call this endpoint: revoke them with POST /oauth/revoke (RFC 7009), or disconnect the client in the dashboard.
Version Availability
This endpoint is available in every API version.
Still need help? Ask the team