Skip to main content

The lifecycle at a glance

A subaccount is a child organization under your parent org. It starts pending the moment you create it, and it only becomes billing-active when you finalize. Create it, optionally attach branding and a custom domain, fund it, verify ownership of the domain, then flip it to active — and read back usage, pricing, and status. Every role gate on this page is owner or admin on the parent organization, except suspend/reactivate (owner only). Worked responses below use empty-path-safe ids, not shell echoes.

Worked sequence: create → fund → finalize

1. Create the subaccount

POST /api/v1/subaccounts takes a minimal body — a name is enough; plan, limits, and reseller pricing can follow as separate calls. The response carries the new org id and the one-time plaintext default API key.
Store api_key before you discard the response — it is shown once. Until finalization the subaccount is pending: reads work, but billing metering does not start.

2. Fund the wallet

Push initial credits from the parent wallet; pass a client_reference_id so a retried top-up replays instead of double-charging.

3. Attach a custom domain (optional)

White-label hosts claim a domain and re-check its CNAME before finalizing.
Point the domain’s DNS at cname_target, then re-check. status flips to verified when the CNAME resolves; the SSL certificate provisions asynchronously after that.

4. Finalize

Flip the subaccount to active. Owner or admin on the parent. The call is idempotent — a rerun on an already-active row is a 200 no-op, so a retried “Launch” click is safe.
Shortcut: POST /api/v1/subaccounts/provision runs create → pricing → branding → funding → finalize as one atomic call. Reach for it when onboarding is driven by your own portal instead of a human wizard.

Read back: usage, pricing, and status

Once active, the reads your reseller portal makes most:
GET /{id} returns the org row (subscription_status, plan, parent hierarchy) — the status check the finalize step above flips. GET /{id}/usage/statement?period=YYYY-MM returns the billing-grade per-day × meter rows the rollup endpoint folds; GET /{id}/usage/export.csv streams the same figures as a CSV attachment to invoice your end-customer.

Rating: rate deck, rate cards, and MCCMNC overrides

Subaccount pricing is a flat reseller_margin_pct over wholesale, plus optional per-channel/destination markup cells (the rate deck) or a named rate card from the parent org’s price-book library. For specific mobile operators, layer per-MCCMNC overrides — the send-path resolver prices an SMS segment against them before falling through to the wholesale deck. Read the assigned deck — an empty rate_deck means every usage line prices at the flat margin:
List the parent org’s persisted cards — each carries at least one cell family (lane_cells and/or deck_cells); cards without cells never persist:
Upsert a per-operator override — POST returns the written row; GET /{id}/mccmnc-overrides lists them cursor-paginated (meta.cursor, meta.has_more, meta.total):