
You made a purchase for {{1}} using a credit card ending in {{2}}.
ℹ️ Are you ready to submit your message templates for approval? Use our Message Template API or the Message Template Manager on your tyntec dashboard. Check more details in our next section: Submitting a message template.
ℹ️ Message Templates cannot be renamed or edited once submitted so you would need to submit a new Message Template every time you’d like to make changes.
WhatsApp supports message templates in nearly 70 languages and idiom variations, e.g., American and British English.
Since WhatsApp does not perform any translations for your business, you need to provide all message template translations.
When sending a message template from the WhatsApp Business API, you need to specify the language you would like the message template to display using the language field. That means you need to submit a Message Template for each language chosen by you. Please make sure that you do NOT mix languages in your message template!
ℹ️ Check all supported languages and respective codes.
When creating the copy that will form your template content, here are some things to keep in mind:
Dynamic variables - also known as placeholders, parameters, or substitutions - allow you to pass dynamic contents to the message while requesting message templates you can specify the dynamic variable like {{1}}, {{2}}. By adding unique parameters, you can personalize information for your customers.
For example, in the template below you can replace {{1}} and {{2}] with your own value when sending a message.
You made a purchase for {{1}} using a credit card ending in {{2}}.
For "namespace": "cdb2df51_9816_c754_c5a4_64cdabdcad3e" with "element_name": "purchase_with_credit_card", the first value you list replaces the {{1}} variable in the template message and the second value you list replaces the {{2}} variable.
Some of these parameters (e.g., date_time or currency) are localizable so they are displayed appropriately based on the customer's language and locale preferences. If the device is unsuccessful in localizing a parameter, it falls back to the value that is provided as the "default" value.
When a message request is submitted with a template, you specify the variables, which are textually replaced inside the WhatsApp installation we run for a phone number.
ℹ️ Note that the actual variable content cannot contain newlines, tabulators, and more than four consecutive spaces. Also, WhatsApp will not approve templates with floating parameters, i.e. lines with just parameters and without text. Make sure that you surround the variables with context, so it’s clear what type of data is inserted in the Message Template.
ℹ️ Check the tutorial on how to send a message with variables here.
With tyntec, you can embed media on your message templates at no extra cost.
To add media to your message template, you will have to:
The media component will be sent directly to the user, being uploaded on your server.
We provide the following media types on message templates:
Media type | Supported format | Supported size | Caption length |
---|---|---|---|
Images | JPG, PNG | Up to 5MB | Up 4096 characters |
Documents | Any valid MIME-type | Up to 100MB | Up 4096 characters |
Videos | MP4, 3GPP | Up to 16MB | Up 4096 characters |
Locations | Latitude, longitude, location name, address | n/a | n/a |
Buttons: Call-to-action | 2 buttons | n/a | 20 characters per button |
Buttons: quick-reply | 3 buttons | n/a | 20 characters per button |
ℹ️Check all the content types and their specifications here.
Once you have selected “media message template”, you should specify the following:
Footer text (optional): in case you need to add a disclaimer, signature, or anything
ℹ️ Sending media samples for your media message template approval
Using the tyntec dashboard: you have to declare what type of media you send in the header. Then, send an email to onboarding@tyntec.com to provide the media sample.
Using the Message Template API: you can submit the media sample directly on the API. – image, video, location, document, text - and add a media sample for approval.
curl –XPOST https://api.tyntec.com/conversations/v3/messages\ -H 'Content-Type: application/json' \ -H 'apikey: <API KEY>' \ -d '' { "from" : "{{whatsAppBusinessNumber}}", "to" : "{{receiverPhoneNumber}}", "channel" : "whatsapp", "content" : { "contentType" : "template", "template" : { "templateId" : "{{whatsAppTemplateName}}", "templateLanguage" : "{{whatsAppTemplateLanguage}}", "components" : { "header" : [ { "type": "image", "image" : { "url": "https://upload.wikimedia.org/wikipedia/commons/6/6c/Sample_EPC_QR_code.png" } } ], "body" : [ { "type": "text", "text": "User" }, { "type": "text", "text": "Additional Variable" }, { "type": "text", "text": "And a third one" } ] } } } }
curl –XPOST https://api.tyntec.com/conversations/v3/messages\ -H 'Content-Type: application/json' \ -H 'apikey: <API KEY>' \ -d '' { "from" : "{{whatsAppBusinessNumber}}", "to" : "{{receiverPhoneNumber}}", "channel" : "whatsapp", "content" : { "contentType" : "template", "template" : { "templateId" : "{{whatsAppTemplateName}}", "templateLanguage" : "{{whatsAppTemplateLanguage}}", "components" : { "header" : [ { "type": "document", "document" : { "url": "https://s1.q4cdn.com/806093406/files/doc_downloads/test.pdf" } } ], "body" : [ { "type": "text", "text": "User" }, { "type": "text", "text": "2nd Parameter" } ] } } } }
curl –XPOST https://api.tyntec.com/conversations/v3/messages\ -H 'Content-Type: application/json' \ -H 'apikey: <API KEY>' \ -d '' { "from" : "{{whatsAppBusinessNumber}}", "to" : "{{receiverPhoneNumber}}", "channel" : "whatsapp", "content" : { "contentType" : "template", "template" : { "templateId" : "{{whatsAppTemplateName}}", "templateLanguage" : "{{whatsAppTemplateLanguage}}", "components" : { "header" : [ { "type": "video", "video" : { "url": "http://techslides.com/demos/sample-videos/small.mp4" } } ], "body" : [ { "type": "text", "text": "User" }, { "type": "text", "text": "Additional Variable" } ] } } } }
curl –XPOST https://api.tyntec.com/conversations/v3/messages\ -H 'Content-Type: application/json' \ -H 'apikey: <API KEY>' \ -d '' { "from" : "{{whatsAppBusinessNumber}}", "to" : "{{receiverPhoneNumber}}", "channel" : "whatsapp", "content" : { "contentType" : "template", "template" : { "templateId" : "{{whatsAppTemplateName}}", "templateLanguage" : "{{whatsAppTemplateLanguage}}", "components" : { "header" : [ { "location" : { "longitude" : 7.4954884, "latitude" : 51.5005765, "name" : "tyntec GmbH", "address" : "tyntec GmbH, Semerteichstraße, Dortmund" }, "type":"location" } ], "body" : [ { "type": "text", "text": "User" }, { "type": "text", "text": "Additional Variable" }, { "type": "text", "text": "And a third one" } ] } } } }
curl –XPOST https://api.tyntec.com/conversations/v3/messages\ -H 'Content-Type: application/json' \ -H 'apikey: <API KEY>' \ -d '' { "from" : "{{whatsAppBusinessNumber}}", "to" : "{{receiverPhoneNumber}}", "channel" : "whatsapp", "content" : { "contentType" : "template", "template" : { "templateId" : "{{whatsAppTemplateName}}", "templateLanguage" : "{{whatsAppTemplateLanguage}}", "components" : { "body" : [ { "type": "text", "text": "User" }, { "type": "text", "text": "Additional Variable" } ], "button" : [ { "type" : "url", "index": 1, "text" : "test" } ] } } } }
curl –XPOST https://api.tyntec.com/conversations/v3/messages\ -H 'Content-Type: application/json' \ -H 'apikey: <API KEY>' \ -d '' { "from" : "{{whatsAppBusinessNumber}}", "to" : "{{receiverPhoneNumber}}", "channel" : "whatsapp", "content" : { "contentType" : "template", "template" : { "templateId" : "{{whatsAppTemplateName}}", "templateLanguage" : "{{whatsAppTemplateLanguage}}", "components" : { "body" : [ { "type": "text", "text": "User" } ], "button" : [ { "type" : "quick_reply", "index": 0, "payload" : "event-id" }, { "type" : "quick_reply", "index": 1, "payload" : "event-id" }, { "type" : "quick_reply", "index": 2, "payload" : "event-id" } ] } } } }