Skip to main content
The Voice API provides endpoints for managing calls, transfers, and Twilio integration.

Endpoints Overview

MethodEndpointDescription
GET/v1/voice/tokenGet Twilio access token
POST/v1/voice/twimlGenerate TwiML for calls
POST/v1/callsInitiate an outbound call
GET/v1/calls/:callSidGet call details
POST/v1/calls/:callSid/transferInitiate transfer
POST/v1/calls/:callSid/transfer/completeComplete warm transfer
POST/v1/calls/:callSid/transfer/cancelCancel warm transfer
POST/v1/calls/:callSid/holdToggle hold
POST/v1/calls/:callSid/muteToggle mute
GET/v1/callsList calls
POST/v1/recordingsStart recording
GET/v1/recordings/:recordingSidGet recording
POST/v1/caller-idsProvision caller ID
GET/v1/caller-idsList caller IDs

Get Twilio Token

Generate a JWT for the Twilio Voice SDK:
GET /v1/voice/token
Authorization: Bearer <access_token>
Response:
{
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "identity": "agent_user_123",
    "ttl": 3600
  }
}

Initiate Outbound Call

POST /v1/calls
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "to": "+14155551234",
  "from": "+14155559876",
  "workspaceId": "ws_abc123"
}
Response:
{
  "data": {
    "callSid": "CAabc123...",
    "status": "initiated",
    "direction": "outbound",
    "to": "+14155551234",
    "from": "+14155559876"
  }
}

Transfer Call

POST /v1/calls/:callSid/transfer
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "target": "+14155551234",
  "type": "warm"
}

Hold/Unhold

POST /v1/calls/:callSid/hold
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "action": "hold"  // or "unhold"
}

List Calls

GET /v1/calls?workspaceId=ws_abc123&limit=20
Authorization: Bearer <access_token>
All /v1/calls/* endpoints require the caller to be the agent participant in the conference.