Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Voice API

Twilio's Voice API helps you to make, receive, and monitor calls around the world.

Using this REST API, you can make outgoing calls, modify calls in progress, and query metadata about calls you've created. More advanced call features like programmatic call control, creating conference calls and call queues, and call recordings are at your fingertips with Twilio's Programmable Voice.

You can also use the API to route voice calls with global reach to phones, browsers, SIP domains, and mobile applications.

Base URL

All URLs referenced in the documentation have the following base:

https://api.twilio.com/2010-04-01

The Twilio REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

Voice API Authentication

HTTP requests to the REST API are protected with HTTP Basic authentication. To learn more about how Twilio handles authentication, please refer to our security documentation. In short, you will use your Twilio account SID as the username and your auth token as the password for HTTP Basic authentication.

curl -G https://api.twilio.com/2010-04-01/Accounts \
    -u '[YOUR ACCOUNT SID]:[YOUR AUTH TOKEN]'

You can find your account SID and auth token in your console.

To learn more about authentication and interaction with the Twilio REST API, check out our documentation for requests to the API and Twilio's response.

Make and manage calls with the Voice API

Twilio's Voice API lets you make and manage calls programmatically.

To make an outbound call with the API, POST to the Call resource.

You can also leverage the REST API to query metadata and manage state for:

Leverage the helper libraries and Voice SDKs to make and receive calls

Make, receive, and manage calls from any web interface or mobile application.

For step-by-step instructions on how to do this with one of our supported helper libraries or SDKs, check out the quickstarts for:

Programmatic call control

The basics of most call flows start with the ability to say strings of text and gather DTMF keypad input.

You can use the Voice API directly to create outbound calls and query and manage state for conferences, queues, and recordings.

Twilio's markup language, TwiML, is the primary language used to control actions on Twilio. For instance, you'll need to use TwiML's <Say> to read some text to a person on a Twilio call.

Twilio provides helper libraries in 6 supported web programming languages: C#/.NET, Java, Node.js, PHP, Python, and Ruby. These helper libraries make including TwiML in your web application a seamless process.

For instance, you can use one of our helper libraries to read some text to a caller and gather their input via keypad: select your language of choice to get started.

Conference calls & Queueing

Twilio's TwiML provides intelligent Conference and Queue primitives to take the heavy lifting out of building seamless call experiences:

Record calls

With Twilio's Voice API, you can record, store, and transcribe calls with a little bit of code:

Manage SIP calls with Twilio's API

Route calls from your existing VoIP infrastructure to Twilio for programmatic call control – without migrating hardware or carriers with SIP interface.

Programmable Voice SIP lets you route your voice calls with global reach to any landline phone, mobile phone, browser, mobile app, or any other SIP endpoint.

Build rich communications

Explore the power of Twilio's Voice API with our quickstarts, see how to make calls and respond to incoming calls, modify calls, and more by diving into our collection of tutorials for Programmable Voice.

Get help integrating the Voice API

Twilio's Voice API is a flexible building block that can take you from making your first phone call.

While we hope this page gives a good overview of what you can do with the API, we're only scratching the surface: check out our troubleshooting tips to learn about Twilio's debugging tools, common issues, and other tools and add-ons like Voice Insights.

If you need any help integrating the Programmable Voice API or want to talk best practices, please get in touch. You can give us feedback by using the rating widget on this page, talking to support, talking to sales, or reaching out on Twitter.

We can't wait to see what you build!

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.