# List keys

Returns keys.

```http
GET https://api.pozy.ai/v1/api-keys
```

- Area: Workspace / API Keys
- Auth: Authorization: Bearer pz_live_...

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/api-keys" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/api-keys", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/api-keys",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `apiKeys`, array of object
  - `id`, string
  - `name`, string
  - `keyPreview`, string
  - `expiresAt`, string (date-time)
  - `createdAt`, string (date-time)
  - `key`, string
  - `scope`, string: One of `full`, `profiles`. Default `full`
  - `profileIds`, array of object
    - `_id`, string
    - `name`, string
    - `color`, string
  - `permission`, string: One of `read-write`, `read`. Default `read-write`
  - `disabledResourceGroups`, array of string: Each item: one of `publishing`, `engagement`, `messages`, `contacts`, `analytics`, `ads`, `telephony`, `accounts`, `billing`, `webhooks`, `commerce`, `creator_campaigns`, `money`, `calendar`, `files`
  - `createdBy`, object: Can be null
    - `id`, string
    - `email`, string

```json
{
  "apiKeys": [
    {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "name": "Acme",
      "keyPreview": "string",
      "expiresAt": "2026-10-02T09:00:00.000Z",
      "createdAt": "2026-10-02T09:00:00.000Z",
      "key": "string",
      "scope": "full",
      "profileIds": [
        {
          "_id": "635d87e261ae344ef27fd1df",
          "name": "Acme",
          "color": "string"
        }
      ],
      "permission": "read-write",
      "disabledResourceGroups": [
        "publishing"
      ],
      "createdBy": {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "email": "alex@example.com"
      }
    }
  ]
}
```
