---
title: "send a media message (image, video, audio, document)"
method: POST
path: "/instances/{id}/client/action/send-media"
tags: ["message"]
---

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

`POST /instances/{id}/client/action/send-media`

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. 123456789@c.us)
- Group chat: {group_id}@g.us (e.g. 123456789-123456789@g.us)
- 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

## Path parameters

- `id` integer, required

## Request body

- object
  - `chatId` string, required — Chat ID <countrycode_short><usernumber>@c.us or @g.us for groups
  - `mediaUrl` string — URL of the media file to send
  - `mediaBase64` string — Base64 encoded media content
  - `mediaCaption` string — Optional caption for the media
  - `mediaName` string — Optional filename for the media (required for Base64)
  - `replyToMessageId` string — Optional message ID to reply to in format: <fromMe>_<chatId>_<messageHash>
  - `previewLink` boolean — Whether to show link previews
  - `asSticker` boolean — Send image as a sticker
  - `asVoice` boolean — Send audio as voice message
  - `asDocument` boolean — Send media as a document
  - `firedandforget` boolean — Set to true to process the request asynchronously. Returns a reference UUID for polling via GET /instances/{id}/request/{reference}. Alias: faf

## Response `200`

Returns the sent message object

- object
  - `status` string
  - `instanceId` string
  - `data` object
    - `_data` object
      - `id` object
        - `fromMe` boolean
        - `remote` string
        - `id` string
        - `_serialized` string
      - `type` string
      - `t` integer
      - `ack` integer
      - `from` string
      - `to` string
      - `isNewMsg` boolean
      - `hasMedia` boolean
      - `mediaKey` string
      - `mimetype` string

## Other 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
- `422` — Validation error — invalid or missing request parameters
- `429` — Too many requests — rate limit exceeded

---

[API](https://skmtc.net/waapi/apis/waapi-api.md) · [All operations](https://skmtc.net/waapi/apis/waapi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/waapi/waapi-api/revisions/1e2cc7c12090/schema)
