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

# api-keys delete

> Delete a Public API key by id.

Delete an API key you own. Once deleted, the key stops authenticating the Public API immediately and cannot be recovered. Find the id with [`clay api-keys list`](/cli/reference/api-keys-list).

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay api-keys delete <apiKeyId>
```

## Arguments

| Argument   | Description                                                 |
| ---------- | ----------------------------------------------------------- |
| `apiKeyId` | API key id, e.g. the `id` returned by `clay api-keys list`. |

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "ok": true }
```

| Field | Type | Description               |
| ----- | ---- | ------------------------- |
| `ok`  | true | Always `true` on success. |

## Errors

| Code             | Exit | Notes                                          |
| ---------------- | ---- | ---------------------------------------------- |
| `not_found`      | 6    | No API key with that id found.                 |
| `auth_forbidden` | 3    | You do not have permission to manage API keys. |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay api-keys delete ak_abc123
clay api-keys list | jq -r '.data[0].id' | xargs clay api-keys delete
```
