calls resource is available since @zavudev/sdk 0.56.0.
Place a Call
to is the only required field. The sender’s agent must have voice.enabled: true.
With Overrides
greeting, language, and maxDurationMinutes override the agent’s configuration for this call only. metadata is returned on the call object and included in voice webhooks.
queued while it starts dialing. Track progress via the call.initiated, call.answered, call.completed, and call.failed webhook events, or by polling calls.retrieve.
Get a Call and Its Transcript
Fetching a single call includes the full transcript once the conversation has produced turns. Each turn is{ seq, role, text } where role is user, assistant, or tool.
durationSeconds, endReason, turnCount, and cost populate once the call ends. cost is the total in USD, combining the managed voice pipeline and telephony.
List Calls
Transcripts are omitted from list responses — fetch a single call to get one. The list auto-paginates:Hang Up a Call
Ends an active call. The call must still beringing or in_progress; anything else returns an error.
Requirements and Errors
- The sender’s agent needs
voice.enabled: true, orcreatefails with400 "The sender's agent does not have voice enabled". - Placing and hanging up calls is not available with test-mode API keys; reads are.
- Calls are billed per connected minute plus telephony from your prepaid balance.
402 insufficient_balancemeans the balance cannot cover the call.
Related
- Voice Agents overview — configuring the agent that answers
- Voice webhooks —
call.*event payloads
