Skip to content
Splashify Pro
Docs

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://api.splashifypro.com/api/v1/public/message

Headers

Request body

json
{
  "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"
    ]
  }
}

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": ["media_url_here"],
      "fileName": "file_name.pdf",
      "bodyValues": ["body_variable_value"]
    }
  }'

Successful response — 201 Created

json
{
  "result": true,
  "message": "Message created successfully",
  "id": "36e7d39e-9e3b-4fe6-b21a-abec53ea021e"
}

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."
}

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.