---
title: "Send an SMS based off an SMS template"
method: POST
path: "/sms_templates/{id}/send"
tags: ["Sms messages"]
---

# Send an SMS based off an SMS template

`POST /sms_templates/{id}/send`

## Path parameters

- `id` string, required

## Request body

- union
  - object
    - `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
  - object
    - `from` string, required — The ID of the phone number from which to send the SMS
    - `customer` string, required — The ID of the customer to send the SMS to
    - `variables` object — The variables to be injected into the SMS template in addition to the variables already induced by the customer

## Response `200`

The resulting `SentSmsMessage` object

- SentSMSMessage
  - `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, nullable, required — The ID of the customer that was sent the SMS message
  - `business` string, nullable, required — The ID of the business that sent the text message
  - `to_phone_number` string, required — The phone number the SMS was sent to
  - `message` string, required — The content of the SMS message
  - `mms` boolean, required — Whether the text message went over MMS, e.g. included an image
  - `num_segments` number, required — The number of text segments used
  - `sent_at` string, nullable, 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

---

[API](https://skmtc.dev/pocketflows/apis/pocketflows-api.md) · [All operations](https://skmtc.dev/pocketflows/apis/pocketflows-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pocketflows/pocketflows-api/revisions/26723490b96f/schema)
