send_sms
Send an outbound message to a PSTN phone number.
Parameters
Name | Type | Description |
---|---|---|
to_number | string | Phone number to send SMS message to in e.164 format. Required. |
from_number | string | Phone number SMS message will be sent from. Required. |
body | string | Body of the message. Required unless media is included. |
media | string [] | Array of media URLs to include in the message. Required unless body is included. |
region | string | Region of the world to originate the message from. A default is picked based on account preferences or device location. Optional. |
tags | string [] | Array of tags to associate with the message to facilitate log searches. Optional. |
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:
tags:
- Custom
- data
region: us
from_number: "+155512312345"
to_number: "+15555554321"
body: Message Body
media:
- url1
- url2
{
"version": "1.0.0",
"sections": {
"main": [
{
"send_sms": {
"tags": ["Custom", "data"],
"region": "us",
"from_number": "+155512312345",
"to_number": "+15555554321",
"body": "Message Body",
"media": ["url1", "url2"]
}
}
]
}
}