Skip to content

Send a WhatsApp template message

post/send-whatsapp-template
Any key

Sends 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 fields
Required
chatbotIdstring
tostring
Recipient phone number with country code, with or without '+'.
templateobject
namestring
Required only when the template is approved in more than one language.
Values per slot, grouped like the template's variables.
Replacement for a media header, by https link or uploaded media id.

Only these fields are sent (application/json).

Try it · POST /send-whatsapp-template
curl 'https://api.chat-data.com/api/v2/send-whatsapp-template' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "chatbotId": "6650f1c2a9e4b83d2c7a1f05",  "to": "+14155552671",  "template": {    "name": "order_update"  }}'
Loading…

Responses

WhatsApp accepted the message.

Content type: application/json

FieldDescription
messageIdstringWhatsApp's message id.
tostringThe recipient's canonical WhatsApp id; replies arrive from it.
conversationIdstringThe conversation the message and the replies are in.
statusstringOne of: accepted.

Example

{  "messageId": "wamid.HBgLMTQxNTU1NTI2NzEVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3RTcA",  "to": "14155552671",  "conversationId": "14155550100:14155552671",  "status": "accepted"}

Last updated October 14, 2026