send_sms
Send an outbound message to a PSTN phone number.
Name | Type | Default | Description |
---|---|---|---|
send_sms Required | object | - | An object that accepts the send_sms parameters . |
send_sms Parameters
- SMS
- MMS
Name | Type | Default | Description |
---|---|---|---|
to_number Required | string | Phone number to send SMS message to in e.164 format | |
from_number Required | string | Phone number SMS message will be sent from | |
body Required | string | Body of the text message | |
region Optional | string | picked based on account preferences or device location | Region of the world to originate the message from |
tags Optional | string[] | Array of tags to associate with the message to facilitate log searches |
Name | Type | Default | Description |
---|---|---|---|
to_number Required | string | Phone number to send SMS message to in e.164 format | |
from_number Required | string | Phone number SMS message will be sent from | |
media Required | string[] | Array of media URLs to include in the message | |
body Optional | string | Optional text to accompany the media | |
region Optional | string | picked based on account preferences or device location | Region of the world to originate the message from |
tags Optional | string[] | Array of tags to associate with the message to facilitate log searches |
Variables
Set by the method:
- send_sms_result: (out)
success
|failed
.
Examples
- SMS
- MMS
Send a text-only message:
- YAML
- JSON
version: 1.0.0
sections:
main:
- send_sms:
from_number: "+155512312345"
to_number: "+15555554321"
body: "Hi, I hope you're well."
{
"version": "1.0.0",
"sections": {
"main": [
{
"send_sms": {
"from_number": "+155512312345",
"to_number": "+15555554321",
"body": "Hi, I hope you're well."
}
}
]
}
}
Send a message with media attachment:
- YAML
- JSON
version: 1.0.0
sections:
main:
- send_sms:
from_number: "+155512312345"
to_number: "+15555554321"
media: ["https://example.com/image.jpg"]
body: "Check out this image!"
{
"version": "1.0.0",
"sections": {
"main": [
{
"send_sms": {
"from_number": "+155512312345",
"to_number": "+15555554321",
"media": [
"https://example.com/image.jpg"
],
"body": "Check out this image!"
}
}
]
}
}