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

# Enviar um documento

> Envia uma mensagem com documento para um chat específico



## OpenAPI

````yaml POST /messages/send-document
openapi: 3.0.0
info:
  title: Botly Messaging API
  description: API para envio de mensagens de texto através da plataforma Botly
  version: 1.0.0
servers:
  - url: https://api.botly.com.br/api/v1/rest
security:
  - apiKeyAuth: []
paths:
  /messages/send-document:
    post:
      summary: Enviar mensagem com documento
      description: Envia uma mensagem com documento para um chat específico
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - chatId
                - document
              properties:
                chatId:
                  type: string
                  description: Identificador único do chat de destino
                  example: '1234567890'
                document:
                  type: string
                  description: URL do documento a ser enviado
                  example: https://example.com/document.pdf
                caption:
                  type: string
                  description: Mensagem de texto anexada ao documento (opcional)
                  example: Confira este documento importante!
      responses:
        '200':
          description: Mensagem com documento enviada com sucesso
        '400':
          description: Erro na requisição
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                  message:
                    type: string
        '401':
          description: Não autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                  message:
                    type: string
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````