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

# Search Knowledge Base

> Search a knowledge base (debug/development endpoint).



## OpenAPI

````yaml /openapi.json post /v1/knowledge-bases/{kb_id}/search
openapi: 3.1.0
info:
  title: TurnCall
  description: Production voice agent platform API
  version: 0.1.0
servers: []
security: []
paths:
  /v1/knowledge-bases/{kb_id}/search:
    post:
      tags:
        - knowledge-bases
      summary: Search Knowledge Base
      description: Search a knowledge base (debug/development endpoint).
      operationId: search_knowledge_base_v1_knowledge_bases__kb_id__search_post
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Kb Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Search Knowledge Base V1 Knowledge Bases  Kb Id 
                  Search Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SearchRequest:
      properties:
        query:
          type: string
          maxLength: 4000
          minLength: 1
          title: Query
        top_k:
          type: integer
          maximum: 50
          minimum: 1
          title: Top K
          default: 5
        similarity_threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Similarity Threshold
          default: 0.3
      type: object
      required:
        - query
      title: SearchRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````