Send Template Message
POSThttps://public.leadpattern.com/whatsapp/message/template
Send an approved WhatsApp template. Supports batch sending via the messages array — each item can also include an optional "scheduledAt" (ISO date-time) to send that recipient's message at a future time instead of immediately. Body placeholders are positional strings, matched in order to the template's variables. For a DOCUMENT header, also pass header.filename (e.g. "invoice.pdf") — without it, WhatsApp shows the recipient a generic/blank file name instead of a readable one. filename only applies to DOCUMENT headers, not IMAGE or VIDEO.
- v1 body placeholders are positional — a flat array of values.
- Carousel (cards) is only supported by the v2 endpoint.
- AUTHENTICATION templates are rejected here — use /whatsapp/message/auth-template.
Headers
1 fieldAuthorizationstringrequired
Your API key. Sent raw (e.g. 'lp_...'). No Bearer prefix required.
Body Parameters
1 fieldmessagesarray of objectsrequired
Batch of template messages (non-empty).
tostringrequired
Recipient phone number in E.164 format (with country code).
contentobjectrequired
Responses
JSON Response
{
"type": "success",
"data": {
"messages": [
{
"status": "SENT",
"recipient": "9195XXXXXXXX",
"messageId": "wamid.abc123"
}
]
}
}Sample Request Body
{
"messages": [
{
"to": "+9195XXXXXXXX",
"content": {
"templateName": "order_confirmation",
"language": "en",
"templateData": {
"header": {
"type": "DOCUMENT",
"mediaUrl": "https://example.com/invoice.pdf",
"filename": "invoice.pdf"
},
"body": {
"placeholders": [
"John",
"ORD-1234"
]
},
"buttons": [
{
"type": "URL",
"parameter": "ORD-1234"
}
]
}
}
}
]
}
