# List the org's API keys

`GET /o/{org}/api-keys`

The caller's live keys in the org, without their secrets, with the runs each started in the last seven days (`stats`), and the MCP clients they connected through OAuth (`kind` `oauth`) whose refresh token has not lapsed. Any member, signed in; an API key cannot call this.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org` | path | string | yes | The org's slug or id. A caller with no role in the org gets `404`. |

## Example request

```bash
curl "https://api.phoenix.so/o/$RUSH_ORG/api-keys" \
  -H "Authorization: Bearer $RUSH_TOKEN"
```

```typescript
const org = process.env.RUSH_ORG;

const res = await fetch(`https://api.phoenix.so/o/${org}/api-keys`, {
  headers: {
    Authorization: `Bearer ${process.env.RUSH_TOKEN}`,
  },
});

console.log(res.status, await res.json());
```

```python
import os

import requests

org = os.environ["RUSH_ORG"]

res = requests.get(
    f"https://api.phoenix.so/o/{org}/api-keys",
    headers={"Authorization": f"Bearer {os.environ['RUSH_TOKEN']}"},
)

print(res.status_code, res.json())
```

## Responses

### 200

The keys.

- `data` (array of ApiKey, required)
  - `id` (string, required): `key_…`; use it in the key routes.
  - `kind` (string, optional, one of `key`, `oauth`): `key` is minted here; `oauth` is an MCP client a person connected by signing in. An `oauth` grant reaches only the MCP server, cannot be rotated and has no webhook; its `expires_at` is when it ends unless the client refreshes it.
  - `name` (string, required)
  - `prefix` (string, required): The secret's first characters, to tell keys apart.
  - `scopes` (array of string, required)
  - `max_concurrent` (integer, required)
  - `webhook_url` (string | null, required)
  - `expires_at` (string | null, required)
  - `created_by` (object, required)
    - `id` (string, required)
    - `email` (string | null, required)
  - `last_used_at` (string | null, required)
  - `created_at` (string, required)
  - `stats` (object, optional): The runs the key started in the last seven days. Only in the list. `finished` counts runs that ended `completed` or `needs_review`, out of `ended`. `webhook_deliveries` is the state of each run's latest completion webhook: delivered, still being retried, or dropped after the last try.
    - `since` (string, required)
    - `runs` (integer, required)
    - `finished` (integer, required)
    - `ended` (integer, required)
    - `spend_usd` (number, required)
    - `mcp_runs` (integer, required): Of `runs`, those started through MCP.
    - `webhook_deliveries` (object, required)
      - `delivered` (integer, required)
      - `retrying` (integer, required)
      - `failed` (integer, required)
  - `secret` (string, optional): The key's secret. Only in the create and rotate responses; never shown again.
  - `webhook_secret` (string, optional): The webhook signing secret. Only in the update response that minted it.

### 401

No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.

### 404

No such resource for the caller, including one in an org the caller is not in or a Project that is private to someone else.

### 429

The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (`RATE_LIMITED`). The error names the limit. Wait `Retry-After` seconds.

## Example response (200)

```json
{
  "data": [
    {
      "id": "key_Zq3T9vB1mN4pX8cR2wYe",
      "name": "ci-runner",
      "prefix": "rk_live_Q7f2",
      "scopes": ["runs:read", "runs:write"],
      "max_concurrent": 4,
      "webhook_url": "https://hooks.acme.dev/rush",
      "expires_at": "2027-01-01T00:00:00.000Z",
      "created_by": {
        "id": "5b8e2c1d-3f4a-4b6c-9d7e-8f9a0b1c2d3e",
        "email": "dana@acme.dev"
      },
      "last_used_at": "2026-10-06T15:20:41.000Z",
      "created_at": "2026-10-06T15:00:00.000Z"
    }
  ]
}
```
