> ## 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.

# List stored media

> Returns the stored media records for the instance, optionally filtered by the given fields.



## OpenAPI

````yaml openapi.evolution-v2.json POST /s3/getMedia/{instance}
openapi: 3.1.0
info:
  title: Evolution V2 Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Evolution V2. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-v2`. Authenticate with the
    `apikey` header (your Pilot Status `ps_` key). Instance/session endpoints
    are NOT available through the layer.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-v2
security:
  - apiKey: []
tags:
  - name: Call & Business
  - name: Chat
  - name: Group
  - name: Label
  - name: Message
  - name: Profile
  - name: Settings & Proxy
  - name: Storage (S3)
  - name: Template
paths:
  /s3/getMedia/{instance}:
    post:
      tags:
        - Storage (S3)
      summary: List stored media
      description: >-
        Returns the stored media records for the instance, optionally filtered
        by the given fields.
      operationId: post__s3_getMedia_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: The number's display name in the Pilot Status dashboard.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Media record identifier to filter by.
                  example: 5f3e1d2c-8b7a-4c6d-9e0f-1a2b3c4d5e6f
                type:
                  type: string
                  description: >-
                    Media type to filter by (e.g. `image`, `video`, `audio`,
                    `document`).
                  example: image
                messageId:
                  type: integer
                  description: Message identifier the media belongs to.
                  example: 12345
      responses:
        '200':
          description: Success — provider-native response body.
          content:
            application/json:
              schema:
                type: array
                description: >-
                  Array of stored media records for the instance (S3/MinIO
                  integration). Each entry is a Prisma Media row with its
                  related Message.
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Media record id (cuid).
                    fileName:
                      type: string
                      description: >-
                        Object key / path of the file stored in the S3/MinIO
                        bucket.
                    type:
                      type: string
                      description: >-
                        Media category (e.g. image, video, audio, document,
                        sticker).
                    mimetype:
                      type: string
                      description: MIME type of the stored file.
                    createdAt:
                      type: string
                      format: date-time
                      description: Date the media record was created.
                    Message:
                      type: object
                      description: The Message this media belongs to.
                      properties:
                        id:
                          type: string
                          description: Message record id (cuid).
                        key:
                          type: object
                          description: Baileys message key.
                          properties:
                            remoteJid:
                              type: string
                            fromMe:
                              type: boolean
                            id:
                              type: string
                            participant:
                              type: string
                        pushName:
                          type:
                            - string
                            - 'null'
                          description: Sender display name.
                        participant:
                          type:
                            - string
                            - 'null'
                          description: Participant JID (group messages).
                        messageType:
                          type: string
                          description: >-
                            Type of message (e.g. imageMessage, videoMessage,
                            audioMessage, documentMessage).
                        message:
                          type: object
                          description: Raw Baileys message content object.
                          additionalProperties: true
                        contextInfo:
                          type:
                            - object
                            - 'null'
                          description: Baileys contextInfo (quotes, mentions, etc.).
                          additionalProperties: true
                        source:
                          type: string
                          description: Originating device.
                          enum:
                            - android
                            - ios
                            - web
                            - unknown
                            - desktop
                        messageTimestamp:
                          type: integer
                          description: Unix epoch (seconds) of the message.
                        chatwootMessageId:
                          type:
                            - integer
                            - 'null'
                        chatwootInboxId:
                          type:
                            - integer
                            - 'null'
                        chatwootConversationId:
                          type:
                            - integer
                            - 'null'
                        chatwootContactInboxSourceId:
                          type:
                            - string
                            - 'null'
                        chatwootIsRead:
                          type:
                            - boolean
                            - 'null'
                        instanceId:
                          type: string
                          description: Owning instance id.
                        webhookUrl:
                          type:
                            - string
                            - 'null'
                        status:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Delivery status (e.g. PENDING, SERVER_ACK,
                            DELIVERY_ACK, READ).
                        sessionId:
                          type:
                            - string
                            - 'null'
              example:
                - id: clyz9k3m10001x8a1b2c3d4e5
                  fileName: >-
                    evolution-instance/5511999999999@s.whatsapp.net/3EB0F8A1C2D3E4F5A6B7.jpeg
                  type: image
                  mimetype: image/jpeg
                  createdAt: '2026-07-09T00:00:00.000Z'
                  Message:
                    id: clyz9k3m10000x8a1a0b1c2d3
                    key:
                      id: 3EB0F8A1C2D3E4F5A6B7
                      remoteJid: 5511999999999@s.whatsapp.net
                      fromMe: false
                    pushName: João Silva
                    participant: null
                    messageType: imageMessage
                    message:
                      imageMessage:
                        url: https://mmg.whatsapp.net/v/t62.7118-24/enc.jpg
                        mimetype: image/jpeg
                        caption: Segue a foto do produto
                        fileSha256: 9pQ0Z1xL2mN3oP4qR5sT6uV7wX8yZ9aB0cD1eF2gH3=
                        fileLength: '84213'
                        height: 1280
                        width: 720
                        mediaKey: aB1cD2eF3gH4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3aB4c=
                    contextInfo: null
                    source: android
                    messageTimestamp: 1752019200
                    chatwootMessageId: null
                    chatwootInboxId: null
                    chatwootConversationId: null
                    chatwootContactInboxSourceId: null
                    chatwootIsRead: null
                    instanceId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    webhookUrl: null
                    status: DELIVERY_ACK
                    sessionId: null
        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>`.

````