Skip to main content
PATCH
Reallocate Credit Limits
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 instead.

Notes

  • Read the current limits and usage from Get Ringg Spaces 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.

Authorizations

X-API-KEY
string
header
required

Headers

X-API-KEY
string
required

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

Example:

"rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Body

application/json
allocations
object
required

(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").

parent_credit_limit

(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

Response

Successful Response: The applied limits. Amounts are decimal strings.

parent_workspace_id
string
Example:

"00000000-0000-4000-8000-000000000107"

parent_credit_limit
string

The family total, as a decimal string.

Example:

"500000.00"

allocations
object
Example:
primary
object