Skip to content
Navigation

Create a template

Creates a message template. sender_id must be a sender ID your account can send from.

POST
https://app.touchsms.com.au/api/v2/templates

Authorization

  • basicAuth
    HTTP
    required

Request body JSON required

  • sender_id
    string
    required

    A sender ID your account can send from, e.g. a dedicated number in E.164 format or SHARED_NUMBER.

  • name
    string
    required
    maxLength: 255
  • message
    string
    required
  • subject
    optional
    string | null

    MMS subject.

    maxLength: 40

Returns

201

The created template.

JSON
  • data
    optional
    object
    • id
      optional
      integer
    • user
      optional
      integer | null

      ID of the user that owns the template. null on templates shared with your team.

    • name
      optional
      string
    • message
      optional
      string

      Template body. May contain merge fields such as {{firstname}}.

    • subject
      optional
      string | null

      MMS subject, up to 40 characters.

    • replies
      optional
      boolean

      Whether replies are enabled for messages sent with this template.

    • sender_id
      optional
      string | null

      Sender ID the template sends from.

    • updated
      optional
      string
      format: date-time
    • created
      optional
      string
      format: date-time

401

Missing, malformed or invalid API credentials.
JSON
  • message
    string
    required

403

The resource exists but does not belong to you, or you lack permission.
JSON
  • message
    string
    required

422

The request failed validation. errors lists the messages for each invalid field.
JSON
  • message
    optional
    string
  • errors
    optional
    map of
    array<string>

Type to search…

↑↓ navigate↵ selectEsc close