POST
Send Media & File
Send image, video, audio, or document with an optional caption. Always use type media. Media must be a public HTTPS URL. The message param is the caption shown with the media.
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": "META68B6ED90CXXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'Response
{
"status": "success",
"message": "Success",
"message_payload": {
"messaging_product": "whatsapp",
"messages": [
{
"id": "wamid.xxx",
"message_status": "accepted"
}
]
}
}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": "META68B6ED90CXXXX",
"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": "META68B6ED90CXXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'Audio — 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": "META68B6ED90CXXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'| Parameter | Description |
|---|---|
| number | Recipient phone number with country code |
| type | Must be media |
| message | Caption text (optional for audio) (Optional) |
| media_url | Public HTTPS URL of the file |
| filename | Required for documents — forces document mode (Optional) |
| instance_id | Meta Cloud instance ID |
| access_token | Your access token |
Only delivers if the customer messaged you within the last 24 hours. Outside that window, use Meta Templates. The
message param is the caption under the media. Set filename when sending documents.