Twilio
API actions for the Twilio integration.
Twilio
Send text messages, check delivery details, and review your recent message history with Twilio.
Get message details
Look up the delivery status and details of a message you sent or received, including why it failed if it did not go through.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
message_sid | string | Yes | The unique ID of the message to look up (starts with SM). You get this back when you send a message. |
Response
{
"body": "Your appointment is confirmed for tomorrow at 2pm.",
"date_sent": "2024-01-15 18:30:05+00:00",
"error_message": null,
"from": "+15551234567",
"message_status": "delivered",
"sid": "SM0a1b2c3d4e5f60718293a4b5c6d7e8f90",
"to": "+15558675310"
}List recent messages
List your recent text messages, newest first. You can narrow the results to a specific recipient or sender.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to_number | string | No | Only include messages sent to this phone number. Leave empty to include all recipients. |
from_number | string | No | Only include messages sent from this Twilio phone number or messaging service. Leave empty to include all senders. |
limit | number | No | How many messages to return, from 1 to 100. Defaults to 20. |
Response
{
"messages": [
{
"body": "Your appointment is confirmed for tomorrow at 2pm.",
"from": "+15551234567",
"message_status": "delivered",
"sid": "SM0a1b2c3d4e5f60718293a4b5c6d7e8f90",
"to": "+15558675310"
}
]
}Send a text message
Send a text (SMS) message to a phone number from your Twilio phone number or messaging service.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to_number | string | Yes | The phone number to text, including the country code (for example, +15551234567). |
from_number | string | Yes | Your Twilio phone number (in +15551234567 format) or a Messaging Service SID (starts with MG) to send from. |
body | string | Yes | The text of the message to send. |
Response
{
"from": "+15551234567",
"message_status": "queued",
"sid": "SM0a1b2c3d4e5f60718293a4b5c6d7e8f90",
"to": "+15558675310"
}