Send a WhatsApp template message
https://api.chat-data.com/ api/ v2/ send- whatsapp- template/ send-whatsapp-templateSends an approved template from the chatbot's official WhatsApp integration to one recipient. Use it to start a conversation, or to reach a customer whose last message is more than 24 hours old.
The message is added to the conversation with the recipient (created if needed), and the customer's reply continues in that same conversation, keyed by the canonical WhatsApp id returned in to. A lead is created for the recipient if there is none.
Values are checked before anything is sent: every slot listed in the template's variables needs a value, and values cannot be empty or contain line breaks, tabs or five or more spaces in a row. Copy-code values are at most 20 characters and one-time codes at most 15. Dynamic URL values are URL-encoded for you.
Quick-reply buttons need no value. A FLOW button is sent with a token that links the customer's form submission back to this message; pass template.flow.data to set the Flow's initial data. Media headers use the template's approved sample unless template.media gives a replacement.
Sends with the same idempotencyKey within 5 minutes return the first result instead of sending again. Delivery progress (sent, delivered, read, failed) is available from /whatsapp-message-status and the whatsapp-message-status webhook.
Request body
Sending 3 of 6 fieldschatbotIdstringtostringtemplateobjectnamestringvariables.Only these fields are sent (application/json).