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

# Enviar Mensaje (Archivos)

> Enviar mensaje tipo Media ('imagen', 'documento', 'vídeo' o 'audio') 
 Enviar archivos de una url o locales de su computadora (base64)



## OpenAPI

````yaml POST /message/sendmedia/{nombre-instancia}
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://apiwsp.factiliza.com/v1
security:
  - bearerAuth: []
paths:
  /message/sendmedia/{nombre-instancia}:
    post:
      tags:
        - Message
      description: |-
        Enviar mensaje tipo Media ('imagen', 'documento', 'vídeo' o 'audio') 
         Enviar archivos de una url o locales de su computadora (base64)
      parameters:
        - name: nombre-instancia
          in: path
          required: true
          style: simple
          schema:
            type: string
      requestBody:
        description: Plant to add to the store
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/send-media'
        required: true
      responses:
        '200':
          description: message response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ok'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    send-media:
      required:
        - number
        - media
        - mediatype
      type: object
      properties:
        number:
          type: string
          description: |-
            Número del whatsapp para enviar el mensaje. Codigo de pais + número 
             Ejm: 51999999999
        mediatype:
          type: string
          description: Puede ser 'image', 'document', 'video', o 'audio'.
        filename:
          type: string
          description: >-
            Nombre del archivo con su extension. ejem: invoice.pdf (solo para
            media en base64)

            En media url el filename es opcional
        media:
          type: string
          description: Url  o Base64 de archivo(si es archivo local)
        caption:
          type: string
          description: Es el texto para acompañar el documento enviado.
      additionalProperties: false
    ok:
      required:
        - status
        - message
        - success
      type: object
      properties:
        status:
          type: integer
          format: int32
        success:
          type: boolean
        message:
          type: string
      example:
        status: 200
        success: true
        message: Mensaje enviado con Exito!
    error:
      required:
        - status
        - message
        - success
      type: object
      properties:
        status:
          type: integer
          format: int32
        success:
          type: boolean
        message:
          type: string
      example:
        status: 400
        success: false
        message: The "MA==" instance does not exist or is not connected
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````