send_sms
Send an outbound message to a PSTN phone number.
Parameters
Name | Type | Required? | Default | Description |
---|---|---|---|---|
to_number | string | Required | Phone number to send SMS message to in e.164 format | |
from_number | string | Required | Phone number SMS message will be sent from | |
body | string | Required unless media is included | Body of the message | |
media | string[] | Required unless body is included | Array of media URLs to include in the message | |
region | string | Optional | picked based on account preferences or device location | Region of the world to originate the message from |
tags | string[] | Optional | 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."
}
}
]
}
}