Send Multi Template
The send Multi Template allows you to send the same template to multiple destinations in a single request.
This endpoint is very similar to send a template, the only difference is that some body parameters are now part of an array, allowing you to send them all at once.
This page assumes you know how to handle bodyVariable1-10, websiteVariable/2 and couponCode and what they mean. for more reference, see the send a template endpoint first.
More Remarks
You can only send template messages to private people, not groups.
If you send a template message to the client, and the client did not reply yet, and you want to send another message to him, you must use the template message again.
If your template has variables, you must provide all variables data (inside bodyVariable parameter inside the destinations).
The entire template body + variables should not exceed 1024 characters.
sendMultiTemplate endpoint doesn't allow you to send authentication code template.
Settings:
URL | |
Method | JSON via POST |
Body:
Parameter | Description / Example | Mandatory |
|---|---|---|
apiKey | Your API key for the service | yes |
from | your WhatsApp account. international number without +. for example: 972771234567 | yes |
to | The number you want to send the message to. for example: 972501234567 | yes |
name | The template name | yes |
destinations | Array of objects that contains: to, bodyVariable1-10, websiteVariable, websiteVariable2 and couponCode It should be sent like this, depends on the variables you used when created the template. 'to' is required: [ { "to": "972501234567", "bodyVariable1": "Hello John", "bodyVariable2": "Special offer", "websiteVariable": "value1", "websiteVariable2": "value2", "couponCode": "SAVE20" }, { "to": "972507654321", "bodyVariable1": "Hello Jane", "bodyVariable2": "Different offer", "websiteVariable": "param1=value2", "websiteVariable2": "param1=value2", "couponCode": "SAVE30" } ] | yes |
headerType | 1 for none, 3 for image, 4 for video, 5 for document | yes |
headerLink | in case you used image/video/document header, this is the link for image or video or document limitation: image - 5 MB document - 100 MB video - 16 MB | only if you used 3/4/5 as headerType |
couponExpiration | in case you used coupon code in the template, and set 'true' for code expiration, here you put the GMT timestamp (seconds) for the date and time that the code will no longer be available.bare in mind that for Israel time you must add GMT+2 or GMT+3 | no |
pdfFilename | In case you used headerType as document, and provided a document link in headerLink, here you can put the filename that will show for the end user when receiving the PDF file. Priority: 1. if 'pdfFilename' is provided, it will be used. 2. if 'pdfFilename' is not provided by you, we will use the pdf file name from the headerLink URL directly. 3. if the headerLink filename is not available for any reason, we will put the default text: "קובץ מצורף - לחץ כאן" | no |
showRequest | You can get back in the response an object with all the request you sent (without the 'apiKey') default is off (0) 1 - enable | no |
localStorage | Whenever you provide headerLink url, we deliver this URL to WhatsApp. They download the link in order to deliver it with your template. If for any reason your file link is not accessible by Meta and open to the internet, you can request us to download the image and provide WhatsApp with alternative url to use, and not your own. This will download the file, save it in our servers locally, deliver a new link for WhatsApp to use and then remove the file instantly. default value is - 0 (disable) enable - 1
| no |
Body example:
A sample request to send a multi template to 2 numbers that has 3 body variables
{
"apiKey": "your-api-key",
"from": "your-whatsapp-number",
"name": "welcome_to_the_jungle",
"headerType": 1,
"destinations": [
{
"to": "972501234567",
"bodyVariable1": "one",
"bodyVariable2": "two",
"bodyVariable3": "three"
},
{
"to": "972509875654",
"bodyVariable1": "four",
"bodyVariable2": "five",
"bodyVariable3": "six"
}
],
"showRequest": 0
}
Response:
{
"status": "OK",
"timestamp": 1757610296,
"from": "your-whatsapp-number",
"destinations": [
{
"unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ",
"to": "972501234567",
"body": "שלום one! *מבצע חדש* על המוצרים שבחרת.\nבדקוone מחיר, דברו איתנו, או בחרו אפשרות מהירה."
},
{
"unique": "5ec46920d615hh3-x3c15a2dff350a1-3SIZZq8h9JVdA53",
"to": "972509876541",
"body": "שלום two! *מבצע חדש* על המוצרים שבחרת.\nבדקוtwo מחיר, דברו איתנו, או בחרו twoאפשרות מהירה."
}
],
"reason": 1
}
Response-Explain:
Parameter | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | OK or FAIL **Note: OK status doesn't mean the messages arrived to the end user. it only means that the system received your request. You should listen to webhooks to see the status of your message. | ||||||||||||||||||||||||||||
from | your WhatsApp account | ||||||||||||||||||||||||||||
timestamp | Timestamp of the sending | ||||||||||||||||||||||||||||
destinations | array that contains 3 keys unique - the unique message of the sending to - the number that the message was sent to body - the BODY of the template, including the variables | ||||||||||||||||||||||||||||
originalRequest | original request object, if you enabled this in 'showRequest' when sending the request. | ||||||||||||||||||||||||||||
reason | 'reason' is the status explanation in case of FAIL
|