send a media message (image, video, audio, document)

Send a media file to a chat. Provide either mediaUrl (a publicly accessible URL) or mediaBase64 (base64-encoded file content with mediaName), but not both.

The chatId format varies depending on the chat type:

  • Individual chat: {phone_number}@c.us (e.g. [email protected])
  • Group chat: {group_id}@g.us (e.g. [email protected])
  • Channel/Newsletter: {channel_id}@newsletter (e.g. 123456789@newsletter)

Supported media types:

  • Images: jpg, jpeg, png, gif
  • Videos: mp4, 3gp, mov
  • Audio: mp3, wav, ogg, m4a
  • Documents: pdf, doc, docx, txt, xlsx, etc
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int64
required

Instance ID

Body Params

Media can be sent either via URL or Base64. For Base64 media, a filename is required.

string
required

Chat ID <countrycode_short>@c.us or @g.us for groups

string

URL of the media file to send

string

Base64 encoded media content

string

Optional caption for the media

string

Optional filename for the media (required for Base64)

string

Optional message ID to reply to in format:

boolean
Defaults to true
boolean
Defaults to false

Send image as a sticker

boolean
Defaults to false

Send audio as voice message

boolean
Defaults to false

Send media as a document

boolean
Defaults to false

Set to true to process the request asynchronously. Returns a reference UUID for polling via GET /instances/{id}/request/{reference}. Alias: faf

Responses

401

Unauthorized β€” invalid or missing bearer token

403

Forbidden β€” insufficient permissions or account blocked

404

Not found β€” instance does not exist or does not belong to you

409

Conflict β€” instance is not ready

429

Too many requests β€” rate limit exceeded

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json