Skip to content

Document Messages

Send WhatsApp document messages: PDF, DOCX, XLSX up to 100MB. Include filenames and captions, with automatic CDN hosting.

View .md

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

PropertyRequirement
FormatsPDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT
Max size100 MB
FilenameOptional but recommended
CaptionOptional, max 1024 chars

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