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
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, unless media is included | string | Body of the message | |
media Required, unless body is included | string[] | Array of media URLs to include in the 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 |
Variables
Set by the method:
- send_sms_result: (out)
success
|failed
.
Examples
Send an SMS
- 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."
}
}
]
}
}