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

# Listar mensagens

> Retorna mensagens. Filtre por conversation_id.



## OpenAPI

````yaml /openapi.json get /messages
openapi: 3.1.0
info:
  title: Synax API
  description: >-
    API pública do Synax para integrações externas. Usa API Keys para
    autenticação e o endpoint api-proxy para todas as operações CRUD.
  version: 2.0.0
  contact:
    name: Synax
    url: https://synax.app.br
servers:
  - url: https://api.synax.app.br/functions/v1/api-proxy
    description: Produção
security:
  - bearerApiKey: []
paths:
  /messages:
    get:
      tags:
        - Mensagens
      summary: Listar mensagens
      description: Retorna mensagens. Filtre por conversation_id.
      operationId: listMessages
      parameters:
        - name: conversation_id
          in: query
          schema:
            type: string
          description: Filtro por ID da conversa
        - name: order
          in: query
          schema:
            type: string
          example: created_at.asc
        - name: limit
          in: query
          schema:
            type: integer
          example: 50
      responses:
        '200':
          description: Lista de mensagens
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
components:
  schemas:
    Message:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        conversation_id:
          type: string
          format: uuid
        content:
          type: string
        direction:
          type: string
          enum:
            - in
            - out
            - internal
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
            - document
            - location
        sender_name:
          type: string
        media_url:
          type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      description: 'API Key gerada em Configurações > API. Formato: sk_live_...'

````