Calls · API Reference

Trigger a Call

Initiates an outbound call to the specified number. Drive it with a stored agent (`agentId`) or an inline `agent` config — provide exactly one, not both. The call is queued immediately and the response is returned before the call connects. Use the returned `sessionId` to poll status or hang up. When using an inline `agent`, `agentId` in the response will be `null`.

POST/v1/calls
Scope:calls:write
Supports Idempotency-Key header
Request Body
agentId
stringoptional

ID of a stored agent. Provide this OR `agent`, not both.

agent
objectoptional

Inline agent config (same schema as Create Agent). Use instead of `agentId` to drive the call without a stored agent.

toNumber
stringrequired

Destination phone number in E.164 format.

fromNumber
stringrequired

Caller ID. Must be a number assigned to your product.

clientRequestId
stringoptional

Your own reference ID, echoed back in the response and webhooks.

overrides
objectoptional

Per-call overrides for a stored agent. Only `firstMessage` and `prompt` are accepted. Ignored when using an inline `agent`.

firstMessagestring

Opening line the agent says when the call connects.

promptstring

Additional context injected into the agent's system prompt.

Responses
{
  "sessionId": "ses_xxxxxxxxxxxxxxxxxx",
  "status": "initiated",
  "agentId": "agt_xxxxxxxxxxxx",
  "productId": "prd_xxxxxxxxxxxx",
  "clientRequestId": "order-9182"
}
PlaygroundPOST
Authorization

Body

agentIdoptional
agentoptional
toNumberrequired
fromNumberrequired
clientRequestIdoptional
overridesoptional
Idempotency-Keyoptional