API · Dashboard keys
Create a key. The secret is in this response only.
POST /v1/accounts/{id}/keys
| |
|---|
| Request | POST /v1/accounts/{id}/keys |
| Operation id | keys.create |
| Cost | Free |
| Auth | Dashboard session: Authorization: Bearer <session_token>. API keys are refused. |
| Name | Type | Required | Description |
|---|
id | string | yes | Example: acct_01J…. |
| Field | Type | Required | Description |
|---|
daily_spend_cap_credits | integer | null | no | Credits; null for no cap. 0 stops the key spending at all. |
monthly_spend_cap_credits | integer | null | no | Credits; null for no cap. 0 stops the key spending at all. |
name | string | yes | |
| Status | Meaning | Schema |
|---|
201 | The new key, with its secret. | |
400 | Invalid input. | Error |
401 | Not signed in, or an API key was sent (keys cannot manage keys). | Error |
403 | Members can’t create keys; owners and admins can. | Error |
404 | No such account among yours, or no such key on it. | Error |
Errors use one shape everywhere; see Errors for every code and what to do.