Skip to main content
POST
/
sms_templates
/
{id}
/
send
Send an SMS based off an SMS template
curl --request POST \
  --url https://api.pocketflows.com/sms_templates/{id}/send \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "from": "<string>",
  "to": "<string>",
  "variables": {}
}'
{
  "id": "<string>",
  "created_at": "<string>",
  "customer": "<string>",
  "to_phone_number": "<string>",
  "message": "<string>",
  "sent_at": "<string>",
  "twilio_message_sid": "<string>",
  "telgorithm_message_sid": "<string>",
  "campaign": "<string>",
  "trigger": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The ID of the SMS template

Body

application/json
  • Option 1
  • Option 2
from
string
required

The ID of the phone number from which to send the SMS

to
string
required

The phone number to send the SMS to

variables
object

The variables to be injected into the SMS template

Response

200 - application/json

The resulting SentSmsMessage object

id
string
required

The ID of the sent SMS message

created_at
string
required

The time when the SMS was created in ISO 8601 format

customer
string | null
required

The ID of the customer that was sent the SMS message

to_phone_number
string
required

The phone number the SMS was sent to

message
string
required

The content of the SMS message

sent_at
string | null
required

The time when the SMS was sent in ISO 8601 format

twilio_message_sid
string

Twilio's returned message SID

telgorithm_message_sid
string

Telgorithm's returned message SID

campaign
string

The ID of the campaign that sent the SMS message. Only present if the SMS message was sent as part of a campaign

trigger
string

The ID of the trigger that sent the SMS message. Only present if the SMS message was sent as part of a trigger