Send a photo, video, voice note or file
send_mediaSend media over WhatsApp from a public URL or base64 data. type chooses the format: image and video support a caption; document uses fileName; ogg/opus audio becomes a voice note. Other audio formats become playable attachments. Files are limited to 16 MB. Prefer url for large files. Counts as one message.
With pacing on, media to one person waits unless they messaged this number in the last 24 hours. The answer carries status: "queued" and scheduledAt. Known contacts still wait. The file is fetched when the message's turn comes, so a url must remain reachable until then.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"to": "<to>",
"type": "<type>"
},
"name": "send_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient: a phone number in international format (+5511988887777) or a WhatsApp address (5511988887777@s.whatsapp.net, an @lid contact, or a @g.us group). | |
| url | No | Public https URL of the file. It is the better option. We stream the download and forward the bytes, so the size of the file never rides in your request. | |
| from | No | Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you. | |
| type | Yes | Which kind of media bubble to send. | |
| base64 | No | The file as base64, bare or as a `data:<mime>;base64,…` URI. Base64 inflates a request by a third, so prefer `url` for anything but small files. | |
| caption | No | Text shown under the media. Images and videos only. WhatsApp has no caption field for documents or audio. | |
| seconds | No | Voice notes: duration, so the bubble shows the right length. | |
| fileName | No | Documents: the filename WhatsApp shows on the bubble. | |
| humanize | No | Whether to come online, read the recipient's last message and show a typing indicator before sending. On by default, which adds a few seconds. false skips those steps, not the send queue. Configure each part per number with update_number. | |
| mimeType | No | Overrides the detected content type, e.g. `image/webp`. | |
| skipQueue | No | Send immediately instead of waiting in this number's queue. Only for a message the recipient expects right now, such as a login code or a confirmation they requested. This bypasses the configured spacing, so using it for outreach can create bursts and increase the risk of a ban. Default: off. | |
| idempotencyKey | No | Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours. |