---
title: "download media from message"
method: POST
path: "/instances/{id}/client/action/download-media"
tags: ["message"]
---

# download media from message

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

Downloads the media content from a message and returns a temporary download URL valid for 15 minutes. Use this instead of get-message-by-id with includeMedia when you only need the media file.

## Path parameters

- `id` integer, required

## Request body

- object
  - `messageId` string, required — Serialized message ID in format: <fromMe>_<chatId>_<messageHash>

## Response `200`

Media download URL generated

- object
  - `status` 'success' | 'error'
  - `instanceId` string
  - `data` object
    - `message` object — The message object
    - `media` object
      - `url` string — Temporary signed download URL (valid 15 minutes)
      - `mimetype` string
      - `filename` string, nullable
      - `filesize` integer, nullable

---

[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)
