Message Types
File
Send a document or file
POST
Path parameters
Body parameters
Message recipient. Accepts a phone number in E.164 format without the leading
+ (e.g. 593999999999) or a BSUID (e.g. US.13491208655302741918) for users who have enabled phone number privacy in WhatsApp. See Identifying the recipient.Public (HTTPS) URL of the document. Supported formats and maximum size depend on the channel (see the formats and limits by channel table).
Optional text shown alongside the media. WhatsApp only: Instagram and Messenger do not support text with a file; to send it, use a separate text message.
Response
Formats and size limits by channel
URL Requirements
Common Errors
INVALID_MEDIA_URL- The file URL is invalid or inaccessibleMEDIA_TOO_LARGE- The file exceeds the channel’s size limitUNSUPPORTED_MEDIA_TYPE- The file format is not supported
Use Cases
- Sending invoices or receipts
- Sharing legal documents
- Sending reports or analyses
- Sharing presentations