API to send a WhatsApp templated message to recipient

Note:
WhatsApp template messages can be sent only to regular WhatsApp users. In other words, you can't send the template message to a business account on WhatsApp. If you are testing WhatsApp templated message API please use your personal WhatsApp phone number instead of your business phone number on Connectly.

Select the WhatsApp number you want to send from

The endpoint supports an optional sender field in the body. If you have multiple WhatsApp phone numbers with Connectly you can choose which one you want to send the message from. The payload needs to contain the optional sender key specifying the phone number.

{
     "sender": "+14151111234",
     "number": "+1(604) 585 2331",
     "templateName": "tempalte",
     "language": "en",
     "parameters": []
}

How to use template parameters

The template parameters is a list of objects in the following format:

"parameters": [
{
   "name": "body_1",
   "value": "YOUR_VALUE"
}, {
   "name": "body_2",
   "value": "YOUR_VALUE"
}, {
   "name": "body_3",
   "value": "YOUR_VALUE"
]

The available options for name keys

Header

  1. header_text - indicates text in the header
  2. header_image - indicates image in the header. The value must be a valid URL with an image
  3. header_video - indicates video in the header. The value must be a valid URL with a video

Body

  1. body_1 - indicates text in the body
  2. body_2 - indicates text in the body
  3. body_3 - indicates text in the body
  4. body_4 - indicates text in the body
  5. body_5 - indicates text in the body
  6. body_6 - indicates text in the body
  7. body_7 - indicates text in the body
  8. body_8 - indicates text in the body
  9. body_9 - indicates text in the body
  10. body_10 - indicates text in the body
  11. body_11 - indicates text in the body
  12. body_12 - indicates text in the body
  13. body_13 - indicates text in the body
  14. body_14 - indicates text in the body
  15. body_15 - indicates text in the body

Buttons

  1. button_1_url - indicates URL link in the button. The value must be a valid URL
  2. button_2_url - indicates URL link in the button. The value must be a valid URL
  3. button_3_url - indicates URL link in the button. The value must be a valid URL
  4. button_1_payload - indicates Payload in the button
  5. button_2_payload - indicates Payload in the button
  6. button_3_payload - indicates Payload in the button

Supported template languages

Please see https://developers.facebook.com/docs/whatsapp/api/messages/message-templates/#message-templates for all supported template languages. Your template MUST be approved first for the language variation before you can start using it.

How to create a template

Please see the instructions here https://www.facebook.com/business/help/2055875911147364?id=2129163877102343.

Language
Authorization
Header
Click Try It! to start a request and see the response here!