Twilio
App · Messaging · 3 actions
Send text messages, check delivery details, and review your recent message history with Twilio.
Actions
| Action | What it does |
|---|---|
| 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. |
| List recent messages | List your recent text messages, newest first. |
| Send a text message | Send a text (SMS) message to a phone number from your Twilio phone number or messaging service. |
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.
Inputs
- Message ID
message_sidtextRequired - The unique ID of the message to look up (starts with SM). You get this back when you send a message.
Outputs
bodytext- The text content of the message, or empty if the message carries only media.
date_senttext- When Twilio sent the message, or empty if it has not been sent yet.
error_messagetext- A description of what went wrong if the message failed, or empty if there was no error.
fromtext- The phone number the message was sent from.
message_statustext- Where the message is in delivery, such as queued, sending, sent, delivered, undelivered, or failed.
sidtext- The unique ID of the message.
totext- The phone number the message was sent to.
Example output
{
"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.
Inputs
- Sent to
to_numbertext - Only include messages sent to this phone number. Leave empty to include all recipients.
- Sent from
from_numbertext - Only include messages sent from this Twilio phone number. Leave empty to include all senders.
- Maximum results
limitnumber - How many messages to return, from 1 to 100. Defaults to 20.Default:
20.
Outputs
messageslist- The matching messages, newest first.
Example output
{
"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.
Inputs
- Send to
to_numbertextRequired - The phone number to text, including the country code (for example, +15551234567).
- Send from
from_numbertextRequired - Your Twilio phone number (in +15551234567 format) or a Messaging Service SID (starts with MG) to send from.
- Message
bodytextRequired - The text of the message to send.
Outputs
fromtext- The phone number or messaging service the message was sent from.
message_statustext- Where the message is in delivery, such as queued, sending, sent, delivered, or failed.
sidtext- The unique ID Twilio assigned to this message (starts with SM).
totext- The phone number the message was sent to.
Example output
{
"from": "+15551234567",
"message_status": "queued",
"sid": "SM0a1b2c3d4e5f60718293a4b5c6d7e8f90",
"to": "+15558675310"
}