Outbound SMS

Outbound SMS can be used to send out SMS messages from an Incoming Phone Number to any other phone number.

When a message has been sent out, an Engagement Request is created.

post
Send SMS

https://api.salemove.com/router/outbound_sms
Sends an SMS. Operator must have access to the Site that the Incoming Phone Number is assigned to on and have super_manager role.
Request
Response
Request
Headers
Authorization
required
string
Used to authenticate the Operator. Only Bearer token is allowed.
Content-Type
required
string
Must be application/json
Body Parameters
from_number
required
string
Phone number that the SMS is sent from. Note that this number must be assigned to a Site first.
to_number
required
string
Phone number that the SMS is sent to.
message
required
string
SMS content
webhooks
optional
array
See Webhooks section for more information. When SMS delivery fails, engagement.request.failure event is fired and when SMS has been delivered, engagement.request.deliver is fired.
Response
200: OK
SMS is being sent. Returns the Engagement Request ID for this message.
{
"engagement_request_id": "aeb06746-5ebd-441a-89cc-9a5840e6fa2c"
}
400: Bad Request
Request is invalid. This occurs when some of the required fields are missing or invalid.
{
"error": "Invalid request",
"details": {
"from_number": ["is invalid"]
}
}
401: Unauthorized
Operator is not authorized to send Outbound SMS. Occurs when Authorization header is missing/invalid, when Operator does not have access to the Site the Incoming Phone Number is assigned to or Operator's role is not super_manager.
{
"error": "Unauthorized",
"details": "Header \"Authorization\" is invalid"
}
403: Forbidden
Outbound SMS has not been enabled for the Site the Incoming Phone Number is assigned to.
{
"error": "This feature is not enabled for the site"
}
409: Conflict
Visitor receiving the SMS is already engaged. You cannot send Outbound SMS messages to engaged Visitors.
{
"error": "Visitor is already engaged"
}

Rate Limits

Outbound SMS has a rate limit of 1 request per second per Site.

Example

curl --request POST \
--header "Authorization: Bearer $access_token" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.salemove.v1+json" \
--data-binary '{
"from_number": "+14156433423",
"to_number": "+15316993461",
"message": "Hello!"
}' \
"https://api.salemove.com/router/outbound_sms"

The following example uses Glia API to acquire a bearer token and then it uses that token to send an SMS.

# Adquire bearer token using the API Token
# This assumes jq is intalled for parsing JSON responses.
bearer_token=$(curl --request POST \
--header "Accept: application/vnd.salemove.v1+json" \
--header "Content-Type: application/json" \
--data '{"api_token": "lDX...PHKJQ"}' \
"https://api.salemove.com/operator_authentication/tokens" \
| jq '.token' | sed 's/\"//g')
‚Äč
# Send SMS
curl --request POST \
--header "Authorization: Bearer $access__token" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.salemove.v1+json" \
--data-binary '{
"from_number": "+14156433423",
"to_number": "+15316993461",
"message": "Hello!"
}' \
"https://api.salemove.com/router/outbound_sms"