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/messageHeaders
| Header | Value |
|---|---|
Authorization | Basic YOUR_API_KEY |
Content-Type | application/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"
}
}| Field | Required | Notes |
|---|---|---|
phoneNumber | yes | Recipient phone |
type | yes | Must be "Document" |
data.message | optional | Caption shown above the document card |
data.mediaUrl | yes | Public HTTPS URL. Max 100 MB |
data.fileName | optional | Filename 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
fileNameso the customer seesInvoice-INV-001234.pdfinstead of123e4567-...pdffrom your CDN. - For invoices and receipts, send via the
Send Template — Document Headerendpoint outside the 24-hour window.