One API: Send templated message

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

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