POST
Send Media & File
Single endpoint for all media: image, video, PTV, GIF, audio, voice note, document, and sticker. Prefer type media — the server auto-detects the kind from the file URL extension (or from filename for documents).
API endpoint
https://waclient.com/api/sendImage — type media + caption (message)
curl -X POST \
'https://waclient.com/api/send' \
-H 'Content-Type: application/json' \
--data '{
"number": "20100981XXXX",
"type": "media",
"message": "Product photo",
"media_url": "https://example.com/photo.jpg",
"instance_id": "6A4B02A1XXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'Response
{
"status": "success",
"message": "Success",
"message_payload": {
"key": {
"remoteJid": "[email protected]",
"fromMe": true,
"id": "ABC123"
},
"status": "PENDING"
}
}Video — type media + caption (message)
curl -X POST \
'https://waclient.com/api/send' \
-H 'Content-Type: application/json' \
--data '{
"number": "20100981XXXX",
"type": "media",
"message": "Watch this demo",
"media_url": "https://example.com/demo.mp4",
"instance_id": "6A4B02A1XXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'Document — type media + message + filename
curl -X POST \
'https://waclient.com/api/send' \
-H 'Content-Type: application/json' \
--data '{
"number": "20100981XXXX",
"type": "media",
"message": "Your invoice",
"media_url": "https://example.com/files/invoice.pdf",
"filename": "invoice.pdf",
"instance_id": "6A4B02A1XXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'Audio / voice note — type media (no caption)
curl -X POST \
'https://waclient.com/api/send' \
-H 'Content-Type: application/json' \
--data '{
"number": "20100981XXXX",
"type": "media",
"media_url": "https://example.com/note.ogg",
"instance_id": "6A4B02A1XXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'| Parameter | Description |
|---|---|
| number / chat_id | Recipient phone number (e.g. 20100981XXXX) or chat_id (group: [email protected], channel: xxxx@newsletter) |
| type | media (recommended, auto-detect) or image, video, ptv, gif, audio, voice, document, sticker |
| message | Caption text — sent as the media caption (optional for audio/voice/sticker) (Optional) |
| media_url | Public URL of the media file |
| filename | Forces document mode when set (any extension) (Optional) |
| instance_id | Your instance ID |
| access_token | Your access token |
Use
type: "media" for auto-detection from the URL extension. The message param is the caption shown under the media. Set filename to force document mode.