> ## 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 every Ringg Space's credit limit in one call, and optionally the family total, for postpaid Ringg Space families in individual billing mode.

# Reallocate Credit Limits

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

Use it to split the family's credit limit across clients or teams, or to raise one client's limit while keeping the total unchanged.

## Rules

* Values are absolute limits, not deltas.
* A Ringg Space's limit cannot go below what it has already used this month.
* The sum of all allocations cannot exceed the family total. Allocating less than the total is allowed; the remainder stays with the primary.
* What remains with the primary must still cover the primary's own utilized amount.
* In a common-billing family there are no per-Ringg Space limits: every charge utilizes the primary's single credit limit, and this endpoint returns `400`. Allocate [concurrency](/api-reference/account/ringg-spaces/allocate-concurrency) instead.

## Notes

* Read the current limits and usage from [Get Ringg Spaces](/api-reference/account/ringg-spaces/get-sub-workspaces) first, then send the full map.
* Amounts in the request can be JSON numbers (`200000`) or numeric strings (`"200000.00"`); they are rounded to two decimals.
* Amounts in the response are decimal strings (`"200000.00"`), unlike the read endpoints.

## Errors

* `400`: `Credit-limit reallocation applies to postpaid families only.`
* `400`: `This family uses common billing; per-sub credit limits do not exist.`
* `400`: `Allocations must cover every active sub-workspace exactly once. Missing: [...]; unknown: [...].`
* `400`: `Credit limit 100.00 for sub-workspace 'Mumbai Collections' is below its utilized amount 34210.50.`
* `400`: `The total credit limit across sub-workspaces must not exceed the parent workspace's credit limit (500000.00); allocations sum to 600000.00.`
* `400`: `These allocations would leave the primary workspace with 1000.00, below its already-utilized 12500.00. Lower the sub-workspace limits or raise the primary credit limit.`
* `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`: `Workspace is not a sub-workspace family parent.` — the primary has no Ringg Spaces yet.
* `422`: Empty map, negative value, or a key that is not a UUID.

<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/credit-limits
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/credit-limits:
    patch:
      tags:
        - workspace
      summary: Reallocate Credit Limits
      description: >-
        Postpaid, individual-billing families only. Sets every active Ringg
        Space's credit limit in one call and optionally the family total. The
        map must name every active Ringg Space exactly once; a slice cannot drop
        below what that Ringg Space has already used this month, the slices
        cannot exceed the family total, and what remains for the primary must
        cover its own usage. Not applicable to common-billing families, where
        credit is pooled on the primary.
      operationId: reallocateSubWorkspaceCreditLimits
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - allocations
              properties:
                allocations:
                  type: object
                  description: >-
                    (Required) sub_workspace_id -> new credit limit. Must
                    include every active Ringg Space exactly once. Values >= 0,
                    two decimals. Values may be JSON numbers (`200000`) or
                    numeric strings (`"200000.00"`).
                  additionalProperties:
                    oneOf:
                      - type: number
                      - type: string
                parent_credit_limit:
                  oneOf:
                    - type: number
                    - type: string
                  description: >-
                    (Optional) New family total (the primary's credit limit).
                    Omit to keep the current total. A JSON number or a numeric
                    string, >= 0.
                  example: 500000
            example:
              parent_credit_limit: 500000
              allocations:
                00000000-0000-4000-8000-000000000101: 200000
                00000000-0000-4000-8000-000000000114: 150000
      responses:
        '200':
          description: >-
            Successful Response: The applied limits. Amounts are decimal
            strings.
          content:
            application/json:
              schema:
                type: object
                properties:
                  parent_workspace_id:
                    type: string
                    example: 00000000-0000-4000-8000-000000000107
                  parent_credit_limit:
                    type: string
                    description: The family total, as a decimal string.
                    example: '500000.00'
                  allocations:
                    type: object
                    additionalProperties:
                      type: string
                    example:
                      00000000-0000-4000-8000-000000000101: '200000.00'
                      00000000-0000-4000-8000-000000000114: '150000.00'
                  primary:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 00000000-0000-4000-8000-000000000107
                      name:
                        type: string
                        example: Acme Collections HQ
              example:
                parent_workspace_id: 00000000-0000-4000-8000-000000000107
                parent_credit_limit: '500000.00'
                allocations:
                  00000000-0000-4000-8000-000000000101: '200000.00'
                  00000000-0000-4000-8000-000000000114: '150000.00'
                primary:
                  id: 00000000-0000-4000-8000-000000000107
                  name: Acme Collections HQ
        '400':
          description: >-
            Bad Request - Wrong billing mode, an incomplete map, or an
            allocation the family cannot cover.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      This family uses common billing; per-sub credit limits do
                      not exist.
        '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 - The primary has no Ringg Spaces yet.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Workspace is not a sub-workspace family parent.
        '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.