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

# Buscar mensagens na conversa

> Busca mensagens da conversa cujo conteúdo contém o termo informado, ordenadas cronologicamente.



## OpenAPI

````yaml https://api.jurichat.com/docs/client/openapi.json get /conversation/{conversationId}/messages/search
openapi: 3.1.0
info:
  title: JuriChat API — Documentação para Integradores
  description: ''
  version: 1.0.0
servers:
  - url: https://api.jurichat.com
    description: Production server
security:
  - apiKeyAuth: []
tags: []
paths:
  /conversation/{conversationId}/messages/search:
    get:
      tags:
        - Conversations
      summary: Buscar mensagens na conversa
      description: >-
        Busca mensagens da conversa cujo conteúdo contém o termo informado,
        ordenadas cronologicamente.
      parameters:
        - schema:
            type: string
            minLength: 3
            maxLength: 100
          in: query
          name: content
          required: true
          description: Termo buscado no conteúdo das mensagens da conversa.
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
          description: Quantidade máxima de resultados. Padrão 50, máximo 100.
        - schema:
            type: string
            pattern: ^[cC][^\s-]{8,}$
          in: path
          name: conversationId
          required: true
          description: ID da conversa.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        messageId:
                          type: string
                        messageAt:
                          type: string
                          format: date-time
                        type:
                          type: string
                          description: Tipo da mensagem (text, image, audio, etc.).
                        snippet:
                          type: string
                          description: >-
                            Trecho legível da mensagem. Mídia aparece como
                            rótulo + legenda/transcrição, nunca como URL.
                      required:
                        - messageId
                        - messageAt
                        - type
                        - snippet
                      additionalProperties: false
                  total:
                    type: number
                  hasMore:
                    type: boolean
                required:
                  - data
                  - total
                  - hasMore
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  code:
                    type: string
                  details:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: object
                        properties: {}
                        additionalProperties: true
                    description: Detalhes adicionais do erro.
                required:
                  - message
                  - statusCode
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  code:
                    type: string
                  details:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: object
                        properties: {}
                        additionalProperties: true
                    description: Detalhes adicionais do erro.
                required:
                  - message
                  - statusCode
                additionalProperties: false
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-jurichat-api-key
      description: >-
        Chave de API do escritório (criada no painel). Envie o valor no header
        x-jurichat-api-key.

````