Send Template — Document Header
Send an approved template whose header is a document. Common use cases: invoices, tickets, lab reports, statements — any document you want to attach to a transactional template.
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": "invoice_INV-001234",
"type": "Template",
"template": {
"name": "template_name_here",
"languageCode": "en",
"headerValues": [
"media_url_here"
],
"fileName": "file_name.pdf",
"bodyValues": [
"body_variable_value"
]
}
}| Field | Required | Notes |
|---|---|---|
template.headerValues | yes | Single-element array containing the document’s public HTTPS URL |
template.fileName | optional | Display filename in WhatsApp. Defaults to URL basename if omitted |
template.bodyValues | yes (when body has variables) | One entry per body variable |
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": ["media_url_here"],
"fileName": "file_name.pdf",
"bodyValues": ["body_variable_value"]
}
}'Successful response — 201 Created
{
"result": true,
"message": "Message created successfully",
"id": "36e7d39e-9e3b-4fe6-b21a-abec53ea021e"
}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."
}Tips
- Set
fileNameso the customer seesInvoice-INV-001234.pdfinstead of a UUID from your CDN. - Allowed types: PDF, DOCX, XLSX, PPTX, TXT, CSV. Max 100 MB.
- The same template can be re-used with a different document URL each time — no need to upload to Meta in advance.