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`.
/v1/callscalls:writeIdempotency-Key headeragentIdID of a stored agent. Provide this OR `agent`, not both.
agentInline agent config (same schema as Create Agent). Use instead of `agentId` to drive the call without a stored agent.
toNumberDestination phone number in E.164 format.
fromNumberCaller ID. Must be a number assigned to your product.
clientRequestIdYour own reference ID, echoed back in the response and webhooks.
overridesPer-call overrides for a stored agent. Only `firstMessage` and `prompt` are accepted. Ignored when using an inline `agent`.
firstMessagestringOpening line the agent says when the call connects.
promptstringAdditional context injected into the agent's system prompt.
{
"sessionId": "ses_xxxxxxxxxxxxxxxxxx",
"status": "initiated",
"agentId": "agt_xxxxxxxxxxxx",
"productId": "prd_xxxxxxxxxxxx",
"clientRequestId": "order-9182"
}AuthorizationBody
agentIdoptionalagentoptionaltoNumberrequiredfromNumberrequiredclientRequestIdoptionaloverridesoptionalIdempotency-Keyoptional