Get Sub-workspaces
Returns the whole family in one call: the primary’s summary, one row per active sub-workspace with its allocation, members and month-to-date usage, and the family totals. Works on a primary that has no sub-workspaces yet (empty list).
When to use
- A tenant dashboard in your own admin tool.
- Checking headroom before allocating concurrency or credit.
- Reconciling per-client usage at month end.
Reading the response
billingon each row is{account_type, currency, total_available_credits}for prepaid and{account_type, currency, credit_limit, utilized_limit}for postpaid. In a common-billing family the sub-workspace rows carrynulllimits because charges pool on the primary.familyalways has the concurrency keys andis_individual_entity. Postpaid families addcredit_limit,utilized_total, andavailable_total. Prepaid families addavailable_pot(the primary’s unallocated money) andfamily_available_total; individual prepaid families also addallocated_balance_total.usage_this_periodis the value of completed calls since the 1st of the current month in theAsia/Kolkatatimezone, in the workspace’s billing currency.limit_concurrencyis a sub-workspace’s ceiling: its own allocation in an individual family, the family total in a common family.- Amounts are JSON numbers here.
Integration notes
- Authenticate with the primary workspace’s API key.
- Works on a primary with no sub-workspaces yet;
sub_workspacesis then an empty list. - Archived sub-workspaces are not listed.
Error responses
- 400:
Sub-workspaces cannot have their own sub-workspaces.— the key belongs to a sub-workspace. - 401: Invalid or missing API key.
- 403:
Sub-workspaces are not enabled for this workspace.
Example
Headers
(Required) The API key of the PRIMARY workspace. A sub-workspace's key is refused with 400.
"7251cb4b-3373-43a4-844c-b27a1d45e0c9"
Response
Successful Response: The family overview.
Active sub-workspaces, oldest first.
Family totals. Always: the concurrency keys and is_individual_entity. Postpaid families add credit_limit, utilized_total, available_total. Prepaid individual families add available_pot, allocated_balance_total, family_available_total. Prepaid common families add available_pot and family_available_total.