# API keys — Dizo API

`POST https://api.dizo.ai/v1/keys`

Create a key for an agent or teammate with its own caps and endpoint allow-list.

Requires `keys:write`. The secret is returned once.

**Cost:** Free. Charged: never.

## Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Label. |
| `scopes` | string[] |  | data:read, billing:read, billing:write, keys:write. |
| `daily_cap_credits / monthly_cap_credits` | integer |  | Per-key caps. |
| `max_credits_per_request` | integer |  | Per-request ceiling. |
| `allowed_endpoints` | string[] |  | Allow-list of paths. |

## Example request
```json
{
  "name": "sdr-agent",
  "scopes": [
    "data:read"
  ],
  "daily_cap_credits": 2000,
  "monthly_cap_credits": 20000,
  "max_credits_per_request": 500,
  "allowed_endpoints": [
    "/v1/search",
    "/v1/email/find"
  ]
}
```

## Example response
```json
{
  "id": "key_5Nq",
  "name": "sdr-agent",
  "secret": "dz_live_…shown once…"
}
```

## cURL
```bash
curl -X POST https://api.dizo.ai/v1/keys \
  -H "Authorization: Bearer $DIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"sdr-agent","scopes":["data:read"],"daily_cap_credits":2000,"monthly_cap_credits":20000,"max_credits_per_request":500,"allowed_endpoints":["/v1/search","/v1/email/find"]}'
```
