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

# Send media

> Sends an image, video, document, or audio file by public URL (base64 and multipart file upload are also supported).



## OpenAPI

````yaml openapi.evolution-v2.json POST /message/sendMedia/{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:
  /message/sendMedia/{instance}:
    post:
      tags:
        - Message
      summary: Send media
      description: >-
        Sends an image, video, document, or audio file by public URL (base64 and
        multipart file upload are also supported).
      operationId: post__message_sendMedia_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: The number's display name in the Pilot Status dashboard.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  description: Recipient phone in E.164 without `+`, or a JID.
                  example: '5511999999999'
                mediatype:
                  type: string
                  description: One of `image`, `document`, `video`, `audio`.
                  example: image
                media:
                  type: string
                  description: Public URL (or base64) of the media file.
                  example: https://media.pilotstatus.com.br/example.png
                mimetype:
                  type: string
                  description: MIME type of the media (e.g. `image/png`).
                  example: image/png
                fileName:
                  type: string
                  description: File name, used for documents.
                  example: example.png
                caption:
                  type: string
                  description: Caption text shown with the media.
                  example: Check this out
                delay:
                  type: integer
                  description: Delay before sending, in milliseconds.
                quoted:
                  type: object
                  description: Message to quote/reply to (`key`, `message`).
                everyOne:
                  type: boolean
                  description: Mention everyone in the group.
                mentioned:
                  type: array
                  items:
                    type: string
                  description: Array of numeric strings to mention.
              required:
                - number
                - mediatype
                - media
      responses:
        '200':
          description: Success — provider-native response body.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Sent media message (image, video or document). Returns the
                  persisted Baileys messageRaw envelope; the message content key
                  depends on the mediatype.
                properties:
                  key:
                    type: object
                    properties:
                      remoteJid:
                        type: string
                        description: Recipient JID.
                      fromMe:
                        type: boolean
                      id:
                        type: string
                        description: Unique WhatsApp message id.
                  pushName:
                    type: string
                    description: Sender display name ('Você' for own messages).
                  status:
                    type: string
                    enum:
                      - ERROR
                      - PENDING
                      - SERVER_ACK
                      - DELIVERY_ACK
                      - READ
                      - PLAYED
                  message:
                    type: object
                    description: >-
                      Media content. One of imageMessage / videoMessage /
                      documentMessage is present according to the sent
                      mediatype.
                    properties:
                      imageMessage:
                        type: object
                        description: Present when mediatype is image.
                        properties:
                          url:
                            type: string
                            description: Encrypted WhatsApp CDN URL.
                          mimetype:
                            type: string
                          caption:
                            type: string
                          fileSha256:
                            type: string
                            description: Base64 SHA-256 of the encrypted file.
                          fileLength:
                            type: string
                            description: File size in bytes (stringified long).
                          mediaKey:
                            type: string
                            description: Base64 media decryption key.
                          directPath:
                            type: string
                  contextInfo:
                    type:
                      - object
                      - 'null'
                  messageType:
                    type: string
                    description: e.g. 'imageMessage', 'videoMessage', 'documentMessage'.
                  messageTimestamp:
                    type: integer
                    description: Unix timestamp (seconds).
                  instanceId:
                    type: string
                  source:
                    type: string
                    description: Origin device.
              example:
                key:
                  remoteJid: 5511999999999@s.whatsapp.net
                  fromMe: true
                  id: 3EB0A1B2C3D4E5F6A7B8C9
                pushName: Você
                status: PENDING
                message:
                  imageMessage:
                    url: >-
                      https://mmg.whatsapp.net/v/t62.7118-24/12345_123456789012345_1234567890123456789_n.enc
                    mimetype: image/jpeg
                    caption: Confira nosso novo produto!
                    fileSha256: V0hBVFNBUFBGSUxFSEFTSDI1NkVYQU1QTEU9
                    fileLength: '84213'
                    mediaKey: TUVESUFLRVlCQVNFNjRFWEFNUExFVkFMVUU9
                    directPath: >-
                      /v/t62.7118-24/12345_123456789012345_1234567890123456789_n.enc
                contextInfo: null
                messageType: imageMessage
                messageTimestamp: 1720483260
                instanceId: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
                source: web
        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>`.

````