Update sub-account
Update sub-account. Requires a parent project API key; sub-account API keys receive HTTP 403.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
idstringrequiredSub-account ID.
Body
application/json
namestringexternalIdstringcreditLimitintegerLimitsmin 0metadataobjectstatusstringactiveandinactiveare set with PATCH.pending_deletionis read-only: the sub-account was deactivated with DELETE, its API keys are revoked, and it is removed after 14 days.One ofactiveinactivepending_deletion
Responses
200Sub-account updated.
subAccountobjectrequired9 properties
idstringrequirednamestringrequiredexternalIdstringExternal reference ID set by the parent account.
statusstringrequiredactiveandinactiveare set with PATCH.pending_deletionis read-only: the sub-account was deactivated with DELETE, its API keys are revoked, and it is removed after 14 days.One ofactiveinactivepending_deletiontotalSpentintegerrequiredTotal amount spent by this sub-account in cents.
creditLimitintegerSpending cap in cents. When reached, messages from this sub-account will be blocked.
metadataobjectapiKeystringAPI key for the sub-account. Only returned on creation.
createdAtstring<date-time>required
400Invalid request.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
403Forbidden. Sub-account API keys cannot manage sub-accounts.
codestringrequiredmessagestringrequireddetailsobject
404Sub-account not found.
codestringrequiredmessagestringrequireddetailsobject
409Another sub-account in the team already has this `externalId`.
codestringrequiredmessagestringrequireddetailsobject