POST
/calls/initiateInitiate a Call
Start an AI-powered voice call to a specified phone number.
Request
const call = await client.calls.initiate({ to: '+1234567890', agentId: 'agent-uuid', metadata: { customerId: 'cust_123', campaign: 'summer-sale' }});Parameters
| Parameter | Type | Description |
|---|---|---|
| to | string | Phone number in E.164 format |
| agentId | string | ID of the AI agent to use |
| metadata | object | Optional custom metadata |
GET
/calls/:idGet Call Details
Retrieve information about a specific call.
const call = await client.calls.get('call-uuid');console.log(call.status); // 'in-progress' | 'completed' | 'failed'console.log(call.duration); // Duration in secondsPOST
/calls/:id/endEnd a Call
Terminate an active call.
await client.calls.end('call-uuid');GET
/logs/:idGet Call Transcript
Retrieve the transcript of a completed call.
const transcript = await client.calls.transcript('call-uuid');console.log(transcript.messages); // Array of conversation messages