Skip to main content
POST /outbound_call places a call from one of your AI agents. Trigger it from a CRM when a lead is created, from an automation platform when a form is submitted, or from your own application when something happens. You can shape the call — extra context, dynamic variables, an opening line — without editing the agent.

Before you can place a call

Outbound calling is blocked until the workspace owner is fully verified. If calls fail for an account that has only verified its phone number, this is why. See Account verification.

Request headers

string
required
Your VoiceInfra API key.
string
required
Must be application/json.

Request body

string
required
The ID of the agent that should make the call. Find it on the agent’s API tab.
string
required
The number to call, in E.164 format — for example +14155551234.
string
required
The ID of the phone number the call goes out from — a UUID, not the number in E.164. The number must be configured for outbound in your workspace.
string
Extra context for the agent on this call only. Use it for anything that should shape the conversation but does not fit a variable — for example “Sarah prefers short calls and has an outstanding balance from her last visit.”
object
Key-value pairs that fill {{placeholders}} in the agent’s prompt and opening message. For example {"name": "Sarah Johnson", "order_id": "4521"}.
string
Overrides the agent’s opening line for this call. Not available on workflow agents — a workflow agent’s greeting comes from its start node, and the API rejects the request if you send this field.

Example body

Response

A successful request returns 200:
status: "success" means the call was initiated, not that anyone answered. Whether it connected, and how it went, arrives in the webhook and on the call log.

Unknown fields are rejected

The request body is strict — sending a field that is not in the list above returns 422. If you are adapting an older example, check the field names: phone_number and from_number_id, not to_number and from_number.

Filling in variables

context_variables are substituted into the agent’s system prompt and opening message wherever a matching {{placeholder}} appears. Built-in values are available too, so you only pass what is specific to the call. A prompt like this:
resolves at call time to:

Sending the request

cURL

Tracking the outcome

VoiceInfra sends a call_completed webhook to your configured endpoint when the call ends, carrying the call_id from this response. Store that ID immediately so you can match the two. If a webhook is missed, GET /agents/active-calls tells you whether the call is still running — see Active Calls.

Active Calls

Check whether a call is still in progress.

Webhooks Reference

Payload schema and signature verification.

Errors