# Twilio API **Provider:** Twilio **Category:** communication **Base URL:** `https://api.twilio.com/2010-04-01` **Auth:** basic — `Authorization: Basic base64(AccountSID:AuthToken)` **Rate Limit:** 1 request/s per phone number **Free Tier:** Yes — [object Object] **Pricing:** Pay per use (pay-as-you-go) **Docs:** https://www.twilio.com/docs/usage/api ## Description Twilio's API platform powers communications for millions of developers. Send and receive SMS/MMS, make and receive voice calls, build IVR systems, send WhatsApp messages, verify phone numbers and users with OTP, and send transactional email via SendGrid (Twilio subsidiary). ## Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | POST | `https://api.twilio.com/2010-04-01/Accounts/{SID}/Messages.json` | Send an SMS or MMS message | | GET | `https://api.twilio.com/2010-04-01/Accounts/{SID}/Messages.json` | List messages | | POST | `https://api.twilio.com/2010-04-01/Accounts/{SID}/Calls.json` | Initiate a voice call | | POST | `https://api.twilio.com/2010-04-01/Accounts/{SID}/IncomingPhoneNumbers.json` | Buy a phone number | ## Authentication HTTP Basic Auth using your Account SID as username and Auth Token as password. ``` Authorization: Basic base64(AccountSID:AuthToken) ``` ## Sample Request ```bash curl -X POST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json \ -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \ --data-urlencode "To=+15005550006" \ --data-urlencode "From=+15017122661" \ --data-urlencode "Body=Hello from Twilio!" ``` ## Sample Response ```json { "sid": "SM87105da94bff44b999e4e6eb90d8eb6a", "status": "queued", "to": "+15005550006", "from": "+15017122661", "body": "Hello from Twilio!", "price": "-0.00750", "date_created": "Thu, 18 Jan 2024 12:00:00 +0000" } ``` ## Pricing Details SMS: $0.0079/message. Voice: $0.0085/min. WhatsApp: $0.005/message. Free trial includes $15 credit. Volume discounts available. --- *Source: [API Map](https://apimap.dev/apis/twilio/) — CC BY 4.0*