Media messages
Media can be sent inside the 24-hour window. Set type to the kind of file and pass an object of the same name.
type |
Object fields | WhatsApp limits |
|---|---|---|
image |
link, caption |
JPEG or PNG, up to 5 MB |
video |
link, caption |
MP4 / 3GP (H.264 + AAC), up to 16 MB |
audio |
link |
AAC, MP3, M4A, AMR, OGG (Opus), up to 16 MB |
document |
link, caption, filename |
PDF, DOC(X), XLS(X), PPT(X), TXT, up to 100 MB |
sticker |
link |
WebP, 512×512, up to 100 KB (static) |
link must be a public https URL that WhatsApp can download (no login, no redirects to a login page). Instead of link you can pass id — a media id you already uploaded to Meta. The object can also be named media instead of the type, e.g. { "type": "image", "media": { "link": "…" } }.
curl https://login.meapi.in/api/v1/messages \ -H "Authorization: Bearer $MEAPI_KEY" -H "Content-Type: application/json" \ -d '{ "to": "+919812345678", "type": "document", "document": { "link": "https://example.com/invoices/10245.pdf", "filename": "Invoice-10245.pdf", "caption": "Your invoice" } }'await fetch('https://login.meapi.in/api/v1/messages', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MEAPI_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ to: '+919812345678', type: 'image', image: { link: 'https://example.com/kurta-blue.jpg', caption: 'Blue Cotton Kurta — ₹899' } }),});<?php$payload = ['to' => '+919812345678', 'type' => 'image', 'image' => ['link' => 'https://example.com/kurta-blue.jpg', 'caption' => 'Blue Cotton Kurta — ₹899']];$ch = curl_init('https://login.meapi.in/api/v1/messages');curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('MEAPI_KEY'), 'Content-Type: application/json'], CURLOPT_POSTFIELDS => json_encode($payload)]);echo curl_exec($ch);requests.post("https://login.meapi.in/api/v1/messages", headers={"Authorization": f"Bearer {MEAPI_KEY}"}, json={"to": "+919812345678", "type": "video", "video": {"link": "https://example.com/demo.mp4", "caption": "How it works"}}, timeout=30)Errors: 400 MISSING_MEDIA (no link or id), 400 BAD_MEDIA_LINK (not https). A file WhatsApp cannot download or doesn’t accept makes the message failed afterwards, with Meta’s reason in error.
Was this page helpful?
Thank you — we read every comment.
Could not send right now. Please try again later.
© 2026 MeAPI by TheWebStore028 · RADHAMADHAV WEBSTORE LLP · GSTIN 27ABJFR6148J1ZO · Contact us ·Cookie settings