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

# Smart Search Conversation Messages

> Search conversation transcripts by semantic similarity to surface relevant messages based on meaning and intent, rather than exact keyword matches



## OpenAPI

````yaml /api-reference/openapi.json get /v1/convai/conversations/messages/smart-search
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/conversations/messages/smart-search:
    get:
      tags:
        - Agents Platform
      summary: Smart Search Conversation Messages
      description: >-
        Search conversation transcripts by semantic similarity to surface
        relevant messages based on meaning and intent, rather than exact keyword
        matches
      operationId: smart_search_conversation_messages_route
      parameters:
        - name: text_query
          in: query
          required: true
          schema:
            type: string
            description: The search query text for semantic similarity matching
            title: Text Query
          description: The search query text for semantic similarity matching
          examples:
            default:
              summary: Intent-style query
              value: Customer asking to cancel and get money back
        - name: agent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Agent id (agent_…) or speech engine external id (seng_), resolved
              to the same underlying resource.
            examples:
              - agent_3701k3ttaq12ewp8b7qv5rfyszkz
              - seng_3701k3ttaq12ewp8b7qv5rfyszkz
            title: Agent Id
          description: >-
            Agent id (agent_…) or speech engine external id (seng_), resolved to
            the same underlying resource.
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            description: Number of results per page. Max 50.
            default: 20
            title: Page Size
          description: Number of results per page. Max 50.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Used for fetching next page. Cursor is returned in the response.
            title: Cursor
          description: Used for fetching next page. Cursor is returned in the response.
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessagesSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MessagesSearchResponse:
      properties:
        meta:
          $ref: '#/components/schemas/ListResponseMeta'
          default: {}
        results:
          items:
            $ref: '#/components/schemas/MessagesSearchResult'
          type: array
          title: Results
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor for the next page of results
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more results available
      type: object
      required:
        - results
        - has_more
      title: MessagesSearchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ListResponseMeta:
      properties:
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
        page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page
        page_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page Size
      type: object
      title: ListResponseMeta
    MessagesSearchResult:
      properties:
        conversation_id:
          type: string
          title: Conversation Id
        agent_id:
          type: string
          title: Agent Id
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
        transcript_index:
          type: integer
          title: Transcript Index
        chunk_text:
          type: string
          title: Chunk Text
        score:
          type: number
          title: Score
        conversation_start_time_unix_secs:
          type: integer
          title: Conversation Start Time Unix Secs
      type: object
      required:
        - conversation_id
        - agent_id
        - transcript_index
        - chunk_text
        - score
        - conversation_start_time_unix_secs
      title: MessagesSearchResult
      description: >-
        transcript_index: index of the message in the conversation transcript

        chunk_text: text of the transcript; transcript messages if very long
        could have several chunks.

        score: similarity score of the message to the search query
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````