Introduction

This document describes how to use the Twilio Rest API. Twilio Rest API is used for building communication methods such as message, phone calls, video conferencing and email functionality. Twilio API can also be used to query our metadata account, phone numbers, calls, text messages, and recordings.

Key Functions of the Twilio API:

  • Messaging: It allows the sending and receiving of SMS, MMS, notifications, and alerts.
  • Voice and Video: Helps to make video and voice calls.
  • Authentication: Allows adding of authentication methods such as 2FA and verification methods.
  • Email: Allows sending and receiving of email via the SendGrid feature.
  • Conversations and Chat: Can be used to build applications for customer support, live chats, and in-app messaging.

Base URL

This endpoint is used for making request to Twilio. All API calls start with this URL, followed by the specific resource paths of each endpoint.

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

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>

Subresources

Twilio Accounts have the following subresources. Click on a link to read the API documentation for accessing or modifying each resource:


Phone Numbers


Usage


Accounts


Applications



Make calls with Twilio

Twilio's Voice API enables you to make, retrieve, control, and monitor calls. Using this REST API, you can make outgoing calls, modify calls in progress, and query metadata about calls. See the Voice API Documentation for guides, REST resources, and troubleshooting tips.


Connect with SIP

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. Check out Twilio's SIP Resources for Voice Including SIP Domains, IP Access Control Lists, and Credential Lists.


Send messages with Twilio

With Twilio's Messaging API, you can send and receive SMS and MMS messages as well as query meta-data about text messages such as delivery status, and associated media, and leverage tools like Messaging Services to manage your messages globally at scale. Check out our Messaging API Documentation for guides, REST resources, and debugging tips.