Send an image, video, audio or document
send_mediaSend media (image, video, audio, voice note, document, or sticker) from a public URL to a WhatsApp chat, with optional caption. Automatically downloads the URL and delivers it to the recipient.
Instructions
Send a file from a public URL: an image, video, audio, voice note (ogg/opus), document or sticker, with an optional caption. wuapi downloads the URL itself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient: a phone number in E.164 with + (`+584241112233`), `lid:<digits>`, the `@username` of a contact the account already chats with, a group id (`...@g.us`), or a channel id (`...@newsletter`) the account administers. | |
| url | Yes | Public http(s) URL of the file. wuapi downloads it (up to 100 MB); private and internal addresses are refused. | |
| type | Yes | What kind of file it is. | |
| caption | No | Text shown with the file. | |
| filename | No | Documents: the file name the recipient sees. | |
| mentions | No | Contact ids to @mention (E.164 or `lid:<digits>`). | |
| mimeType | No | Guessed from the URL when omitted. | |
| viewOnce | No | Images, videos, audio and voice: can be opened once. | |
| accountId | Yes | The wuapi account id of the linked number to act as (from list_accounts). | |
| idempotencyKey | No | Optional. Reuse the same key when retrying this exact call: within 24 hours wuapi returns the first result instead of doing it twice. | |
| replyToMessageId | No | A wuapi message id in the same chat to quote (reply to). |