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

# Enviar Mídia

> Envia imagem, vídeo ou documento



## OpenAPI

````yaml openapi-v2.json post /messages/media
openapi: 3.0.0
info:
  title: Wapizap API v2 - Native
  description: >-
    API v2 nativa Wapizap com arquitetura RESTful moderna. Inclui 60 endpoints
    para gerenciamento completo de integrações WhatsApp, incluindo instâncias,
    mensagens, chats, grupos, contatos, webhooks e downloads.
  version: 2.0.0
  contact:
    name: Wapizap Support
    url: https://wapizap.com/support
servers:
  - url: https://api.wapizap.com/api/v2
    description: Produção
  - url: http://localhost:3000/api/v2
    description: Desenvolvimento
security:
  - BearerAuth: []
tags:
  - name: Instances
    description: Gerenciamento de instâncias WhatsApp
  - name: Messages
    description: Envio e gerenciamento de mensagens
  - name: Chats
    description: Gerenciamento de chats e conversas
  - name: Contacts
    description: Gerenciamento de contatos
  - name: Groups
    description: Gerenciamento de grupos
  - name: Webhooks
    description: Configuração de webhooks
  - name: Downloads
    description: Download de mídias
paths:
  /messages/media:
    post:
      tags:
        - Messages
      summary: Enviar Mídia
      description: Envia imagem, vídeo ou documento
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - instanceId
                - to
                - mediaUrl
                - mediaType
              properties:
                instanceId:
                  type: string
                  format: uuid
                to:
                  type: string
                  example: '5511999999999'
                mediaUrl:
                  type: string
                  format: uri
                  example: https://example.com/image.jpg
                mediaType:
                  type: string
                  enum:
                    - image
                    - video
                    - document
                caption:
                  type: string
                  example: Confira esta imagem!
                fileName:
                  type: string
                  example: documento.pdf
      responses:
        '201':
          description: Mídia enviada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
components:
  schemas:
    Message:
      type: object
      properties:
        id:
          type: string
        instanceId:
          type: string
        remoteJid:
          type: string
        fromMe:
          type: boolean
        type:
          type: string
          enum:
            - text
            - image
            - video
            - audio
            - document
            - sticker
            - location
            - contact
            - poll
            - reaction
            - buttons
            - list
        content:
          type: object
        timestamp:
          type: integer
        status:
          type: string
          enum:
            - pending
            - sent
            - delivered
            - read
            - failed
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````