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

# List Knowledge Bases

> Returns all knowledge bases for the current account.
Requires `knowledge:view` permission.




## OpenAPI

````yaml GET /api/knowledge-bases
openapi: 3.1.0
info:
  title: Naturalead Knowledge Bases API
  version: 1.0.0
  description: >
    API for managing knowledge bases, documents, sitemap crawl jobs, and webhook

    sources in the Naturalead platform. All endpoints require API key
    authentication

    and are scoped to the caller's account.
servers:
  - url: '{baseUrl}'
    description: API server
    variables:
      baseUrl:
        default: http://localhost:3001
security:
  - BearerAuth: []
tags:
  - name: Knowledge Bases
    description: Knowledge base CRUD operations
  - name: Documents
    description: Document management within a knowledge base
  - name: Sitemap & Crawl Jobs
    description: Sitemap scanning and web crawl job management
  - name: Webhook Sources
    description: Webhook source management for auto-updating content
paths:
  /api/knowledge-bases:
    get:
      tags:
        - Knowledge Bases
      summary: List knowledge bases
      description: |
        Returns all knowledge bases for the current account.
        Requires `knowledge:view` permission.
      operationId: listKnowledgeBases
      responses:
        '200':
          description: List of knowledge bases
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KnowledgeBase'
components:
  schemas:
    KnowledgeBase:
      type: object
      properties:
        _id:
          type: string
          description: Unique identifier
        accountId:
          type: string
          description: Owning account ID
        name:
          type: string
          description: Knowledge base name
        description:
          type: string
          description: Knowledge base description
        type:
          type: string
          enum:
            - internal
            - external
          description: Knowledge base type
        documentCount:
          type: integer
          description: Number of documents in the knowledge base
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - _id
        - accountId
        - name
        - type
        - documentCount
        - createdAt
        - updatedAt
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token using an API key (format nl_live_* or nl_test_*)

````