> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ringg.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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).

Return the whole family in one call: the primary's summary, one row per active sub-workspace with its allocation, member counts, and month-to-date usage, and the family totals.

## 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

* `billing` on 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 carry `null` limits because charges pool on the primary.
* `family` always has the concurrency keys and `is_individual_entity`. Postpaid families add `credit_limit`, `utilized_total`, and `available_total`. Prepaid families add `available_pot` (the primary's unallocated money) and `family_available_total`; individual prepaid families also add `allocated_balance_total`.
* `usage_this_period` is the value of completed calls since the 1st of the current month in the `Asia/Kolkata` timezone, in the workspace's billing currency.
* `limit_concurrency` is 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_workspaces` is 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

```bash theme={null}
curl --request GET "https://prod-api.ringg.ai/ca/api/v0/workspace/sub" \
  --header "X-API-KEY: $RINGG_API_KEY"
```


## OpenAPI

````yaml get /workspace/sub
openapi: 3.0.0
info:
  title: Ringg AI API Documentation
  description: >-
    This is the documentation for the Ringg AI APIs. The Ringg AI API follows
    RESTful principles, making it intuitive and easy to integrate with your
    applications. All API requests should be made to the base URL. The API
    accepts and returns data in JSON format. Ensure your requests include the
    appropriate Content-Type header for POST and PATCH requests.
  version: 2.0.0
servers:
  - url: https://prod-api.ringg.ai/ca/api/v0
security: []
tags:
  - name: workspace
    description: Endpoints for managing your workspace.
  - name: agent
    description: Endpoints for managing assistants (agents).
  - name: calling
    description: Endpoints for making and managing calls.
  - name: campaign
    description: Endpoints for managing campaigns.
  - name: analytics
    description: Endpoints for accessing call analytics and performance metrics.
  - name: termination
    description: Endpoints for terminating active calls using different methods.
  - name: knowledgebase
    description: Endpoints for managing knowledge bases.
paths:
  /workspace/sub:
    get:
      tags:
        - workspace
      summary: Get Sub-workspaces
      description: >-
        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).
      operationId: getSubWorkspaces
      parameters:
        - name: X-API-KEY
          in: header
          description: >-
            (Required) The API key of the PRIMARY workspace. A sub-workspace's
            key is refused with 400.
          required: true
          schema:
            type: string
            example: 7251cb4b-3373-43a4-844c-b27a1d45e0c9
      responses:
        '200':
          description: 'Successful Response: The family overview.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  primary:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 2f9a1c44-7e88-4bb1-9a01-5d3c2e7f6a11
                      name:
                        type: string
                        example: Acme Collections HQ
                      concurrency:
                        type: integer
                        example: 50
                      limit_concurrency:
                        type: integer
                        example: 50
                      member_count:
                        type: integer
                        description: Direct members of the primary.
                        example: 4
                      billing:
                        type: object
                        description: >-
                          Money block of one workspace. Prepaid: account_type,
                          currency, total_available_credits. Postpaid:
                          account_type, currency, credit_limit, utilized_limit
                          (both null for a sub in a common-billing family, whose
                          charges pool on the primary).
                        properties:
                          account_type:
                            type: string
                            enum:
                              - prepaid
                              - postpaid
                            example: postpaid
                          currency:
                            type: string
                            enum:
                              - INR
                              - USD
                            example: INR
                          total_available_credits:
                            type: number
                            nullable: true
                            description: 'Prepaid only: the workspace''s own wallet.'
                            example: 5000
                          credit_limit:
                            type: number
                            nullable: true
                            description: Postpaid only.
                            example: 200000
                          utilized_limit:
                            type: number
                            nullable: true
                            description: Postpaid only.
                            example: 34210.5
                      usage_this_period:
                        type: number
                        example: 0
                  sub_workspaces:
                    type: array
                    description: Active sub-workspaces, oldest first.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30
                        name:
                          type: string
                          example: Mumbai Collections
                        created_at:
                          type: string
                          format: date-time
                          example: '2026-09-01T06:41:12.884312+00:00'
                        concurrency:
                          type: integer
                          description: Concurrent calls allocated to this sub-workspace.
                          example: 20
                        limit_concurrency:
                          type: integer
                          description: >-
                            The sub-workspace's ceiling: its own allocation in
                            an individual-billing family, the family total in a
                            common-billing family.
                          example: 20
                        member_counts:
                          type: object
                          properties:
                            direct:
                              type: integer
                              example: 2
                            inherited:
                              type: integer
                              example: 4
                        billing:
                          type: object
                          description: >-
                            Money block of one workspace. Prepaid: account_type,
                            currency, total_available_credits. Postpaid:
                            account_type, currency, credit_limit, utilized_limit
                            (both null for a sub in a common-billing family,
                            whose charges pool on the primary).
                          properties:
                            account_type:
                              type: string
                              enum:
                                - prepaid
                                - postpaid
                              example: postpaid
                            currency:
                              type: string
                              enum:
                                - INR
                                - USD
                              example: INR
                            total_available_credits:
                              type: number
                              nullable: true
                              description: 'Prepaid only: the workspace''s own wallet.'
                              example: 5000
                            credit_limit:
                              type: number
                              nullable: true
                              description: Postpaid only.
                              example: 200000
                            utilized_limit:
                              type: number
                              nullable: true
                              description: Postpaid only.
                              example: 34210.5
                        usage_this_period:
                          type: number
                          description: >-
                            Charges for completed calls this calendar month
                            (Asia/Kolkata), in the workspace's billing currency.
                          example: 34210.5
                  family:
                    type: object
                    description: >-
                      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.
                    properties:
                      concurrency_capacity:
                        type: integer
                        description: >-
                          Concurrent calls the family owns (bought on the
                          primary).
                        example: 50
                      concurrency_allocated:
                        type: integer
                        description: Sum of the sub-workspaces' allocations.
                        example: 20
                      concurrency_available:
                        type: integer
                        example: 30
                      is_individual_entity:
                        type: boolean
                        description: >-
                          true = individual billing (each sub has its own wallet
                          or limit); false = common billing (one pool on the
                          primary).
                        example: true
                      credit_limit:
                        type: number
                        nullable: true
                        description: 'Postpaid: the family total.'
                        example: 500000
                      utilized_total:
                        type: number
                        nullable: true
                        description: 'Postpaid: primary + sub-workspaces utilized.'
                        example: 46710.5
                      available_total:
                        type: number
                        nullable: true
                        description: 'Postpaid: credit_limit - utilized_total.'
                        example: 453289.5
                      available_pot:
                        type: number
                        nullable: true
                        description: 'Prepaid: the primary''s unallocated balance.'
                        example: 12000
                      allocated_balance_total:
                        type: number
                        nullable: true
                        description: >-
                          Prepaid individual: sum of the sub-workspaces'
                          wallets.
                        example: 8000
                      family_available_total:
                        type: number
                        nullable: true
                        description: 'Prepaid: pot + allocated wallets.'
                        example: 20000
              example:
                primary:
                  id: 2f9a1c44-7e88-4bb1-9a01-5d3c2e7f6a11
                  name: Acme Collections HQ
                  concurrency: 50
                  limit_concurrency: 50
                  member_count: 4
                  billing:
                    account_type: postpaid
                    currency: INR
                    credit_limit: 500000
                    utilized_limit: 12500
                  usage_this_period: 0
                sub_workspaces:
                  - id: b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30
                    name: Mumbai Collections
                    created_at: '2026-09-01T06:41:12.884312+00:00'
                    concurrency: 20
                    limit_concurrency: 20
                    member_counts:
                      direct: 2
                      inherited: 4
                    billing:
                      account_type: postpaid
                      currency: INR
                      credit_limit: 200000
                      utilized_limit: 34210.5
                    usage_this_period: 34210.5
                family:
                  concurrency_capacity: 50
                  concurrency_allocated: 20
                  concurrency_available: 30
                  is_individual_entity: true
                  credit_limit: 500000
                  utilized_total: 46710.5
                  available_total: 453289.5
        '400':
          description: Bad Request - The API key belongs to a sub-workspace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Sub-workspaces cannot have their own sub-workspaces.
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: 401 Unauthorized
                      message:
                        type: string
                        example: Invalid credentials
        '403':
          description: >-
            Forbidden - Sub-workspaces are not enabled for this workspace, or
            the caller is not an active member of the primary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Sub-workspaces are not enabled for this workspace.
        '500':
          description: Internal Server Error - Something went wrong on our end.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: 500 Internal Server Error
                      message:
                        type: string
                        example: An unexpected error occurred on the server.

````