API Keys — client.api_keys
Programmatically manage keys for your organization.
create(**params) → APIKeyCreated
POST /v1/api-keys
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | yes | — | Friendly name. |
scopes | list[str] | no | ["*"] | e.g. ["agents:read","calls:write"]. ["*"] = full access. |
expires_in_days | int | no | 365 | 1–730. |
rate_limit_tier | str | no | "starter" | free, starter, professional, enterprise. |
ip_allowlist | list[str] | no | [] | IPs/CIDRs allowed to use the key. Empty = all. |
Returns APIKeyCreated: includes key — the full plaintext key, shown only once. Store it immediately.
Others
list(skip=0, limit=20, include_inactive=False) → list[APIKey](masked — onlykey_prefixshown)get(key_id) → APIKeyupdate(key_id, name=…, scopes=…, rate_limit_tier=…, ip_allowlist=…, is_active=…) → APIKeydelete(key_id) → None— revoke immediately.rotate(key_id, grace_period_hours=24) → APIKeyCreated— new key; old one stays valid during the grace period.get_usage(key_id) → APIKeyUsage
Valid scopes: agents:{read,write,delete}, calls:{read,write,delete}, phone_numbers:{read,write,delete}, batch_calls:{read,write,delete}, workflows:{read,write,delete}, analytics:read, knowledge_bases:{read,write,delete}, webhooks:{read,write}, config:read, api_keys:{read,write,delete}, *. (write implies read; delete implies write+read.)