04 April 2019

One API: Send templated message

04 April 2019
clock
3 minutes

For the delivery of outbound transactional messages or re-engagement messages, a templated message format is required. This message is defined as a Highly Structured Message (HSM) message type. All the same text formatting will apply to templated messages as well.

Please ensure that the template reference is pre-approved for your business before use.

When sending a template message, you need to specify the template reference and associated parameter values of your template within the HSM array. Please note that the parameters in your template are in a sequential order beginning at {{1}}. Template parameters cannot have new-line/tab characters or more than four consecutive spaces in order for them not to be rejected by WhatsApp.

Message limitations

  • All re-engagement messages will be sent using a pre-approved templated message to the consumer
  • Using freeform text for this message type will result in a failure to deliver

Sample template message: Hello {{1}}. This is a demo welcome message from {{2}}.

Sample template reference: welcome_notification_demo

Request headers

POST /v1/message
Content-Type: application/json
Authorization: Your API KEY

JSON Request


{
    "messages":[
       {
          "to":"2799900001",
          "channel": "whatsapp",
          "hsm" : {
             "template":"welcome_notification_demo",
             "parameters" : {
                "1":"John",
                "2":" Clickatell"
             }
          }
       }
    ]
 }

Response

HTTP 202
{
 "messages": [
   {
    "apiMessageId": "77fb29998253415fa5d66971d519d362",
    "accepted": true,
    "to": "2799900001",
    "error": null
   }
  ],
  "error": null
}

The following message will be received on the phone:

Hello John. This is a demo welcome message from Clickatell

Featured Insight Circle post

Reclaiming Billions in the Digital Economy: James Ronca

Related blogs posts

Reclaiming Billions in the Digital Economy: James Ronca
The 2020s: Decade of Dynamic Payments
Life will never be the same

About Clickatell

Todays’ consumers spend more time on chat like text, Instagram, Facebook Messenger, and WhatsApp than apps, and they expect a high degree of convenience in the way brands serve them. Clickatell makes it possible for brands and consumers to engage and transact via mobile chat and digital channels with industry-leading communications commerce platforms and solutions. With offices in San Francisco, Toronto, Cape Town, and Lagos, Clickatell serves more than 15,000 global brands, ranging from Fortune 500 organizations to well-known consumer brands and small businesses in over 220 countries worldwide.

Read more about Clickatell

Related blogs posts

Reclaiming Billions in the Digital Economy: James Ronca
The 2020s: Decade of Dynamic Payments
Life will never be the same

This website uses cookies to allow us to see how the site is used. The cookies cannot identify you. If you continue to use this site we will assume that you are happy with this. If you want to use the site without cookies or would like to know more, you can do that here.