Media Messages
Send images, videos, audio files, documents, and stickers via WhatsApp. Media can be provided as a public URL or a previously uploaded Media ID.
Endpoints
| Type | Endpoint | Supported Formats | Max Size |
|---|---|---|---|
| Image | POST /api/messages/image | JPEG, PNG | 5 MB |
| Video | POST /api/messages/video | MP4, 3GPP | 16 MB |
| Audio | POST /api/messages/audio | MP3, OGG, AMR, AAC | 16 MB |
| Document | POST /api/messages/document | PDF, DOC, XLSX, etc. | 100 MB |
| Sticker | POST /api/messages/sticker | WebP (static/animated) | 500 KB / 100 KB |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient phone number with country code |
mediaUrl | string | Yes* | Public URL of the media file |
mediaId | string | Yes* | Meta Media ID (from a previous upload) |
caption | string | No | Caption text (images, videos, documents only) |
filename | string | No | Display filename (documents only) |
phoneNumberId | string | No | Send from a specific number |
* Provide either mediaUrl or mediaId, not both.
Image Example
POST /api/messages/image HTTP/1.1
Host: app.waconnect.me
X-API-Key: wba_YOUR_API_KEY_HERE
Content-Type: application/json
{
"to": "15551234567",
"mediaUrl": "https://example.com/product-photo.jpg",
"caption": "Check out our new product!"
}HTTP
Document Example
{
"to": "15551234567",
"mediaUrl": "https://example.com/invoice-2026-001.pdf",
"caption": "Your invoice for April 2026",
"filename": "Invoice-2026-001.pdf"
}JSON
C# Example (Image)
var payload = new
{
to = "15551234567",
mediaUrl = "https://example.com/product-photo.jpg",
caption = "Check out our new product!"
};
var json = JsonSerializer.Serialize(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");
// POST to /api/messages/image
var response = await client.PostAsync(
"https://app.waconnect.me/api/messages/image", content);C#
C# Example (Document)
var payload = new
{
to = "15551234567",
mediaUrl = "https://example.com/invoice.pdf",
caption = "Your invoice for April 2026",
filename = "Invoice-2026-001.pdf"
};
var json = JsonSerializer.Serialize(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");
// POST to /api/messages/document
var response = await client.PostAsync(
"https://app.waconnect.me/api/messages/document", content);C#
⚠
Media URLs must be publicly accessible. WhatsApp servers will download the file directly from the URL you provide. If your files are behind authentication, upload them to a public CDN or use the Meta Media Upload API first.