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

# Search Messages

> Search for messages. Up to 50 results will be returned. Bot messages will not be included.



## OpenAPI

````yaml api-reference/openapi.json post /search/messages
openapi: 3.0.3
info:
  version: 0.1.0
  title: Client API
servers:
  - url: https://1-some-client.some-server.healvi-chat/third-party/v1
security:
  - bearerAuth: []
paths:
  /search/messages:
    post:
      tags:
        - search
      summary: >-
        Search for messages. Up to 50 results will be returned. Bot messages
        will not be included.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  description: The search term to look for. Uses fuzzy search.
                  type: string
                conversation_id:
                  description: If given, only search for messages in that conversation.
                  type: integer
                  nullable: true
                not_older_than_days:
                  description: Max age of messages. Lower to increase search performance.
                  type: integer
                  default: 30
                  nullable: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        channel:
                          $ref: '#/components/schemas/Channel'
                        message_id:
                          type: integer
                        conversation_id:
                          type: integer
                        customer_id:
                          type: integer
                        profile_id:
                          type: integer
                        profile_name:
                          type: string
                        preview:
                          description: Content of the message which passed the query.
                          type: string
                        score:
                          description: >
                            0 indicates perfect match. 1 means complete
                            mismatch.

                            Only matches with score lower than 0.3 will be
                            returned.
                          type: number
components:
  schemas:
    Channel:
      description: Type of messenger service.
      type: string
      enum:
        - bridge
        - whatsapp
        - widget
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````