POST /v1/calls/outbound
Triggers Nixflex to call a phone number. The agent dials, waits for pickup, runs voicemail detection, and starts the conversation when a human answers.Documentation Index
Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
Use this file to discover all available pages before exploring further.
| Field | Type | Required | Notes |
|---|---|---|---|
agent_id | string | Yes | Agent that will handle this call |
to_number | string | Yes | Recipient in E.164 format (+44...) |
from_number | string | Yes | Your imported Twilio number to call from |
dynamic_vars | object | No | Key-value pairs injected into the agent’s prompt |
voicemail_message | string | No | Override agent default; what to leave if voicemail |
voicemail_action | enum | No | hangup (default), leave_message, ignore |
metadata | object | No | Free-form data echoed in webhook + call record |
campaign_id | string | No | Link this call to a batch campaign |
dynamic_vars are interpolated into the system prompt. In your prompt, reference them with curly braces:
{patient_name} with "Sarah" before sending to Claude. If a variable referenced in the prompt isn’t in dynamic_vars, it’s left as-is (Claude will see the literal {patient_name}).
201 Created:
agent_id and to_number are presentto_number is E.164 format (e.g. +447386172392, not 07386172392)from_number is providedcode.
| Code | HTTP | Cause |
|---|---|---|
invalid_phone_format | 400 | to_number or from_number not E.164 |
agent_not_owned | 403 | Agent doesn’t belong to your API key |
agent_no_phone | 400 | Agent has no phone number attached |
from_number_not_owned | 403 | from_number not in your account |
outbound_failed | 502 | Twilio rejected the dial (see details.twilio_error) |
concurrent_call_limit | 429 | Too many calls in flight; back off and retry |
to_numbervoicemail_action and ends the call[END_CALL] / timeoutwebhook_url