Use this service to create a new WhatsApp template.
curl --location --request POST 'go.botmaker.com/api/v1.0/waTemplates/' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'access-token: ACCESS-TOKEN' \
--data-raw '{
"buttons": [],
"optInImage": "https://storage.googleapis.com/m-infra.appspot.com/public/res/SoporteBotmaker/20210818-hnFCAbAtiaVneNafwub7cBZaFPS2-UUHZ3-.png",
"locale": "es_AR",
"content": "Hola, gracias por todo",
"mediaHeaderText": "",
"mediaFooterText": "",
"name": "test_create_temp_API",
"mediaHeaderType": "image",
"category": "Account Update"
}
'
buttonslocalecategoryoptInImagecontentThese buttons are used to trigger an intent inside the bot, or to send a text message if you are an API customer. You can create up to 3.
If you are an API customer, fill in the following fields:
text: The label displayed on the button.type: Must be set to QUICK_REPLY.responseId: The message the bot replies with when the button is pressed.If you are not an API customer:
text: The label displayed on the button.type: Must be set to QUICK_REPLY.intent: The ID of the intent to trigger.Notes for API customers
You can use buttons to send the responseId defined in the webhook you configured in Botmaker whenever users click. This lets you track when users click each option and program automatic replies or sends in your own system based on the responseId you receive.
Note: The responseId field does not accept variables. It should only be used with text messages.
Non-API example:
"buttons": [
{
"text": "sentado",
"type": "QUICK_REPLY",
"intent": "BotmakerTesting-327f05674554c@bm.com-1611242990470",
"responseId": ""
},
],
API example:
"buttons": [
{
"text": "sentado",
"type": "QUICK_REPLY",
"intent": "",
"responseId": "hola"
},
],
These buttons let you add options that either place a call to a phone number or take the user to a URL. Neither of these two types can be combined with a QUICK_REPLY button. In this case you cannot have more than 2 buttons.
For a call button, the fields are:
phone_number: The phone number to call.text: The button label.type: The button type — in this case, PHONE_NUMBER.For a URL button:
url: The URL of the page the user will be sent to.text: The button label.type: The button type — in this case, URL.For example:
"buttons": [
{
"phone_number": "+5491155640000",
"text": "Llamar a Soporte",
"type": "PHONE_NUMBER"
},
{
"text": "Ir a google",
"type": "URL",
"url": "www.google.com"
}
],
Example of an invalid setup. Button types cannot be mixed:
"buttons": [
{
"text": "Saludo",
"type": "QUICK_REPLY",
"intent": "BotmakerTesting-327f0567455b4c@bm.com-1611242990470",
"responseId": ""
},
{
"text": "Ir a google",
"type": "URL",
"url": "www.google.com"
}
],
locale refers to the template language and is validated against the following list.
Supported languages:
af,
sq,
ar,
az,
bn,
bg,
ca,
zh_CN,
zh_HK,
zh_TW,
hr,
cs,
da,
en,
en_GB,
en_US,
et,
fi,
fr,
de,
el,
gu,
he,
hi,
hu,
id,
fil,
ga,
it,
ja,
kn,
kk,
ko,
lo,
lv,
lt,
mk,
ms,
mr,
nb,
fa,
pl,
pt_BR,
pt_PT,
pa,
ro,
ru,
es,
es_AR,
es_MX,
es_ES
}
The template category. It can be any of the following:
ACCOUNT_UPDATE,
PAYMENT_UPDATE,
PERSONAL_FINANCE_UPDATE,
SHIPPING_UPDATE,
RESERVATION_UPDATE,
ISSUE_RESOLUTION,
APPOINTMENT_UPDATE,
TRANSPORTATION_UPDATE,
TICKET_UPDATE,
ALERT_UPDATE,
AUTO_REPLY
Important: pass a link to an image containing the opt-in to the optInImage field.
What is the opt-in?
It's an image showing a form template that demonstrates that customers are being asked for consent — on some page or app — to receive proactive messages via WhatsApp.
Remember: you have a limit of 1,024 characters, or 160 characters if the template includes a header or footer. The content cannot include new lines, tabs, or more than four consecutive spaces.
Text can be formatted as:
$ and contain the variable name inside curly braces, as in the following example: ${nombre}Once the template is created, it moves through several statuses until it is finally approved.
Statuses:
Remember to visit our Help Center for further information.