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

# List Knowledge Bases

> List knowledge bases in your workspace.

<span data-api-safety-label="read-only"><Badge color="gray" size="sm" shape="pill">Read only</Badge></span>

<Info>
  **v1 only.** Knowledge bases are available on the `/v1` API. There is no legacy unversioned equivalent.
</Info>

Return all knowledge bases that belong to the authenticated workspace. Use this to populate a picker in your own UI, or to find the `id` of a knowledge base before attaching it to an agent.

## When to use this

* **Pickers**: list the knowledge bases an operator can attach to an agent.
* **ID lookup**: find the `kb_` ID by name before passing it in `knowledge_base_ids` on [Create Agent](/docs/api-reference/v1/agents/create) or [Update Agent](/docs/api-reference/v1/agents/update).
* **Housekeeping**: audit which knowledge bases exist before creating a new one, since names must be unique within a workspace.

The response contains an `items` array and a `meta` object with `totalItems`, `itemsPerPage`, `totalPages`, and `currentPage`. The endpoint accepts `page`, `limit`, `sortBy`, and `sortOrder`; see [Pagination](/docs/api-reference/pagination) for iteration examples.


## OpenAPI

````yaml GET /v1/knowledge-base
openapi: 3.0.0
info:
  title: DialNexa API
  description: >-
    Public REST API for the DialNexa voice AI platform. Versioned endpoints are
    under /v1; unversioned endpoints are legacy and deprecated.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: API Keys
  - name: Agent Functions
  - name: Agents V1
  - name: Agents2
  - name: Batch Calls
  - name: Batch Calls V1
  - name: Call Logs
  - name: Calls
  - name: Calls V1
  - name: Campaign Leads
  - name: Campaigns
  - name: External Webhooks
  - name: Knowledge Base
  - name: Knowledge Base V1
  - name: LLMs
  - name: LLMs V1
  - name: Languages
  - name: Languages V1
  - name: Organization Phone Numbers
  - name: Organization Phone Numbers V1
  - name: Phone Number Pricing
  - name: Phone Number Pricing V1
  - name: Transcribers
  - name: Transcribers V1
  - name: User Webhooks
  - name: User Webhooks V1
  - name: V1
  - name: Voices
  - name: Voices V1
  - name: Webcall
  - name: Workflow Leads
  - name: Workflow Leads V1
  - name: Workflows
  - name: Workflows V1
paths:
  /v1/knowledge-base:
    get:
      tags:
        - Knowledge Base
        - Knowledge Base V1
        - V1
      summary: List Knowledge Bases
      description: >-
        Returns knowledge bases for the authenticated workspace in an items and
        meta pagination envelope.
      operationId: KnowledgeBaseV1Controller_findAll
      parameters:
        - name: page
          required: false
          in: query
          schema:
            type: number
            example: 1
        - name: limit
          required: false
          in: query
          schema:
            example: 20
            type: number
        - name: sortBy
          required: false
          in: query
          schema:
            example: id
            type: string
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
      responses:
        '200':
          description: Knowledge bases returned successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - meta
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeBase'
                  meta:
                    type: object
                    required:
                      - totalItems
                      - itemsPerPage
                      - totalPages
                      - currentPage
                    properties:
                      totalItems:
                        type: integer
                        example: 1
                      itemsPerPage:
                        type: integer
                        example: 20
                      totalPages:
                        type: integer
                        example: 1
                      currentPage:
                        type: integer
                        example: 1
              examples:
                success:
                  summary: Successful response
                  value:
                    items:
                      - id: kb_abc123
                        name: Loan FAQ
                    meta:
                      totalItems: 1
                      itemsPerPage: 20
                      totalPages: 1
                      currentPage: 1
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 401 Unauthorized
                  value:
                    statusCode: 401
                    message: API key is missing or invalid
                    error: Unauthorized
      security:
        - bearer: []
components:
  schemas:
    KnowledgeBase:
      type: object
      properties:
        id:
          type: string
          example: kb_abc123
          description: Signed knowledge base ID.
        name:
          type: string
          example: Loan FAQ
          maxLength: 150
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: phone_number must be a valid E.164 phone number
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````