Calls
Create and manage outbound voice calls. The public API creates outbound calls only. Inbound calls are handled automatically when a phone number is assigned to an agent. For UUID / phone / datetime formats used below, see Data formats.List Calls
Parameters
Query parameters:| Parameter | Type | Description |
|---|---|---|
status | string | Filter by call status (see Call Statuses) |
direction | string | inbound or outbound |
agent_id | UUID | Filter by agent |
limit | integer | 1–100. Default 50 |
offset | integer | Pagination offset. Default 0 |
Response
data (array of call objects), pagination (total, limit, offset, has_more), meta.
Get Call
Create Call
Place an outbound call using a specified agent. The call is always outbound when created via the public API.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | UUID | Yes | Agent that will handle the call |
phone_number | string (E.164) | Yes | Destination number to call (e.g. +15551234567) |
from_number | string (E.164) | No | Caller ID override. Must be a number assigned to this agent for outbound. If omitted, the system selects automatically. |
variables | object | No | Key-value pairs passed to the agent as template variables. Use in your system prompt with mustache syntax: {{first_name}}, {{company}}, etc. All values are treated as strings. |
call_settings | object | No | Per-call overrides (see call_settings fields below) |
call_settings Fields
| Field | Type | Default | Description |
|---|---|---|---|
recording_enabled | boolean | true | Record the call |
transcription_enabled | boolean | true | Transcribe the call |
greeting | string | — | Override the agent’s configured greeting for this specific call |
max_duration | string | — | Maximum call length, e.g. "3600s". Overrides agent default for this call. |
join_timeout | string | — | Time to wait for the callee to answer, e.g. "30s". Overrides agent default. |
- The agent must have at least one phone number assigned for outbound (see Telephony — Assign Number), or you must provide
from_number. - If no outbound number is available, the API returns 422.
- The telephony provider (Telnyx, Twilio, Plivo) is determined from the number’s credential.
Example
data (call object: id, agent_id, phone_number, direction, status, etc.) and meta. Send X-Idempotency-Key for safe retries.
Update Call
Update metadata on a call. Onlycontext and call_settings can be updated after creation.
Body: context (object, any key-value data to store on the call record) and/or call_settings (object with recording_enabled, transcription_enabled). Only included fields are updated.
Delete Call
Cannot delete active calls (queued, ringing, in_progress). Completed, failed, and other terminal calls can be deleted.
Bulk Delete Calls
Body:ids — array of call UUIDs to delete. Active calls in the list are skipped.
Response: data: { deleted_count, failed_count, deleted_ids, failed_ids }, meta.
Get Recording
Returns a URL to the call recording audio. The URL is fetched from the telephony provider and cached on the call record.data: { recording_url }. Returns 404 if no recording exists (e.g. recording was disabled).
Get Transcript
Returns the full transcript and summary for a completed call.data: { transcript: [...], summary }. Returns 404 if no transcript is available yet.
Call Object
| Field | Type | Description |
|---|---|---|
id | UUID | Call ID |
agent_id | UUID | Agent that handled the call |
phone_number | string | The number that was called |
from_number | string | Caller ID used |
direction | string | inbound or outbound |
status | string | See Call Statuses |
started_at | datetime | When the call connected |
ended_at | datetime | When the call ended |
duration_seconds | integer | Total call length |
cost_usd | float | Billed cost |
summary | string | AI-generated call summary |
recording_url | string | Recording URL (if enabled and available) |
context | object | Any metadata stored on the call |
created_at | datetime | When the call was created |
updated_at | datetime | Last updated |
Call Statuses
| Status | Description |
|---|---|
queued | Call created, waiting to be placed |
ringing | Call is ringing the destination |
in_progress | Call is active and connected |
completed | Call ended normally |
failed | Call could not be placed (check context.last_error) |
no_answer | Callee did not answer |
busy | Callee line was busy |
voicemail | Call went to voicemail |
Errors
| HTTP Status | Code | Meaning |
|---|---|---|
422 | validation_error | Invalid request — missing agent_id, invalid phone number, or no outbound number assigned to the agent |
402 | payment_required | Insufficient credits or inactive subscription |
502 | provider_error | Telephony or voice provider error |
status: "failed". The provider error message is stored in context.last_error. Fix the underlying issue and retry.
