Send a document
Send a PDF/Office/text document (≤100 MB). Optional caption and filename. Needs an open window.
media_url (a public HTTPS link) or file_id. WhatsApp fetches the URL at send time, so it must be reachable then and serve the correct Content-Type. Needs an open 24-hour window. Async: returns 202 { message_id, status: "pending" }.
.doc/.docx), Excel (.xls/.xlsx), plain text (.txt). Max size: 100 MB. Set filename for the name and icon shown to the recipient.Authorizations
Body
Recipient phone in E.164 digits (optional leading +), e.g. 255712345678. The number you are messaging. Pair with sender.
7 - 20^\+?[1-9]\d{6,17}$Which of your WhatsApp numbers to send from (number or phone_number_id). Pair with to to target the conversation. Optional when your workspace has a single active sender. Preferred over sender_id.
64Alternative to sender. The id of an existing one-to-one thread; recipient and sender are taken from it, so to / sender / sender_id are ignored. Use this to pin a precise conversation when the same recipient can be reached through more than one of your senders.
Deprecated: use sender.
Publicly reachable media URL. Provide this or file_id.
Uploaded media file id (first-party). Provide this or media_url.
Optional caption.
1024Filename shown to the recipient, e.g. invoice.pdf.
255