Initiate a call with an AI agent to a specified phone number
can_initiate_calls permission.
| Parameter | Type | Required | Description |
|---|---|---|---|
phone_number | string | Yes | The phone number to call in E.164 format (e.g., +15551234567) |
agent_id | string/integer | Yes | The ID of the AI agent to use (can be database ID or assistant_id) |
contact_id | integer | No | The ID of an existing contact (if known) |
variables | object | No | Context variables to be used in the call |
| Status Code | Error Code | Description |
|---|---|---|
| 400 | missing_phone_number | Phone number is required |
| 400 | missing_agent_id | Agent ID is required |
| 400 | invalid_phone_number | The provided phone number is not valid |
| 400 | invalid_json | Invalid JSON payload |
| 401 | authentication_required | No API key was provided |
| 401 | invalid_key | The API key is invalid or inactive |
| 402 | insufficient_funds | Insufficient funds to make call |
| 403 | permission_denied | The API key doesn’t have the required permission |
| 403 | do_not_call | The phone number is on your Do Not Call list |
| 404 | agent_not_found | AI agent not found or you do not have access |
| 404 | no_phone_number | The agent does not have an assigned phone number |
| 500 | server_error | An unexpected server error occurred |
402 Payment Required response with details about your current balance and the required rate.
{{variable_name}} syntax.
Common variable uses:
customer_name, company, etc.)appointment_time, appointment_type, etc.)