Send an image, video, audio (voice/regular) or document by URL
Auth:Documentation Index
Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
Use this file to discover all available pages before exploring further.
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: no
image, video, document or audio) from a public URL. Supports message as a caption, replyTo (quote by ID), replyPrivate, mention / mentionAll (group chats only), delay (in seconds) to simulate real typing and, for audio, isVoice (PTT), duration and waveform. The server downloads the file, detects the mimeType when omitted and uploads it to the WhatsApp servers before sending.
mediaType: "image") downloaded from a public URL, with message used as the caption that appears below the photo in the chat.
mediaType: "audio" and isVoice is omitted, the server defaults to true (voice/PTT message). To send as a “regular” audio (a music track, for example), pass isVoice: false.
fileNamefileName (Contract-2026.pdf) sets the name displayed in the attachment card and message appears as accompanying text. Without fileName, WhatsApp shows a generic name.
delay: 3, the server sends the “typing…” indicator for 3 seconds before firing the video, simulating real typing.
@g.us), quoting a previous message via replyTo and mentioning a member via the mention array. @5511888888888 in the caption becomes clickable and triggers a notification for the tagged user.
messageType echoes the mediaType you sent (image, video, document or audio). The metadata resolved by the upload appears in mediaUrl (URL re-issued for mmg.whatsapp.net), mediaMimeType and mediaSize. For PTT audio, the server also returns mediaDuration when it can compute it.
mediaType: "document", fileName appears in the card. For mediaType: "audio" with isVoice: true, the message is delivered as PTT (waveform + microphone icon). For “regular” audio (a music track), use isVoice: false.$Instance_Name).TokenAccount or TokenInstance.application/json5511999999999) or JID (@s.whatsapp.net, @lid, @g.us, @newsletter).image, video, document, audio. Determines how WhatsApp renders the message.mediaType: "document", it appears as accompanying text. Optional for all types.image/jpeg, application/pdf). When omitted, the server detects it automatically from the download.mediaType: "document", without it, WhatsApp shows a generic name.mediaType: "audio". When true, the message is delivered as PTT (voice message, with a waveform). When false, it is delivered as regular audio (a music track). When the field is omitted on audio, the server assumes true.mediaType: "audio". Optional, when omitted, the server tries to detect it automatically.mediaType: "audio" with isVoice: true.reply_message_not_found, reply_message_instance_mismatch.true and replyTo points to a message originating from a group, the reply is redirected to the original author’s private chat (keeping the quote). Ignored if the original message is not from a group.@g.us). To appear as a clickable link, include @5511... in message (caption). Without that, they become hidden mentions (notify only).true, mentions every group member (except the instance itself). Equivalent to @everyone. Group chats only.crm, bot-suporte, n8n). Saved on the message record in the database and propagated to webhooks. When omitted, defaults to "api".delay is in seconds, not milliseconds. A value of 3 = 3 seconds of “typing”.mediaType: "audio", isVoice defaults to true automatically when the field is omitted. To send as a music track, you must explicitly send isVoice: false.mediaUrl must be publicly accessible. URLs with authentication, sessions or bot protection commonly fail with media_download_failed.mimeType is not provided, the server detects it from the first bytes of the download (net/http + sniff). In rare cases (atypical extensions), providing it manually avoids issues.55), the service automatically tries variations with and without the 9th digit.mention and mentionAll are exclusive to groups. If sent to a DM/channel, the response is 400 Mentions are only supported in group chats.duration field (audio) is informational, whatsmeow still computes its own value from the file. Useful when the server cannot infer it.waveform field is optional and advisory: if omitted, the server generates a standard waveform for PTT.| HTTP | Internal status | Message |
|---|---|---|
| 400 | — | Instance name is required |
| 400 | — | Invalid request body: <detail> |
| 400 | — | Number is required |
| 400 | — | MediaType is required |
| 400 | — | MediaURL is required |
| 400 | — | MediaType must be one of: image, video, document, audio |
| 400 | invalid_number | Invalid phone number format: <detail> |
| 400 | mentions_not_supported | Mentions are only supported in group chats |
| 400 | media_download_failed | Failed to download media: <reason> |
| 400 | media_validation_failed | Invalid media file: <reason> |
| 400 | unsupported_media_type | Unsupported media type: <mime> |
| 500 | media_upload_failed | Failed to upload media to WhatsApp servers |
| 500 | send_failed | Failed to send message: <reason> |
| 404 | — | Instance not found |
| 503 | disconnected | Instance is not connected to WhatsApp |