Skip to main content
PUT
Update Traffic Allocation

Authorizations

Authorization
string
header
default:$CARTESIA_API_KEY
required

Cartesia API key (sk_car_...). Get one at play.cartesia.ai/keys.

Headers

Cartesia-Version
enum<string>
default:2026-08-14
required

API version header.

Available options:
2026-08-14
Example:

"2026-08-14"

Path Parameters

agent_id
string
required

The ID of the agent.

Body

application/json
targets
TrafficAllocationTarget · object[]
required

One to five unique versions whose percentages total exactly 100.

Required array length: 1 - 5 elements
assignment_strategy
enum<string>

Omit this field when you create an allocation to use sticky_by_caller. If an active allocation exists, omission preserves its assignment strategy.

Available options:
sticky_by_caller,
random_per_call

Response

The active allocation was replaced with a new revision.

id
string
required

The unique ID of this immutable allocation revision.

agent_id
string
required

The agent whose calls use this allocation.

revision
integer
required

The agent's monotonically increasing allocation revision.

Required range: x >= 1
targets
TrafficAllocationTarget · object[]
required

Version targets in deterministic routing order. An empty list marks a cleared revision in allocation history.

assignment_strategy
enum<string>
required

How Cartesia assigns phone calls to version targets. sticky_by_caller keeps an external phone number on the same version while the traffic split stays the same. It uses the caller number for inbound calls and the destination number for outbound calls. random_per_call assigns each new phone call separately. Web calls that use traffic allocation are always assigned per call, so this setting does not affect them.

Available options:
sticky_by_caller,
random_per_call
created_at
string<date-time>
required

When this allocation revision was created.

created_by
string
required

ID of the user or API key that created this allocation revision.