Create a new normal API key for the account that owns the supplied management API key. The Authorization header must contain a management key (Bearer). Management keys cannot be used to call any other endpoint.

post/v1/api-keys

Request body

namestring required

Human-readable name for the new API key

spend_limitnumber nullable

Optional spend cap in USD. Requests are blocked once the key has spent this amount within the current window (see spend_limit_period). Omit or set to null for no limit. The owner can change it later from the API keys dashboard.

spend_limit_period'day' | 'week' | 'month' nullable

Optional reset window for spend_limit. day/week/month reset at 00:00 UTC on the corresponding boundary (today / Monday / 1st of the month). Omit or set to null for a lifetime/cumulative cap. Requires spend_limit to be set.

expires_atstring nullable

Optional ISO 8601 timestamp at which the key automatically stops working. Must be in the future. Omit or set to null to never expire.

Example request

{
  "spend_limit": 5,
  "spend_limit_period": "month",
  "expires_at": "2027-01-01T00:00:00Z"
}

Response

Created

idstring required
namestring required
keystring required

The generated API key. Shown only once.

created_atstring required
is_activeboolean required
is_managementboolean required
spend_limitnumber nullable required

Spend cap in USD, or null when no limit is set.

spend_limit_period'day' | 'week' | 'month' nullable required

Reset window for the spend limit, or null for lifetime cap.

expires_atstring nullable required

Expiration timestamp, or null when the key never expires.

Changes

No recorded changes to this endpoint across all 1 revision of this API.