Skip to Content
Public APISend Document Message

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

Headers

HeaderValue
AuthorizationBasic YOUR_API_KEY
Content-Typeapplication/json

Request body

{ "phoneNumber": "919876543210", "callbackData": "invoice_INV-001234", "type": "Document", "data": { "message": "This is a test", "mediaUrl": "https://your-cdn.example.com/invoice.pdf" } }
FieldRequiredNotes
phoneNumberyesRecipient phone
typeyesMust be "Document"
data.messageoptionalCaption shown above the document card
data.mediaUrlyesPublic HTTPS URL. Max 100 MB
data.fileNameoptionalFilename shown to recipient. Defaults to URL filename if omitted

Allowed document types

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

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

Successful response — 201 Created

{ "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

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