Voice API
The Voice API gives you programmatic control over voice interactions — start calls, check status, retrieve recordings, and manage sessions. Use it to build custom voice experiences in your applications.Authentication
All voice API endpoints require a Bearer token:Endpoints
Start an Outbound Call
POST/voice/outbound/dial
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Voice agent to use |
to_number | string | Yes | Destination number (E.164) |
from_number | string | Yes | Caller ID (must be verified) |
context | object | No | Data passed to agent’s prompt |
max_duration | integer | No | Max call length in seconds (default: 600) |
recording | boolean | No | Record the call |
scheduled_at | string | No | ISO 8601 timestamp for scheduled call |
webhook_url | string | No | URL for call status events |
Start a Voice Session (WebRTC)
POST/voice/start
Creates a WebRTC session for browser-based voice:
token and livekit_url to connect via WebRTC.
Get Session Status
GET/voice/status/{session_id}
List Voice Sessions
GET/voice/sessions
| Parameter | Type | Description |
|---|---|---|
agent_id | string | Filter by agent |
status | string | Filter by status (completed, failed, in_progress) |
limit | integer | Results per page (default: 20, max: 100) |
offset | integer | Pagination offset |
start_date | string | Filter from date (ISO 8601) |
end_date | string | Filter until date (ISO 8601) |
Get Session Details
GET/voice/sessions/{session_id}
Get Session Transcript
GET/v1/widget/transcript/{session_id}
Get Recording
GET/voice/recording/{recording_id}
Returns the recording details:
End a Voice Session
POST/voice/end/{session_id}
Webhook Events
If you provide awebhook_url when starting a call, you’ll receive POST requests with call status updates:
Event Types
| Event | Description |
|---|---|
call.initiating | Call is being set up |
call.ringing | Phone is ringing |
call.in_progress | Call connected, conversation active |
call.completed | Call ended normally |
call.failed | Call failed to connect |
call.no_answer | No answer after timeout |
Integration Example: Appointment Reminders
Rate Limits
| Endpoint | Rate |
|---|---|
| Start call | 10/min |
| Voice session | 30/min |
| Get status | 60/min |
| List sessions | 30/min |
Best Practices
- Set
max_durationto prevent unexpectedly long calls - Use
contextto personalize the agent’s greeting and behavior - Enable recording for compliance and quality review
- Handle webhook events for real-time call tracking
- Use scheduled calls for time-sensitive outreach (reminders, follow-ups)

