> ## 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.

# Get Knowledge Base List

> Get a list of available knowledge base documents



## OpenAPI

````yaml https://api.threetone.in/openapi.json get /v1/voiceai/knowledge-base
openapi: 3.1.0
info:
  title: Threetone API Documentation
  version: 1.0.0
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/voiceai/knowledge-base:
    get:
      tags:
        - Knowledge Base
      summary: Get Knowledge Base List
      description: Get a list of available knowledge base documents
      operationId: get_knowledge_base_list
      parameters:
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: >-
              How many documents to return at maximum. Can not exceed 100,
              defaults to 30.
            default: 30
            title: Page Size
          description: >-
            How many documents to return at maximum. Can not exceed 100,
            defaults to 30.
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              If specified, the endpoint returns only documents whose names
              start with this string.
            title: Search
          description: >-
            If specified, the endpoint returns only documents whose names start
            with this string.
        - name: show_only_owned_documents
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              If set to true, the endpoint will return only documents owned by
              you.
            default: false
            title: Show Only Owned Documents
          description: >-
            If set to true, the endpoint will return only documents owned by
            you.
        - name: types
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/KnowledgeBaseDocumentType'
              - type: 'null'
            description: >-
              If present, the endpoint will return only documents of the given
              types.
            title: Types
          description: >-
            If present, the endpoint will return only documents of the given
            types.
        - name: parent_folder_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              If set, the endpoint will return only documents that are direct
              children of the given folder.
            title: Parent Folder Id
          description: >-
            If set, the endpoint will return only documents that are direct
            children of the given folder.
        - name: ancestor_folder_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              If set, the endpoint will return only documents that are
              descendants of the given folder.
            title: Ancestor Folder Id
          description: >-
            If set, the endpoint will return only documents that are descendants
            of the given folder.
        - name: folders_first
          in: query
          required: false
          schema:
            type: boolean
            description: Whether folders should be returned first in the list of documents.
            default: false
            title: Folders First
          description: Whether folders should be returned first in the list of documents.
        - name: sort_direction
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SortDirection'
            description: The direction to sort the results
            default: desc
          description: The direction to sort the results
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/KnowledgeBaseSortBy'
              - type: 'null'
            description: The field to sort the results by
            title: Sort By
          description: The field to sort the results by
        - 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.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeBaseListResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    KnowledgeBaseDocumentType:
      type: string
      enum:
        - file
        - url
        - text
        - folder
      title: KnowledgeBaseDocumentType
      description: Type of knowledge base document
    SortDirection:
      type: string
      enum:
        - asc
        - desc
      title: SortDirection
      description: Sort direction for list endpoints
    KnowledgeBaseSortBy:
      type: string
      enum:
        - name
        - created_at
        - updated_at
        - size
      title: KnowledgeBaseSortBy
      description: Fields available for sorting knowledge base documents
    GetKnowledgeBaseListResponseModel:
      properties:
        documents:
          items:
            oneOf:
              - $ref: '#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel'
              - $ref: '#/components/schemas/GetKnowledgeBaseSummaryFileResponseModel'
              - $ref: '#/components/schemas/GetKnowledgeBaseSummaryTextResponseModel'
              - $ref: >-
                  #/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel
            discriminator:
              propertyName: type
              mapping:
                file:
                  $ref: >-
                    #/components/schemas/GetKnowledgeBaseSummaryFileResponseModel
                folder:
                  $ref: >-
                    #/components/schemas/GetKnowledgeBaseSummaryFolderResponseModel
                text:
                  $ref: >-
                    #/components/schemas/GetKnowledgeBaseSummaryTextResponseModel
                url:
                  $ref: '#/components/schemas/GetKnowledgeBaseSummaryURLResponseModel'
          type: array
          title: Documents
          description: List of knowledge base documents
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor for fetching the next page
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more documents to fetch
      type: object
      required:
        - documents
        - has_more
      title: GetKnowledgeBaseListResponseModel
      description: |-
        Paginated list of knowledge base documents.
        Enterprise-compatible response model with cursor pagination.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GetKnowledgeBaseSummaryURLResponseModel:
      properties:
        id:
          type: string
          title: Id
          description: Document ID
        name:
          type: string
          title: Name
          description: Document name
        metadata:
          $ref: '#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel'
          description: Document metadata
        supported_usages:
          items:
            $ref: '#/components/schemas/DocumentUsageModeEnum'
          type: array
          title: Supported Usages
          description: Supported usage modes for this document
        access_info:
          $ref: '#/components/schemas/ResourceAccessInfo'
          description: Access information for the requesting user
        folder_parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Folder Parent Id
          description: >-
            The ID of the parent folder, or null if the document is at the root
            level
        folder_path:
          items:
            $ref: '#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel'
          type: array
          title: Folder Path
          description: >-
            The folder path segments leading to this entity, from root to parent
            folder.
        rag_summary:
          anyOf:
            - $ref: '#/components/schemas/RAGSummaryResponseModel'
            - type: 'null'
          description: >-
            Latest RAG index status for this document (None if never indexed or
            folder)
        type:
          type: string
          const: url
          title: Type
          description: Document type discriminator
          default: url
        url:
          type: string
          title: Url
          description: The source URL
      type: object
      required:
        - id
        - name
        - metadata
        - access_info
        - url
      title: GetKnowledgeBaseSummaryURLResponseModel
      description: Knowledge base document summary for URL type
    GetKnowledgeBaseSummaryFileResponseModel:
      properties:
        id:
          type: string
          title: Id
          description: Document ID
        name:
          type: string
          title: Name
          description: Document name
        metadata:
          $ref: '#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel'
          description: Document metadata
        supported_usages:
          items:
            $ref: '#/components/schemas/DocumentUsageModeEnum'
          type: array
          title: Supported Usages
          description: Supported usage modes for this document
        access_info:
          $ref: '#/components/schemas/ResourceAccessInfo'
          description: Access information for the requesting user
        folder_parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Folder Parent Id
          description: >-
            The ID of the parent folder, or null if the document is at the root
            level
        folder_path:
          items:
            $ref: '#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel'
          type: array
          title: Folder Path
          description: >-
            The folder path segments leading to this entity, from root to parent
            folder.
        rag_summary:
          anyOf:
            - $ref: '#/components/schemas/RAGSummaryResponseModel'
            - type: 'null'
          description: >-
            Latest RAG index status for this document (None if never indexed or
            folder)
        type:
          type: string
          const: file
          title: Type
          description: Document type discriminator
          default: file
      type: object
      required:
        - id
        - name
        - metadata
        - access_info
      title: GetKnowledgeBaseSummaryFileResponseModel
      description: Knowledge base document summary for file type
    GetKnowledgeBaseSummaryTextResponseModel:
      properties:
        id:
          type: string
          title: Id
          description: Document ID
        name:
          type: string
          title: Name
          description: Document name
        metadata:
          $ref: '#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel'
          description: Document metadata
        supported_usages:
          items:
            $ref: '#/components/schemas/DocumentUsageModeEnum'
          type: array
          title: Supported Usages
          description: Supported usage modes for this document
        access_info:
          $ref: '#/components/schemas/ResourceAccessInfo'
          description: Access information for the requesting user
        folder_parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Folder Parent Id
          description: >-
            The ID of the parent folder, or null if the document is at the root
            level
        folder_path:
          items:
            $ref: '#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel'
          type: array
          title: Folder Path
          description: >-
            The folder path segments leading to this entity, from root to parent
            folder.
        rag_summary:
          anyOf:
            - $ref: '#/components/schemas/RAGSummaryResponseModel'
            - type: 'null'
          description: >-
            Latest RAG index status for this document (None if never indexed or
            folder)
        type:
          type: string
          const: text
          title: Type
          description: Document type discriminator
          default: text
      type: object
      required:
        - id
        - name
        - metadata
        - access_info
      title: GetKnowledgeBaseSummaryTextResponseModel
      description: Knowledge base document summary for text type
    GetKnowledgeBaseSummaryFolderResponseModel:
      properties:
        id:
          type: string
          title: Id
          description: Document ID
        name:
          type: string
          title: Name
          description: Document name
        metadata:
          $ref: '#/components/schemas/KnowledgeBaseDocumentMetadataResponseModel'
          description: Document metadata
        supported_usages:
          items:
            $ref: '#/components/schemas/DocumentUsageModeEnum'
          type: array
          title: Supported Usages
          description: Supported usage modes for this document
        access_info:
          $ref: '#/components/schemas/ResourceAccessInfo'
          description: Access information for the requesting user
        folder_parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Folder Parent Id
          description: >-
            The ID of the parent folder, or null if the document is at the root
            level
        folder_path:
          items:
            $ref: '#/components/schemas/KnowledgeBaseFolderPathSegmentResponseModel'
          type: array
          title: Folder Path
          description: >-
            The folder path segments leading to this entity, from root to parent
            folder.
        rag_summary:
          anyOf:
            - $ref: '#/components/schemas/RAGSummaryResponseModel'
            - type: 'null'
          description: >-
            Latest RAG index status for this document (None if never indexed or
            folder)
        type:
          type: string
          const: folder
          title: Type
          description: Document type discriminator
          default: folder
        children_count:
          type: integer
          title: Children Count
          description: Number of direct children in the folder
      type: object
      required:
        - id
        - name
        - metadata
        - access_info
        - children_count
      title: GetKnowledgeBaseSummaryFolderResponseModel
      description: Knowledge base document summary for folder type
    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
    KnowledgeBaseDocumentMetadataResponseModel:
      properties:
        created_at_unix_secs:
          type: integer
          title: Created At Unix Secs
          description: Document creation time in unix seconds
        last_updated_at_unix_secs:
          type: integer
          title: Last Updated At Unix Secs
          description: Document last update time in unix seconds
        size_bytes:
          type: integer
          title: Size Bytes
          description: Document size in bytes
      type: object
      required:
        - created_at_unix_secs
        - last_updated_at_unix_secs
        - size_bytes
      title: KnowledgeBaseDocumentMetadataResponseModel
      description: Metadata for knowledge base documents - matches enterprise schema
    DocumentUsageModeEnum:
      type: string
      enum:
        - prompt
        - auto
      title: DocumentUsageModeEnum
      description: |-
        How the document is used in agent context.
        - prompt: Always include full document in LLM context
        - auto: Use RAG to retrieve relevant chunks
    ResourceAccessInfo:
      properties:
        is_creator:
          type: boolean
          title: Is Creator
          description: Whether the user making the request is the creator of the resource
        creator_name:
          type: string
          title: Creator Name
          description: Name of the resource's creator
        creator_email:
          type: string
          title: Creator Email
          description: Email of the resource's creator
        role:
          $ref: '#/components/schemas/ResourceRole'
          description: The role of the user making the request
      type: object
      required:
        - is_creator
        - creator_name
        - creator_email
        - role
      title: ResourceAccessInfo
      description: Access information for a resource
    KnowledgeBaseFolderPathSegmentResponseModel:
      properties:
        id:
          type: string
          title: Id
          description: Folder ID
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Folder name
      type: object
      required:
        - id
      title: KnowledgeBaseFolderPathSegmentResponseModel
      description: Folder path segment for hierarchical navigation
    RAGSummaryResponseModel:
      properties:
        status:
          type: string
          title: Status
          description: created | processing | succeeded | failed
        progress_percentage:
          type: number
          title: Progress Percentage
          description: 0-100 indexing progress
          default: 0
      type: object
      required:
        - status
      title: RAGSummaryResponseModel
      description: Inline RAG indexing status included in list responses.
    ResourceRole:
      type: string
      enum:
        - admin
        - editor
        - commenter
        - viewer
      title: ResourceRole
      description: Role for resource access control
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: API key for programmatic access
      in: header
      name: x-api-key
    HTTPBearer:
      type: http
      description: JWT Bearer token for dashboard access
      scheme: bearer

````