Send an image, video, audio or document
send_mediaSend a file: an image, video, audio, voice note (ogg/opus), document or sticker, with an optional caption. Give exactly one of url (a public URL wuapi downloads itself) or uploadId (a file uploaded before with upload_file).
Instructions
Send a file: an image, video, audio, voice note (ogg/opus), document or sticker, with an optional caption. Give exactly one of url (a public URL wuapi downloads itself) or uploadId (a file uploaded before with upload_file). Images go out at the account's image quality (standard by default, as WhatsApp sends a photo); pass quality to change it for one image, or send the file as a document to deliver it untouched.
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 | No | 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. | |
| quality | No | Images only: the quality of this image instead of the account's. `hd` is WhatsApp's HD photo; `original` sends the file without re-encoding it. | |
| 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, or the upload's own type, when omitted. | |
| uploadId | No | The id of an upload made with upload_file (or `POST /v1/uploads`): a file wuapi already stores. Usable for 24 hours, any number of times. | |
| 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). One exception, a private reply: a message someone else wrote in a group can be quoted in the direct chat with its author (`to` is that message's `from`). |