> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotstatus.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Download media

> Downloads and decrypts the media attached to a received message, returning it as a base64 data URL.



## OpenAPI

````yaml openapi.evolution-go.json POST /message/downloadmedia
openapi: 3.1.0
info:
  title: Evolution GO Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Evolution GO. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-go`. Authenticate with the
    `apikey` header (your Pilot Status `ps_` key) or `Authorization: Bearer`.
    Instance/session endpoints are NOT available through the layer.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-go
security:
  - apiKey: []
tags:
  - name: Call (voice)
  - name: Chat
  - name: Community
  - name: Group
  - name: Label
  - name: Message
  - name: Newsletter / Channels
  - name: Send (load-balanced)
  - name: User / Contacts
paths:
  /message/downloadmedia:
    post:
      tags:
        - Message
      summary: Download media
      description: >-
        Downloads and decrypts the media attached to a received message,
        returning it as a base64 data URL.
      operationId: post__message_downloadmedia
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: object
                  description: >-
                    Full message payload containing the media node to download —
                    one of `imageMessage`, `audioMessage`, `videoMessage`,
                    `documentMessage`, or `stickerMessage` — with its `url`,
                    `directPath`, `mediaKey`, `fileEncSHA256`, `fileSHA256`,
                    `mimetype`, and `fileLength`
                  example:
                    imageMessage:
                      url: https://mmg.whatsapp.net/d/f/AbCdEf123456.enc
                      directPath: /v/t62.7118-24/12345_67890.enc
                      mediaKey: sPqT2bXyZ0aBcDeFgHiJkLmNoPqRsTuVwXyZ012345=
                      mimetype: image/jpeg
                      fileEncSHA256: 9dJkLmNoPqRsTuVwXyZ0123456789AbCdEfGhIjKlMno=
                      fileSHA256: Q1w2E3r4T5y6U7i8O9p0AsDfGhJkLzXcVbNmQwErTyU=
                      fileLength: 24576
              required:
                - message
      responses:
        '200':
          description: Success — provider-native response body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Always "success" on HTTP 200.
                  data:
                    type: object
                    properties:
                      base64:
                        type: string
                        description: >-
                          Downloaded and decrypted media as an RFC 2397 data
                          URL: data:<mimetype>;base64,<payload>.
                      timestamp:
                        type: string
                        description: >-
                          Go time.Time string. Zero value ("0001-01-01 00:00:00
                          +0000 UTC") in the current implementation.
              example:
                message: success
                data:
                  base64: >-
                    data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAABAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAX/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABmX/9k=
                  timestamp: 0001-01-01 00:00:00 +0000 UTC
        default:
          description: Error — provider or layer error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                  response:
                    type: object
              example:
                status: 400
                error: Bad Request
                message: Invalid payload
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Your Pilot Status API key (ps_...). Evolution GO also accepts
        `Authorization: Bearer <key>`.

````