Skip to Content
Public APITemplate — Document Header

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/message

Headers

HeaderValue
AuthorizationBasic YOUR_API_KEY
Content-Typeapplication/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" ] } }
FieldRequiredNotes
template.headerValuesyesSingle-element array containing the document’s public HTTPS URL
template.fileNameoptionalDisplay filename in WhatsApp. Defaults to URL basename if omitted
template.bodyValuesyes (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 fileName so the customer sees Invoice-INV-001234.pdf instead 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.