Send image, video, audio, and document chat messages through Whats91-specific media fields.
Chat Media
Summary
Send image, video, audio, and document chat messages through Whats91-specific media fields.
Prerequisites
- A Whats91 account
- A generated public API token
Related documentation
POST /api/v2/chat supports image, video, audio, and document messages by mediaUrl, mediaId, or mediaFile. JSON requests can reference hosted media or an existing media id; multipart/form-data can upload a file directly.
| Field | Required | Description |
|---|---|---|
| to | Yes | Recipient phone number. Aliases: receiverId, receiver_id, receiver. |
| type | Yes | image, video, audio, or document. |
| mediaUrl | Conditional | Public media URL. Alias: media_url. |
| mediaId | Conditional | Previously uploaded media id. Alias: media_id. |
| mediaFile | Conditional | Multipart file upload. Aliases: media_file, uploadFile, upload_file. |
| caption | No | Optional caption for image, video, and document messages. |
| filename | No | Optional document filename. |
The direct upload limit is 16 MB. Supported upload extensions are pdf, txt, doc, docx, xls, xlsx, csv, jpg, jpeg, png, gif, mp3, mp4, 3gp, 3gpp.
curl -X POST "https://graph.whats91.com/api/v2/chat" \
-H "Authorization: Bearer w91_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"senderId": "919999999999",
"to": "918888888888",
"type": "document",
"mediaUrl": "https://example.com/invoice.pdf",
"caption": "Invoice INV-1001",
"filename": "invoice.pdf"
}'curl -X POST "https://graph.whats91.com/api/v2/chat" \
-H "Authorization: Bearer w91_live_xxx" \
-F "senderId=919999999999" \
-F "to=918888888888" \
-F "type=image" \
-F "caption=Product photo" \
-F "mediaFile=@product.jpg"A media message without mediaUrl, mediaId, or mediaFile returns MISSING_MEDIA. Non-JSON and non-multipart requests return UNSUPPORTED_CONTENT_TYPE.
Related Documentation
Messaging
Understand the Whats91-specific message sending endpoints for templates, chat messages, media, buttons, and lists.
Template Send
Send approved WhatsApp templates with Whats91-specific fields, aliases, media headers, and button parameters.
Chat Text
Send Whats91-specific free-form chat text messages inside the customer service window.
Chat Interactive
Send Whats91-specific quick reply button and list messages through the chat endpoint.