Twilio Messaging API

Twilio's Messaging API makes it easy to send and receive SMS and MMS messages as well as query meta-data about text messages such as delivery status, associated media, and leverage tools like Copilot to manage your messages globally at scale.

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.

Messaging API Authentication

HTTP requests to the REST API are protected with HTTP Basic authentication. To learn more about how Twilio handles authentication, please see our security documentation. 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:

Retrieve your Twilio credentials from the console

For more information on authentication and interacting with the Twilio REST API, check out our documentation for requests to the API and Twilio's response.

Building with Twilio's Messaging API

Explore the Twilio Messaging API by checking out our quickstarts where you can learn how to add SMS and MMS capabilities to your web applications. Learn how to leverage Twilio's REST resources to:

Helper Libraries

While you can use the API directly to integrate SMS and MMS messaging into your application, we also support 6 common web languages with a helper library.  If you are using one of these languages, the quickest way to get started is by using the following libraries:

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.