Quickstart
This guide walks you through placing your first call with the Programmable Voice API in a few minutes.
Before you begin
You need:
- Your account SID and auth token, available from the dashboard.
- A phone number your account owns, to use as the caller ID (
From). - A destination number to call (
To). Your own phone works well for testing.
Make your first call
The following examples create an outbound call that speaks a short greeting. The call script is passed inline with Twiml, so no webhook server is required for this first call.
The response
A successful request returns 201 with the new call resource. The call starts in the queued status, and direction is outbound-api because it originated through the REST API rather than as an inbound call:
Code
Save the sid: it identifies this call in every subsequent request.
Verify the result
Fetch the call resource to check on its progress:
Code
The status field moves through the following values as the call progresses:
| Status | Meaning |
|---|---|
queued | The call has been accepted and is waiting to be placed. |
ringing | The destination phone is ringing. |
in-progress | The call was answered and is connected. |
completed | The call ended normally. |
If the destination does not answer within the ring timeout (60 seconds by default, configurable with the Timeout field on create-call), the status becomes no-answer instead of completed. Poll the call resource, or use a status callback to be notified of the transition instead of polling.
Next steps
- Receiving calls: handle inbound calls and build an IVR menu.
- OneML overview: every verb available for scripting a call.
- API reference: complete REST endpoint documentation.