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

> ## Agent Instructions
> To search or read these docs, connect the Ringg docs MCP server at https://docs.ringg.ai/mcp (no key needed; tools search_ringg_ai and query_docs_filesystem_ringg_ai) instead of browsing pages one by one. Setup for each client: https://docs.ringg.ai/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants.md
> The dashboard labels agents "Assistants"; these docs say "agent". Both mean the same object, identified by agent_id.
> API base URL: https://prod-api.ringg.ai/ca/api/v0. Send the workspace API key in the X-API-KEY header, from server-side code only.
> Placing a call dials a real phone number and spends credits. Confirm the number with the user before calling.
> To act on a Ringg workspace (place calls, edit agents, read transcripts), use the separate Ringg workspace MCP server at https://mcp.ringg.ai/mcp: https://docs.ringg.ai/resources/mcp-server/workspace-mcp-server/overview.md

> Set how many concurrent calls one Ringg Space may run, out of the capacity bought on the primary; a new Ringg Space starts at 0 and cannot call.

# Allocate Concurrency to a Ringg Space

export const RelatedTopics = ({items}) => <div className="not-prose mt-12">
    <div className="text-sm font-medium text-gray-500 dark:text-zinc-400 mb-3">Related topics</div>
    <div className="flex flex-col gap-2.5">
      {items.map(([title, href]) => <a key={href} href={href} className="flex items-center gap-2.5 text-sm text-gray-700 hover:text-gray-950 dark:text-zinc-300 dark:hover:text-white">
          <Icon icon="file-text" size={16} color="currentColor" />
          {title}
        </a>)}
    </div>
  </div>;

Allocations across all Ringg Spaces cannot exceed the capacity bought on the primary. The same call rebalances capacity between clients or teams later.

## Notes

* `concurrency` is absolute, not a delta. Lowering an allocation always succeeds; raising it must fit `family.concurrency_available` from [Get Ringg Spaces](/api-reference/account/ringg-spaces/get-sub-workspaces).
* `limit_concurrency` in the response is the persisted ceiling. In an individual-billing family it equals the allocation. In a common-billing family it is the family total, because idle capacity is shared, so it can be larger than `concurrency`.
* This is the only allocation endpoint that applies to common-billing families; money is pooled on the primary there.
* When `family.concurrency_available` reaches `0`, buy more capacity on the primary, then allocate the new slots here.

## Errors

* `400`: `Only 30 concurrent calls are available to allocate from the parent workspace (capacity 50, 20 already allocated to other sub-workspaces).` — the allocation does not fit.
* `400`: `Sub-workspaces cannot have their own sub-workspaces.` — the key belongs to a Ringg Space that has Ringg Spaces enabled.
* `401`: Invalid or missing API key.
* `403`: `Sub-workspaces are not enabled for this workspace.` — Ringg Spaces are not enabled on the primary, or the key belongs to a Ringg Space.
* `404`: `Sub-workspace not found` — no active Ringg Space with this ID under your primary.
* `422`: `sub_workspace_id` is not a UUID, or `concurrency` is negative or missing.

<RelatedTopics items={[["Ringg Spaces API overview", "/documentation/manage-account/ringg-spaces/ringg-spaces-by-api#manage-the-family-by-api"]]} />


## OpenAPI

````yaml patch /workspace/sub/{sub_workspace_id}/concurrency
openapi: 3.0.0
info:
  title: Ringg AI API Documentation
  description: >-
    The Ringg AI REST API. Base URL https://prod-api.ringg.ai/ca/api/v0; send
    your workspace API key in the X-API-KEY header from server-side code only.
    Requests and responses are JSON.
  version: 2.0.0
  contact:
    name: Ringg AI support
    email: admin@ringg.ai
    url: https://docs.ringg.ai
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 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/{sub_workspace_id}/concurrency:
    patch:
      tags:
        - workspace
      summary: Allocate Concurrency to a Ringg Space
      description: >-
        Sets how many concurrent calls one Ringg Space may run, taken from the
        family's capacity (bought on the primary). Allocations across all Ringg
        Spaces cannot exceed the capacity. In an individual-billing family the
        allocation is also the Ringg Space's hard ceiling; in a common-billing
        family the ceiling is the family total, so idle capacity flows to
        whichever Ringg Space is busy.
      operationId: allocateSubWorkspaceConcurrency
      parameters:
        - name: X-API-KEY
          in: header
          description: >-
            (Required) The API key of the PRIMARY workspace. A Ringg Space's own
            key is refused (403, or 400 if Ringg Spaces are enabled on it).
          required: true
          schema:
            type: string
            example: rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        - name: sub_workspace_id
          in: path
          required: true
          description: (Required) ID of the Ringg Space.
          schema:
            type: string
            format: uuid
            example: 00000000-0000-4000-8000-000000000101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - concurrency
              properties:
                concurrency:
                  type: integer
                  minimum: 0
                  description: >-
                    (Required) Concurrent calls to allocate to this Ringg Space.
                    0 stops it from calling.
                  example: 20
            example:
              concurrency: 20
      responses:
        '200':
          description: 'Successful Response: The new allocation and the family totals.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Mumbai Collections now has 20 concurrent calls
                  sub_workspace_id:
                    type: string
                    example: 00000000-0000-4000-8000-000000000101
                  concurrency:
                    type: integer
                    example: 20
                  limit_concurrency:
                    type: integer
                    description: >-
                      The persisted ceiling: equals concurrency in an
                      individual-billing family, the family total in a
                      common-billing family.
                    example: 20
                  primary:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 00000000-0000-4000-8000-000000000107
                      name:
                        type: string
                        example: Acme Collections HQ
                  family:
                    type: object
                    properties:
                      parent_concurrency:
                        type: integer
                        description: Family capacity.
                        example: 50
                      allocated_total:
                        type: integer
                        description: Sum of all Ringg Space allocations after this change.
                        example: 20
              example:
                message: Mumbai Collections now has 20 concurrent calls
                sub_workspace_id: 00000000-0000-4000-8000-000000000101
                concurrency: 20
                limit_concurrency: 20
                primary:
                  id: 00000000-0000-4000-8000-000000000107
                  name: Acme Collections HQ
                family:
                  parent_concurrency: 50
                  allocated_total: 20
        '400':
          description: Bad Request - The allocation does not fit the family's capacity.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Only 30 concurrent calls are available to allocate from
                      the parent workspace (capacity 50, 20 already allocated to
                      other sub-workspaces).
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid credentials
        '403':
          description: >-
            Forbidden - Ringg Spaces are not enabled for this workspace (also
            what a Ringg Space's own key gets), or the caller is not an active
            member of the primary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Sub-workspaces are not enabled for this workspace.
        '404':
          description: Not Found - No active Ringg Space with this id under the primary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Sub-workspace not found
        '500':
          description: Internal Server Error - Something went wrong on our end.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: An unexpected error occurred. Please try again later.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.