WhatsApp Media Messages API
Send images, video, GIFs, PDF, Excel and Word documents, audio and stickers from your own WhatsApp number, or put a photo on top of a button message. One sendMessage endpoint: pass a URL or base64 and the file type is detected for you.
- images, video & GIF
- PDF, Excel & Word
- files up to 50MB
- media in buttons

Every file WhatsApp can carry
The same endpoint and the same headers for every type — only the type field and a few options change.
-
type: media
Images
JPG, PNG and WebP images with an optional caption. Set isHd to send sharper photos where WhatsApp supports it.
-
type: media
Video
MP4 videos with a caption that play inline in the chat. Use type: shortVideo for a round video note.
-
isGif: true
GIFs
Send a short MP4 with isGif and WhatsApp plays it on a loop like a GIF.
-
type: media + filename
PDF, Excel and Word
Invoices, price lists and reports as PDF, XLSX or DOCX files, with the filename your customer sees.
-
type: media
Audio
Send OGG (Opus) and MP3 audio files from a URL or base64.
-
type: sticker
Stickers
Send a WebP sticker the same way you send an image.
Send any file by URL or base64
Point the message field at a public URL or pass the file as base64. Add a caption with text, and turn on isHd for sharper images.
- ✓Images, video and audio from a URL or base64
- ✓A caption on every media message
- ✓Files up to 50MB
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/new-arrival.jpg",
"text": "New arrival: classic sneaker, $59",
"isHd": true
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/unboxing.mp4",
"text": "How to set up your order"
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "data:image/png;base64,iVBORw0KG...",
"text": "Screenshot"
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/welcome.ogg"
}'PDF, Excel and Word files with your own filename
Send invoices, price lists and reports as documents. Set filename and the customer sees invoice-10482.pdf instead of a random name.
- ✓PDF, XLSX, DOCX and other document types
- ✓Custom filename and caption
- ✓Works in chats, groups and channels
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/files/inv-10482.pdf",
"filename": "invoice-10482.pdf",
"text": "Your invoice for order #10482"
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/files/prices-oct.xlsx",
"filename": "price-list-october.xlsx",
"text": "This month’s price list"
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/files/contract.docx",
"filename": "service-agreement.docx"
}'GIFs, stickers and video notes
Add isGif to a short MP4 and WhatsApp loops it like a GIF. Stickers go out as WebP files, and shortVideo sends a round video note.
- ✓isGif: true for looping GIFs
- ✓WebP stickers and round video notes
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/sale.mp4",
"text": "Weekend sale starts now",
"isGif": true
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "sticker",
"message": "https://example.com/thanks.webp"
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "shortVideo",
"message": "https://example.com/hello.mp4"
}'Put a photo on top of a button message
Button messages take a media field too: show a product photo, a parcel image or a promo banner above Track order or Buy now buttons.
- ✓media field on buttons messages
- ✓Reply, URL, call and copy-code buttons
- ✓Optional title and footer around the media
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "buttons",
"message": "Classic sneaker, sizes 38–45",
"media": "https://example.com/sneaker.jpg",
"buttons": [
{
"id": "buy",
"text": "Buy now"
},
{
"id": "sizes",
"text": "See sizes"
}
]
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "buttons",
"message": "10% off your next order",
"title": "Thank you!",
"footer": "Valid until Sunday",
"media": "https://example.com/banner.jpg",
"buttons": [
{
"url": "https://example.com/shop",
"text": "Open the shop"
},
{
"code": "THANKS10",
"text": "Copy code"
}
]
}'What teams send with the media API
-
Invoices and receipts
Send the PDF invoice or receipt straight into the customer's WhatsApp after checkout.
-
Price lists
Send this month's price list as an Excel or PDF file to dealers and wholesale customers.
-
Support with screenshots
Send how-to images, short videos and voice notes from your helpdesk.
-
Product photos with buttons
Show a product photo with Buy now and Details buttons when a customer asks about an item.
-
Promo videos and GIFs
Announce a sale to a community or channel with a short video or a looping GIF.
-
Reports for clients
Deliver daily or weekly reports as documents to each client's number.
Media messages FAQ
Ask our support team anything over WhatsApp. Average response time is under 24 hours.
Help center →How large can a file be?
Files up to 50MB can be sent with sendMessage. Very large videos may still take longer to upload to WhatsApp.
Can I send a file without hosting it?
Yes. Pass the file as a base64 data URL in the message field instead of a public link.
Do I need template approval to send media?
No. Maytapi sends from your own number over WhatsApp Web, so images, video, documents and every other media type go out without Meta template review.
Can I send media to groups and channels?
Yes. Use the group or channel id as to_number; channels also accept images, video, documents, GIFs and stickers.

Get your key, send your first message in ten minutes
No approval, no templates, no card. Every endpoint is open for three days.