> ## 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 list

> List the Public API keys you own as JSON.

List the Clay API keys you own, with their names, scopes, and timestamps. Use this to find the id of a key before renaming it with [`clay api-keys update`](/cli/reference/api-keys-update) or removing it with [`clay api-keys delete`](/cli/reference/api-keys-delete).

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay api-keys list [--limit <n>] [--cursor <token>]
```

Results are paginated. `--limit` sets the page size, and the response includes a top-level `cursor` when more keys are available; pass it back with `--cursor` to fetch the next page.

## Flags

| Flag               | Description                                                        |
| ------------------ | ------------------------------------------------------------------ |
| `--limit <n>`      | Maximum API keys to return per page. Defaults to 50.               |
| `--cursor <token>` | Resume from a previous response's `cursor` to fetch the next page. |

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "data": [
    {
      "id": "ak_abc123",
      "name": "CI key",
      "scopes": ["cli:all"],
      "workspaceId": 12345,
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  ],
  "cursor": "next_page_token"
}
```

| Field                | Type                | Description                                                                                  |
| -------------------- | ------------------- | -------------------------------------------------------------------------------------------- |
| `data[].id`          | string              | API key id. Pass it to `update` or `delete`.                                                 |
| `data[].name`        | string              | Human-readable name for the key.                                                             |
| `data[].scopes`      | string\[]           | Scopes granted to the key.                                                                   |
| `data[].workspaceId` | number \| undefined | Workspace the key is scoped to, when set.                                                    |
| `data[].createdAt`   | string              | ISO 8601 creation timestamp.                                                                 |
| `data[].updatedAt`   | string              | ISO 8601 last-updated timestamp.                                                             |
| `cursor`             | string              | Present when more keys are available. Pass it back via `--cursor`. Omitted on the last page. |

The secret itself is never returned here — it is shown only once, at creation. See [`clay api-keys create`](/cli/reference/api-keys-create).

## Errors

| Code               | Exit | Notes                                               |
| ------------------ | ---- | --------------------------------------------------- |
| `validation_error` | 2    | `--limit` is not a positive integer or exceeds 100. |
| `auth_forbidden`   | 3    | The key lacks permission to read API keys.          |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay api-keys list
clay api-keys list --limit 10 | jq -r '.data[].id'
clay api-keys list | jq -r '.data[] | "\(.id)\t\(.name)"'
```
