Skip to content
Navigation

Update a template

Updates a template. With PUT, send every required field. Send PATCH instead to change only the fields you include.

PUT
https://app.touchsms.com.au/api/v2/templates/{template}

Authorization

  • basicAuth
    HTTP
    required

Path parameters

  • template
    integer
    required

    Template ID.

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

200

The updated 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

404

The resource does not exist.
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