Send documents like PDFs, spreadsheets, or presentations to share invoices, contracts, or reports.
Send a Document
const message = await zavu.messages.send({
to: "+14155551234",
channel: "whatsapp",
messageType: "document",
content: {
mediaUrl: "https://example.com/invoice.pdf",
filename: "Invoice-12345.pdf"
}
});
Document with Caption
const message = await zavu.messages.send({
to: "+14155551234",
channel: "whatsapp",
messageType: "document",
text: "Your invoice for January 2024",
content: {
mediaUrl: "https://example.com/invoice.pdf",
filename: "Invoice-12345.pdf"
}
});
Specifications
| Property | Requirement |
|---|
| Formats | PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT |
| Max size | 100 MB |
| Filename | Optional but recommended |
| Caption | Optional, max 1024 chars |
Always provide a descriptive filename so users know what they’re downloading.
URL Requirements
Your document URL must:
- Be publicly accessible (no authentication)
- Use HTTPS
- Return the correct
Content-Type header
- Be available for at least 24 hours
Use Cases
- Invoices and receipts
- Contracts and agreements
- Reports and presentations
- User manuals
- Shipping labels