Send template message
API to send a WhatsApp templated message to recipient
WhatsApp template messages can be sent only to personal WhatsApp accounts not WhatsApp API accounts. If you are testing WhatsApp templated message API please use your personal WhatsApp phone number instead of your business phone number on Connectly.
Make sure your personal WhatsApp account you are using for testing has accepted all of WhatsApps app and privacy updates
post
/v1/businesses/{businessId}/send/whatsapp_templated_messages

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.
1
{
2
"sender": "+14151111234",
3
"number": "+1(604) 585 2331",
4
"templateName": "tempalte",
5
"language": "en",
6
"parameters": []
7
}
Copied!

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.
1
{
2
"sender": "+14151111234",
3
"number": "+1(604) 585 2331",
4
"templateName": "tempalte",
5
"language": "en",
6
"parameters": []
7
}
Copied!

Template languages

Your template can have different language translations which is why you need to provide the language in the API call.
To see a list of available languages go to Meta's official documentation.​
Your template must have a language translation approved before you can use it for that specific language.
In most cases, the default template language is `en`.
Please see Meta Business Manager for the available templates and language translations.

How to use template parameters

The template parameters is a list of objects in the following format:
1
"parameters": [
2
{
3
"name": "body_1",
4
"value": "YOUR_VALUE"
5
}, {
6
"name": "body_2",
7
"value": "YOUR_VALUE"
8
}, {
9
"name": "body_3",
10
"value": "YOUR_VALUE"
11
]
Copied!

Available options for name keys

Header
  1. 1.
    header_text - indicates text in the header
  2. 2.
    header_image - indicates image in the header. The value must be a valid URL with an image
  3. 3.
    (Not available on WhatsApp Cloud API yet) header_video - indicates video in the header. The value must be a valid URL with a video
Body
  1. 1.
    body_1 - indicates text in the body
  2. 2.
    body_2 - indicates text in the body
  3. 3.
    body_3 - indicates text in the body
  4. 4.
    body_4 - indicates text in the body
  5. 5.
    body_5 - indicates text in the body
  6. 6.
    body_6 - indicates text in the body
  7. 7.
    body_7 - indicates text in the body
  8. 8.
    body_8 - indicates text in the body
  9. 9.
    body_9 - indicates text in the body
  10. 10.
    body_10 - indicates text in the body
  11. 11.
    body_11 - indicates text in the body
  12. 12.
    body_12 - indicates text in the body
  13. 13.
    body_13 - indicates text in the body
  14. 14.
    body_14 - indicates text in the body
  15. 15.
    body_15 - indicates text in the body
Buttons
  1. 1.
    button_1_url_suffix - indicates URL link in the button. The value must be a valid URL
  2. 2.
    button_2_url_suffix - indicates URL link in the button. The value must be a valid URL
  3. 3.
    button_3_url_suffix - indicates URL link in the button. The value must be a valid URL
  4. 4.
    button_1_payload - indicates Payload in the button
  5. 5.
    button_2_payload - indicates Payload in the button
  6. 6.
    button_3_payload - indicates Payload in the button

WhatsApp Message template

Please see the instructions here for instructions on how to create a WhatsApp message template.
​