# Revoke an API key ```http DELETE https://api.onehazel.com/api-keys ``` The last active key cannot be revoked. Section: [API keys](./) Operation id: `revokeApiKeyStandalone` ## Authentication Operator API key (`oh_live_...`) or a signed-in session token, as a bearer token. ## Parameters | Name | In | Required | Description | |---|---|---|---| | `id` | query | yes | The API key id. | | `hard` | query | no | Delete instead of revoke. | ## Responses `200` `{ "success": true, "data": ... }` Errors return `{ "success": false, "error": { "code": "...", "message": "..." } }` with a 4xx or 5xx status. ## Example ```bash curl -X DELETE "https://api.onehazel.com/api-keys" \ -H "Authorization: Bearer oh_live_YOUR_API_KEY" ``` Machine-readable: [openapi.yaml](/openapi.yaml), [openapi.json](/openapi.json).