> ## 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 Base Documents

> List knowledge base documents to verify an upload or inspect the non-deleted files in a knowledge base.

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

List knowledge base documents to verify an upload or inspect the non-deleted files in a knowledge base. Results are paginated and include document IDs, titles, file types, and sizes.

## Before you begin

* Use a knowledge base ID from [List Knowledge Bases](/docs/api-reference/v1/knowledge-base/list).
* Send a valid workspace API key.

## List Knowledge Base Documents Request

```http theme={null}
GET /v1/documents?knowledge_base_id=kb_abc123&page=1&limit=10
```

## Verify the result

Read `data.items` and `data.meta` in the `200` response. Pagination metadata includes `totalItems`, `itemsPerPage`, `totalPages`, and `currentPage`. Match an uploaded document by ID and title. `file_size` is in KB, with 1024 bytes per KB.

## Errors and recovery

`401` means the API key is missing or invalid. `404` means the knowledge base ID does not exist in your workspace. Because document listings carry the full text of every file, DialNexa does not confirm that a knowledge base belongs to another workspace, so a valid ID you do not own returns the same `404` as one that was never created. Check the ID against [List Knowledge Bases](/docs/api-reference/v1/knowledge-base/list). Use integer `page` and `limit` values, and a valid document field for `sortBy`. `sortOrder` accepts `ASC` or `DESC`. This read is safe to retry.

## Related endpoints

* [Upload Knowledge Base Document](/docs/api-reference/v1/knowledge-base/upload-document)
* [Manage documents in the dashboard](/docs/knowledge-base/managing-documents)


## OpenAPI

````yaml GET /v1/documents
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
paths:
  /v1/documents:
    get:
      tags:
        - Knowledge Base
      summary: List Knowledge Base Documents
      description: >-
        Lists non-deleted documents for the supplied knowledge base with
        pagination metadata.
      operationId: listKnowledgeBaseDocuments
      parameters:
        - name: knowledge_base_id
          in: query
          required: true
          schema:
            type: string
            example: kb_abc123def45678
          description: Knowledge base ID.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: Page number.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 10
          description: Documents per page.
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            default: id
          description: Document field to sort by.
        - name: sortOrder
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          description: Sort direction.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: boolean
                  statusCode:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/KnowledgeBaseDocument'
                      meta:
                        type: object
                        properties:
                          totalItems:
                            type: integer
                          itemsPerPage:
                            type: integer
                          totalPages:
                            type: integer
                          currentPage:
                            type: integer
                    required:
                      - items
                      - meta
                  timestamp:
                    type: string
                    format: date-time
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
              examples:
                success:
                  value:
                    success: true
                    error: false
                    statusCode: 200
                    message: Success
                    data:
                      items:
                        - id: abc123def45678
                          title: Support FAQ
                          knowledge_base_id: abc123def45678
                          document_type: txt
                          file_size: 1
                          is_deleted: false
                      meta:
                        totalItems: 1
                        itemsPerPage: 10
                        totalPages: 1
                        currentPage: 1
                    timestamp: '2026-09-07T06:00:00.000Z'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 401
                    message: Missing or invalid API key.
                    error: Unauthorized
        '404':
          description: Knowledge base not found in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 404
                    message: Knowledge base not found in this workspace.
                    error: Not Found
      security:
        - bearer: []
components:
  schemas:
    KnowledgeBaseDocument:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        knowledge_base_id:
          type: string
        description:
          type: string
        content:
          type: string
        source:
          type: string
        document_type:
          type: string
        file_path:
          type: string
        file_size:
          type: number
          description: File size in KB (1024 bytes).
        is_deleted:
          type: boolean
    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
      type: http

````