Accepted by
POST /v1/calls/token (voice, video), POST /v1/calls/outbound (voice),
POST /v1/calls/batches (voice) and POST /v1/chats (text). Send agent_id or
agent, not both; agent_team excludes all four single-agent fields. These endpoints
need the editor role. An inbound call or chat has no request: its agent can turn on
the inbound webhook, whose answer may carry an
agent_override.
agent_version: run the draft or an old version
Omit it to run what is published."draft" runs the current working copy — validated and
tool-pinned at request time and refused with the publish errors if it does not hold
together. The draft is copied into the call at request time, so later edits do not affect
it.
agent_override: change fields for one call
AgentOverride is the AgentConfig field tree with every field optional — the same
shape PATCH /v1/agents/{agent_id} takes. It merges by these rules:
- A hook or tool given as
{"tool_id": "…"}attaches that tool at its currently published version, not the base’s pinned one. channelcan change only within what the endpoint runs: voice ↔ video on/calls/token; anything else is refused.- An override pins the base version it was merged against. A bare
agent_idwith no override follows whatever is published — which matters on a batch, re-read on every dispatch, and on an open chat, which follows the published agent between messages.
Declarations versus values
The required-variable check runs on the merged config, so an override adding a
default
satisfies it. See variables.
agent: a whole definition for one call
Send a completeAgentConfig. Nothing is stored — no id, editor, version history or
CoPilot. Inline tools, MCP servers and FAQs inside it
live for that call only (on a stored agent they would be created as real ones).
userdata or vars.
agent_team: several agents for one call
{"members": [...]}, 1–10 members, each described like a single agent (agent_id with
optional agent_version/agent_override, or inline agent) plus a unique name.
members[0] answers; others are reached by handoffs naming them.
Details: agent teams on a call.
How the merged config is validated
Before anything is compiled or a provider called, in order:- The merged JSON must parse as an
AgentConfig(422). - Team member names must be unique (422).
- The resolved
channelmust match the endpoint. - Every
requiredvariable needs a value or default. - Inline
codeoperations are compiled. - Full publish validation of every member — see validation.
message: "the resolved agent config is invalid"; on a team each
error is prefixed with the member’s name. Warnings come back as warnings on the response.
On a batch the plan is stored with every call it places, so attach FAQs by faq_id rather
than inline.
Reading back what ran
A call that ran the published agent unmodified stores no plan. Otherwise:GET /v1/calls/{session_id}returnssession.agent_version("draft"for the draft,nullfor an inline agent), thetools,starting_promptandgreetingthat ran, and the frozenagent_plan.GET /v1/calls/batches/{batch_id}returns the campaign’sagent_plan.- The dashboard call list badges calls
Inline,Draft,Overridden,PinnedorTeam.
Next
Versions
Publishing, rollback and tool pinning.
Agent teams on a call
Casts and roster handoffs.