Templates · Messaging
Twilio Messaging API collection template
Send SMS, list messages and start calls with the Twilio REST API.
What's inside
Send an SMS, read the messages of your account, start a phone call and check the account with Twilio. Trial accounts can send only to verified numbers.
5 requests in 2 folders · Base URL https://api.twilio.com/2010-04-01 · Basic auth
Set it up
- Open Twilio Messaging API in Requestarium (or in the app: Import, Start from a template) and import it. You get the collection and a "Twilio Messaging API" environment.
- Copy the Account SID and Auth Token from the Twilio Console, and buy or use a trial phone number for From.
- Fill in the environment, pick it in the environment menu and send the first request.
Environment variables
| Variable | What it is |
|---|---|
twilioAccountSid | Account SID, AC… |
twilioAuthTokensecret | Auth Token. |
fromNumber | Your Twilio number in E.164, like +15005550006. |
toNumber | Where to send, in E.164. |
messageSid | Filled by "Send an SMS". |
Requests
Messages
- POSTSend an SMS
/Accounts/{{twilioAccountSid}}/Messages.jsonSends a text and saves its sid.
- GETFetch a message
/Accounts/{{twilioAccountSid}}/Messages/{{messageSid}}.jsonDelivery status of the message.
- GETList messages
/Accounts/{{twilioAccountSid}}/Messages.jsonRecent messages of the account.
Voice and account
- POSTStart a call
/Accounts/{{twilioAccountSid}}/Calls.jsonCalls the number and plays Twilio's demo TwiML.
- GETFetch the account
/Accounts/{{twilioAccountSid}}.jsonAccount status; a quick way to check the credentials.