Send Authentication Template
POSThttps://public.leadpattern.com/whatsapp/message/auth-template
Send an approved AUTHENTICATION/OTP template. Dedicated endpoint — Meta requires a positional body parameter (the code) plus a matching OTP button parameter, which the generic /whatsapp/message/template endpoint does not build. Supports batch sending via the messages array.
- Only for AUTHENTICATION-category templates.
- content.templateData is ignored — the OTP value comes from content.code.
Headers
1 fieldAuthorizationstringrequired
Your API key. Sent raw (e.g. 'lp_...'). No Bearer prefix required.
Body Parameters
1 fieldmessagesarray of objectsrequired
Batch of AUTHENTICATION template sends (non-empty).
tostringrequired
Recipient phone number in E.164 format (with country code).
scheduledAtstringoptional
ISO date-time. Future value schedules the send.
contentobjectrequired
Responses
JSON Response
{
"type": "success",
"data": {
"messages": [
{
"status": "SENT",
"recipient": "9195XXXXXXXX",
"messageId": "wamid.abc123"
}
]
}
}Sample Request Body
{
"messages": [
{
"to": "+9195XXXXXXXX",
"content": {
"templateName": "otp_login",
"language": "en_US",
"code": "482913"
}
}
]
}
