v1

latestOpenAPI 3.0.32026-07-2246176.0 KB

Update API key

Update an API key's name, permissions, allowed_subaccounts, allowed_ips, expires_at, or is_active. The response includes an updated_fields array showing which fields changed. You cannot update the API key currently being used to authenticate the request — doing so returns 409. Note: sending an empty permissions array is silently ignored — permissions cannot be cleared via this endpoint. Permission: account:apikeys:update.

put/v4/account/api-keys/{id}

Path parameters

idstring uuid required

Request body

namestring
permissionsstring[]

Array of permission strings. Empty arrays are silently ignored — permissions cannot be cleared via this endpoint.

allowed_subaccountsstring[]

Subaccount UUIDs this key can act on. Empty array means all subaccounts.

allowed_ipsstring[]

IP addresses or CIDR ranges allowed to use this key. Empty array means no IP restriction.

expires_atinteger nullable

Unix timestamp for key expiry. Must be in the future.

is_activeboolean

Enable or disable the key without deleting it.

Response

Updated API key

successboolean
messagestring

Example response

{
  "message": "API key updated successfully"
}