Skip to content
Splashify Pro
Docs

Send Document Message

Send a document to a customer — PDFs, Word docs, spreadsheets, slide decks, anything WhatsApp accepts as a document. The file must be reachable at a public HTTPS URL.

Endpoint

POST

https://api.splashifypro.com/api/v1/public/message

Headers

Request body

json
{
  "phoneNumber": "919876543210",
  "callbackData": "invoice_INV-001234",
  "type": "Document",
  "data": {
    "message": "This is a test",
    "mediaUrl": "https://your-cdn.example.com/invoice.pdf"
  }
}

Allowed document types

application/pdf, application/msword, application/vnd.openxmlformats-officedocument.* (Office files), text/plain, text/csv, application/vnd.ms-powerpoint.

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": "919876543210",
    "callbackData": "some_callback_data",
    "type": "Document",
    "data": {
      "message": "This is a test",
      "mediaUrl": "MEDIA_URL"
    }
  }'

Successful response — 201 Created

json
{
  "result": true,
  "message": "Message queued for sending via Splashify Pro. Check webhook for delivery status",
  "id": "cc311ce6-4a31-4b50-b9e9-186357cd6fdf"
}

Error — 400 Bad Request

json
{
  "result": false,
  "message": "Please correct the following error - Customer has not messaged within last 24 hours"
}

Tips

  • Prefer PDF — it renders inline on every WhatsApp client. Office docs always require a download tap.
  • Set fileName so the customer sees Invoice-INV-001234.pdf instead of 123e4567-...pdf from your CDN.
  • For invoices and receipts, send via the Send Template — Document Header endpoint outside the 24-hour window.