# Revoke API key

Revokes the key immediately; calls with it fail from then on. Requires developer:manage and a passkey step-up. Revoking an already revoked key returns it unchanged.

`POST /v1/api-keys/{key_id}/revoke`

Revokes the key immediately; calls with it fail from then on. Requires developer:manage and a passkey step-up. Revoking an already revoked key returns it unchanged.

Requires permission `developer:manage`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `key_id` | path | yes | API key id (key_...). |

## Responses

- **200**: Success.
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **403**: Authenticated but not allowed: missing permission, passkey step-up required, or denied by policy.
- **404**: The resource does not exist or belongs to another organization.

Example 200 response:

```json
{
  "api_key": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "name": "Example",
    "prefix": "string",
    "scopes": [
      "string"
    ],
    "status": "active",
    "created_by": "string",
    "created_by_name": "string",
    "last_used_at": "2026-11-16T12:00:00Z",
    "expires_at": "2026-11-16T12:00:00Z",
    "revoked_at": "2026-11-16T12:00:00Z",
    "created_at": "2026-11-16T12:00:00Z"
  }
}
```
