Skip to main content
PATCH
Allocate Concurrency to a Sub-workspace
Set how many concurrent calls one sub-workspace may run. Capacity is bought on the primary; the allocations across all sub-workspaces cannot exceed it.

When to use

  • Giving a newly created sub-workspace its first capacity (it starts at 0 and cannot call until allocated).
  • Rebalancing capacity between clients or teams.

Request parameters

Integration notes

  • Authenticate with the primary workspace’s API key.
  • The value is absolute, not a delta. Lowering an allocation always succeeds; raising it must fit family.concurrency_available from 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.

Error responses

  • 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 sub-workspace.
  • 401: Invalid or missing API key.
  • 403: Sub-workspaces are not enabled for this workspace.
  • 404: Sub-workspace not found — no active sub-workspace with this id under your primary.
  • 422: sub_workspace_id is not a UUID, or concurrency is negative or missing.

Example

Common follow-up

Buy more capacity on the primary when family.concurrency_available reaches 0, then allocate the new slots here.

Headers

X-API-KEY
string
required

(Required) The API key of the PRIMARY workspace. A sub-workspace's key is refused with 400.

Example:

"7251cb4b-3373-43a4-844c-b27a1d45e0c9"

Path Parameters

sub_workspace_id
string<uuid>
required

(Required) ID of the sub-workspace.

Example:

"b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30"

Body

application/json
concurrency
integer
required

(Required) Concurrent calls to allocate to this sub-workspace. 0 stops it from calling.

Required range: x >= 0
Example:

20

Response

Successful Response: The new allocation and the family totals.

message
string
Example:

"Mumbai Collections now has 20 concurrent calls"

sub_workspace_id
string
Example:

"b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30"

concurrency
integer
Example:

20

limit_concurrency
integer

The persisted ceiling: equals concurrency in an individual-billing family, the family total in a common-billing family.

Example:

20

primary
object
family
object