Send Authentication Template
Send a WhatsApp authentication template — typically a one-time password (OTP) flow with a copy-code or one-tap autofill button. Authentication templates have their own Meta-approved structure (no header, fixed body, special button) and a separate (lower) per-message price than utility / marketing.
These are the right pick for: login OTPs, signup verification, transaction confirmation codes, password resets.
Endpoint
POST https://apis.splashifypro.com/api/v1/public/messageHeaders
| Header | Value |
|---|---|
Authorization | Basic YOUR_API_KEY |
Content-Type | application/json |
Request body
{
"phoneNumber": "9028883545",
"callbackData": "auth_attempt_42",
"type": "Template",
"template": {
"name": "itk_auth_one_tap",
"languageCode": "en",
"bodyValues": [
"LIPSUM"
],
"buttonValues": {
"0": [
"LIPSUM"
]
}
}
}| Field | Required | Notes |
|---|---|---|
template.name | yes | The authentication template code name |
template.languageCode | yes | Match the approved language |
template.bodyValues | yes | Single-element array — the OTP code as a string. Max 15 chars |
template.buttonValues["0"] | yes | Same OTP code, repeated for the copy-code / one-tap button |
The structure of buttonValues is {"<button_index>": ["value", ...]}. For an authentication template the OTP button is always at index 0, and the value array has one entry — the OTP code itself.
Example
curl -X POST https://apis.splashifypro.com/api/v1/public/message \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "9028883545",
"callbackData": "some text here",
"type": "Template",
"template": {
"name": "itk_auth_one_tap",
"languageCode": "en",
"bodyValues": ["LIPSUM"],
"buttonValues": {
"0": ["LIPSUM"]
}
}
}'Successful response — 201 Created
{
"result": true,
"message": "Message created successfully",
"id": "b90f02bd-1316-49ce-b5d0-f6be14fce2b8"
}Pricing & best practice
- Authentication templates are billed at the auth-conversation rate (lower than utility/marketing) when sent via Meta-approved authentication shapes.
- Always pass the same OTP in
bodyValues[0]andbuttonValues["0"][0]. WhatsApp uses the button value for the copy / one-tap flow; mismatching them confuses users. - Do not include the OTP in the URL of any link button — Meta rejects auth templates with that pattern.
- Generate the OTP server-side, store its hash + expiry, and verify on the way back. Don’t trust the client to echo it.