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

# List documents in a knowledge base



## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json get /api/v1/rag/document
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/rag/document:
    get:
      tags:
        - Document
      summary: List documents in a knowledge base
      parameters:
        - name: kbId
          in: query
          description: Knowledge base ID
          schema:
            type: string
            format: uuid
        - name: status
          in: query
          description: Filter by status (optional)
          schema:
            allOf:
              - $ref: '#/components/schemas/DocumentStatus'
        - name: skip
          in: query
          description: Optional, skip N records. Default 0
          schema:
            maximum: 2147483647
            minimum: 0
            type: integer
            format: int32
            default: 0
        - name: take
          in: query
          description: Optional, take M records. Default 20
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
            default: 20
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/DocumentInfoResponsePaginatedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentInfoResponsePaginatedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/DocumentInfoResponsePaginatedResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
components:
  schemas:
    DocumentStatus:
      enum:
        - Uploaded
        - Queued
        - Processing
        - Indexed
        - Failed
        - Cancelled
        - PendingDelete
        - Deleting
      type: string
    DocumentInfoResponsePaginatedResponse:
      required:
        - items
        - totalItems
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/DocumentInfoResponse'
        totalItems:
          type: integer
          format: int32
      additionalProperties: false
    DocumentInfoResponse:
      type: object
      properties:
        documentId:
          type: string
          format: uuid
        knowledgeBaseId:
          type: string
          format: uuid
        originalFileName:
          type: string
          nullable: true
        contentType:
          type: string
          nullable: true
        sizeBytes:
          type: integer
          format: int64
        contentHash:
          type: string
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/DocumentStatus'
        processingStartedAt:
          type: string
          format: date-time
          nullable: true
        processingCompletedAt:
          type: string
          format: date-time
          nullable: true
        errorMessage:
          type: string
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        lastUpdatedAt:
          type: string
          format: date-time
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````