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://apis.splashifypro.com/api/v1/public/messageHeaders
| Header | Value |
|---|---|
Authorization | Basic YOUR_API_KEY |
Content-Type | application/json |
Request body
{
"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"
]
}
}| Field | Required | Notes |
|---|---|---|
template.headerValues | yes (when header has a variable) | Single-element array — text headers support only one variable |
template.bodyValues | yes (when body has variables) | One entry per {{1}}, {{2}}, … |
| Everything else | Same as Template — No Header |
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": "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
{
"result": true,
"message": "Message created successfully",
"id": "96f0b7a2-6d4c-4983-99c6-eaf7591a5a56"
}Error — Template category mismatch
{
"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.