Overview
From the parent account you can:- Manage the sub account lifecycle — create, read, update, suspend, unsuspend, and soft-delete sub accounts
- Provision sub-account API keys — create a bootstrap API key that authenticates as the child account
- Track usage and cost — read per-sub-account message volume and the proportional share of the parent’s invoice allocated to each sub account
All sub-account endpoints are addressed under the parent account ID, for example
/v2/accounts/{account_id}/sub-accounts. The {account_id} path parameter is always the parent account, and {sub_account_id} identifies the child.Sub account status
Each sub account reports astatus field:
| Status | Meaning |
|---|---|
active | The sub account is operating normally. |
suspended | The sub account was suspended directly via the suspend endpoint. |
parent-suspended | The sub account is suspended because its parent account is suspended. |
deleted | The sub account has been soft-deleted. |
monthly_credit field is an optional monthly cap on the sub account, where 0 means no cap.
Provisioning a sub account
Stand up a new sub account and give it its own credentials in two calls, then use the returned child secret for all of that customer’s traffic.Create the sub account
Call
POST /v2/accounts/{account_id}/sub-accounts with the parent account ID and a unique Idempotency-Key. Capture the id from the response — this is the sub_account_id (the child account ID).Create a bootstrap API key
Call
POST /v2/accounts/{account_id}/sub-accounts/{sub_account_id}/api-keys with the parent account ID, the new sub_account_id, and a different unique Idempotency-Key. The credential you use must belong to the parent account and hold the sub-account-api-keys:write scope.Store the one-time secret
The
201 response includes a one-time secret_key. Store it immediately — it is omitted from all list, get, update, and delete responses. Exact idempotent replays within 5 minutes return the same secret_key; after that window it cannot be retrieved again.Usage and billing
The usage endpoint returns current billing-period message volume and the proportional cost allocated to the parent and each active sub account:allocation_methodisproportional— eachallocated_costis a share of the parent’s pooled invoice for the period, distributed by message volume.allocated_costis not standalone pricing. As theallocation_notedisclaimer states, it reflects a proportional share of the parent’s pooled invoice, not what the sub account would pay on its own plan.removed_sub_accountsaggregates usage from sub accounts that were soft-deleted during the current period. That usage is still billed to the parent and is not attributed to individual sub accounts.totalis the combined parent, active sub-account, and removed-sub-account usage for the period.
Soft-deleted sub accounts are excluded from the list endpoint. Usage they accrued before deletion in the current period is still reported through the
removed_sub_accounts aggregate.Idempotency
The create endpoints — create sub account and create sub-account API key — accept anIdempotency-Key header for safe retries. Because the API-key create response carries a one-time secret_key, its idempotent replay is only available for 5 minutes; other create responses are replayable for 24 hours. See Request Idempotency for the full retry model.
Scopes
Sub-account operations require dedicated scopes, all granted to parent-account API keys:| Scope | Grants |
|---|---|
sub-accounts:read | List and read sub accounts |
sub-accounts:write | Create and update sub accounts |
sub-accounts:delete | Soft-delete sub accounts |
sub-accounts:suspend | Suspend and unsuspend sub accounts |
sub-accounts:usage | Read per-sub-account usage and allocated cost |
sub-account-api-keys:read | List and read sub-account API keys |
sub-account-api-keys:write | Create and update sub-account API keys |
sub-account-api-keys:delete | Delete sub-account API keys |
Getting Started
Create a Sub Account
Provision a new isolated child account under your parent account
Create a Sub-Account API Key
Issue a bootstrap key that authenticates as the child account
Sub-Account Usage
Track per-sub-account volume and allocated cost for the billing period
Scopes
Understand the scopes that control sub-account access

