Send Template — Text Header with Variable
Send an approved template whose header is text and contains a variable (e.g. Hi {{1}}!). Use this when you want a personalised greeting at the top of the message.
Endpoint
POST
https://api.splashifypro.com/api/v1/public/message
Headers
Request body
json
{
"phoneNumber": "9999999999",
"callbackData": "order_12345",
"type": "Template",
"template": {
"name": "template_name_here",
"languageCode": "en",
"headerValues": [
"header_variable_value"
],
"bodyValues": [
"body_variable_value_1",
"body_variable_value_n"
]
}
}Example
bash
curl -X POST https://api.splashifypro.com/api/v1/public/message \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "9999999999",
"callbackData": "some text here",
"type": "Template",
"template": {
"name": "template_name_here",
"languageCode": "en",
"headerValues": ["header_variable_value"],
"bodyValues": ["body_variable_value_1", "body_variable_value_n"]
}
}'Successful response — 201 Created
json
{
"result": true,
"message": "Message created successfully",
"id": "96f0b7a2-6d4c-4983-99c6-eaf7591a5a56"
}Error — Template category mismatch
json
{
"result": false,
"message": "Message not sent. Template category mismatch: Expected 'utility', but received 'MARKETING'. Please update the request to match the approved template category."
}Pass template_category to lock the category — see Template — No Header.