Skip to main content
PATCH
Update API key

Authorizations

Authorization
string
header
required

JWT access token for user authentication (Authorization: Bearer <jwt_token>). Create via POST /users/me/access_tokens.

Path Parameters

workspace_id
string<uuid>
required

Workspace ID

key_id
string<uuid>
required

API Key ID

Body

application/json

Request to update API key (general update for name, expires_at, and/or spend_limit)

expires_at
string<date-time> | null
is_active
boolean | null
name
string | null
spendLimit
null | object

Decimal price for API requests

The system internally uses a fixed scale of 9 (nano-dollars = 1 billionth of a dollar). Clients must provide amounts in nano-dollars.

Examples: $100.00 USD: amount=100000000000, currency="USD" $1.00 USD: amount=1000000000, currency="USD" $0.01 USD: amount=10000000, currency="USD"

Response

API key updated successfully

API Key response model

created_at
string<date-time>
required
created_by_user_id
string
required
id
string
required
is_active
boolean
required
key_prefix
string
required
workspace_id
string
required
deleted_at
string<date-time> | null
expires_at
string<date-time> | null
key
string | null
last_used_at
string<date-time> | null
name
string | null
spend_limit
null | object

Decimal price for API responses

The system uses a fixed scale of 9 (nano-dollars = 1 billionth of a dollar). The scale field is included in responses for client convenience.

usage
null | object

Decimal price for API responses

The system uses a fixed scale of 9 (nano-dollars = 1 billionth of a dollar). The scale field is included in responses for client convenience.