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

# List knowledge bases

> Lists knowledge bases (current behavior).

## Notes

* Lists knowledge bases with filtering and pagination


## OpenAPI

````yaml get /api/knowledge-bases/list-knowledge-bases
openapi: 3.0.3
info:
  title: Zudu API
  description: >-
    Comprehensive REST API for LiveKit Backend - Call Management, Agent
    Configuration, and Real-time Communication Services
  version: 1.0.0
  contact:
    name: Zudu AI Team
    url: https://zudu.ai
    email: support@zudu.ai
  license:
    name: Proprietary
    url: https://zudu.ai/license
servers:
  - url: https://api.zudu.ai
    description: Production (Customer-facing)
security:
  - apiKey: []
    apiSecret: []
tags:
  - name: Agent Management
    description: Create and manage AI agents
  - name: Call Data Management
    description: Call records and history
  - name: Customer API Keys
    description: Manage API keys
  - name: Post-Call Webhooks
    description: Webhook configuration
  - name: phone-number-controller
    description: Phone numbers
  - name: batch-call-controller
    description: Batch calls
  - name: MCP Server Management
    description: MCP servers
  - name: Knowledge Base Management
    description: Knowledge bases
  - name: Call Analysis
    description: Call analysis
paths:
  /api/knowledge-bases/list-knowledge-bases:
    get:
      tags:
        - Knowledge Base Management
      summary: List knowledge bases
      description: >-
        Lists knowledge bases with filtering and pagination. Requires orgId
        header.
      operationId: listKnowledgeBases
      parameters:
        - name: limit
          in: query
          required: false
          description: Number of results per page
          schema:
            type: integer
            format: int32
            example: 10
        - name: page
          in: query
          required: false
          description: Page number (0-based)
          schema:
            type: integer
            format: int32
            example: 0
        - name: sort_order
          in: query
          required: false
          description: 'Sort direction: ascending or descending'
          schema:
            type: string
            example: descending
        - name: sort_by
          in: query
          required: false
          description: 'Sort field: updated_at, created_at, knowledge_base_name, status'
          schema:
            type: string
            example: updated_at
        - name: name
          in: query
          required: false
          description: Filter by knowledge base name
          schema:
            type: string
            example: Customer
      responses:
        '200':
          description: Knowledge bases retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  status:
                    type: string
                  error:
                    type: string
                    nullable: true
                  data:
                    type: object
                    properties:
                      organization_id:
                        type: string
                      knowledge_bases:
                        type: array
                        items:
                          $ref: '#/components/schemas/KnowledgeBase'
                      returned_count:
                        type: integer
                      pagination:
                        type: object
                        properties:
                          page:
                            type: integer
                          limit:
                            type: integer
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          has_next:
                            type: boolean
                          has_previous:
                            type: boolean
                      sort_order:
                        type: string
                      sort_by:
                        type: string
                      applied_filters:
                        type: object
              example:
                message: Knowledge bases retrieved successfully
                status: success
                error: null
                data:
                  organization_id: your-org-id
                  knowledge_bases:
                    - knowledge_base_id: knowledge_base_abc123
                      knowledge_base_name: Customer Support KB
                      status: ready
                      enable_auto_refresh: true
                      last_refreshed_timestamp: 1704067200000
                      created_at: '2024-01-01T00:00:00Z'
                      updated_at: '2024-01-01T00:00:00Z'
                  returned_count: 1
                  pagination:
                    page: 0
                    limit: 10
                    total_pages: 1
                    total_count: 1
                    has_next: false
                    has_previous: false
                  sort_order: descending
                  sort_by: updated_at
                  applied_filters:
                    name: Customer
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseListKnowledgeBase'
              example:
                message: Validation error
                status: error
                error: Knowledge base name is required
                data: null
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseListKnowledgeBase'
              example:
                message: Failed to create knowledge base
                status: error
                error: Azure Storage connection failed
                data: null
components:
  schemas:
    KnowledgeBase:
      type: object
      properties:
        knowledge_base_id:
          type: string
        organization_id:
          type: string
        knowledge_base_name:
          type: string
        status:
          type: string
          enum:
            - draft
            - in_progress
            - ready
            - failed
        enable_auto_refresh:
          type: boolean
        last_refreshed_timestamp:
          type: integer
          format: int64
        knowledge_base_sources:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeBaseSource'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        access_info:
          type: object
          additionalProperties:
            type: object
        agent_info:
          type: array
          items:
            $ref: '#/components/schemas/AgentInfo'
    ApiResponseListKnowledgeBase:
      type: object
      properties:
        message:
          type: string
        status:
          type: string
        error:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeBase'
    KnowledgeBaseSource:
      type: object
      properties:
        textSource:
          type: boolean
        urlSource:
          type: boolean
        documentSource:
          type: boolean
        source_id:
          type: string
        knowledge_base_id:
          type: string
        type:
          type: string
          enum:
            - text
            - url
            - document
        filename:
          type: string
        file_url:
          type: string
        title:
          type: string
        text:
          type: string
        url:
          type: string
        azure_blob_path:
          type: string
        file_size:
          type: integer
          format: int64
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
        processing_error:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AgentInfo:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key for MCP server and external service authentication
      name: X-API-KEY
      in: header
    apiSecret:
      type: apiKey
      description: API Secret for MCP server and external service authentication
      name: X-API-SECRET
      in: header

````