Skip to main content
POST

Authentication

Requires an API key in the Authorization header.

Request

string
required
The key’s database id, as returned by List API keys. Not the key_prefix.
integer
The maximum number of credits this key may spend. Must be between 0 and 2147483647. 0 blocks all spending on the key. Send null, or omit the field entirely, to remove the cap.

Set a limit

Remove the limit (unlimited)

Response

string
Confirmation message.
Known issue: A credit_limit above 2147483647 returns 404 with API key not found instead of a validation error.
integer | null
The newly-applied credit cap, or null when the cap was removed.

Permissions

readonly members get 403. A tech member can only change their own keys; only a workspace admin can change another member’s key. A key that is out of your scope returns 404, the same as an unknown id.

Errors

Errors return the shared envelope with success, result.code, message, and request_id. A legacy error key is included alongside it.