> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pocketflows.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send an SMS based off an SMS template



## OpenAPI

````yaml /openapi.json post /sms_templates/{id}/send
openapi: 3.0.3
info:
  title: Pocketflows API
  version: 0.0.4
servers:
  - url: https://api.pocketflows.com
    description: Production server
security:
  - HttpBasicAuth: []
paths:
  /sms_templates/{id}/send:
    post:
      tags:
        - Sms messages
      summary: Send an SMS based off an SMS template
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: The ID of the SMS template
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    from:
                      type: string
                      description: The ID of the phone number from which to send the SMS
                    to:
                      type: string
                      description: The phone number to send the SMS to
                    variables:
                      type: object
                      additionalProperties: true
                      description: The variables to be injected into the SMS template
                  required:
                    - from
                    - to
                - type: object
                  properties:
                    from:
                      type: string
                      description: The ID of the phone number from which to send the SMS
                    customer:
                      type: string
                      description: The ID of the customer to send the SMS to
                    variables:
                      type: object
                      additionalProperties: true
                      description: >-
                        The variables to be injected into the SMS template in
                        addition to the variables already induced by the
                        customer
                  required:
                    - from
                    - customer
      responses:
        '200':
          description: The resulting `SentSmsMessage` object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentSMSMessage'
components:
  schemas:
    SentSMSMessage:
      type: object
      properties:
        id:
          type: string
          description: The ID of the sent SMS message
        created_at:
          type: string
          description: The time when the SMS was created in ISO 8601 format
        customer:
          type: string
          nullable: true
          description: The ID of the customer that was sent the SMS message
        business:
          type: string
          nullable: true
          description: The ID of the business that sent the text message
        to_phone_number:
          type: string
          description: The phone number the SMS was sent to
        message:
          type: string
          description: The content of the SMS message
        mms:
          type: boolean
          description: Whether the text message went over MMS, e.g. included an image
        num_segments:
          type: number
          description: The number of text segments used
        sent_at:
          type: string
          nullable: true
          description: The time when the SMS was sent in ISO 8601 format
        twilio_message_sid:
          type: string
          description: Twilio's returned message SID
        telgorithm_message_sid:
          type: string
          description: Telgorithm's returned message SID
        campaign:
          type: string
          description: >-
            The ID of the campaign that sent the SMS message. Only present if
            the SMS message was sent as part of a campaign
        trigger:
          type: string
          description: >-
            The ID of the trigger that sent the SMS message. Only present if the
            SMS message was sent as part of a trigger
      required:
        - id
        - created_at
        - customer
        - business
        - to_phone_number
        - message
        - mms
        - num_segments
        - sent_at
      title: The Sent SMS Message object
  securitySchemes:
    HttpBasicAuth:
      type: http
      scheme: basic

````