> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent-drop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke API Key: Permanently Disable a Bearer Token

> Permanently revoke an AgentDrop API key by its prefix; immediately invalidates further requests using that token. Other keys on the account stay active.

Permanently revoke an API key. The key stops working immediately. This action cannot be undone.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Must be a different key than the one being revoked.
</ParamField>

### Path Parameters

<ParamField path="keyId" type="string" required>
  The ID of the key to revoke. Example: `key_xyz789`
</ParamField>

## Response

```json theme={null}
{
  "id": "key_xyz789",
  "revoked": true,
  "revoked_at": "2026-03-22T14:30:00Z"
}
```

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X DELETE https://api.agent-drop.com/v1/api-keys/key_xyz789 \
    -H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
  ```

  ```python Python theme={null}
  response = requests.delete(
      "https://api.agent-drop.com/v1/api-keys/key_xyz789",
      headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
  )

  print(response.json()["revoked"])  # True
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.agent-drop.com/v1/api-keys/key_xyz789",
    {
      method: "DELETE",
      headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
    }
  );

  const result = await response.json();
  console.log(result.revoked); // true
  ```
</CodeGroup>

<Warning>
  You cannot revoke the key you're currently authenticating with. Use a different key to revoke the target key.
</Warning>

## Errors

| Status | Code           | Description                                         |
| ------ | -------------- | --------------------------------------------------- |
| `401`  | `UNAUTHORIZED` | Invalid or missing API key                          |
| `404`  | `NOT_FOUND`    | Key ID does not exist                               |
| `409`  | `SELF_REVOKE`  | Cannot revoke the key being used for authentication |
