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

# List Documents

> Retrieves a paginated list of all documents within a specific knowledge base. Each document entry
includes metadata such as the document type, processing status, creation timestamp, and other relevant
information. This endpoint is useful for monitoring document status and managing the contents of a
knowledge base.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/knowledge-bases/{kb_id}/documents
openapi: 3.1.0
info:
  title: Verbex Platform API
  description: API for managing AI agents, calls, phone numbers, and more.
  version: 1.0.0
servers: []
security: []
paths:
  /v2/knowledge-bases/{kb_id}/documents:
    get:
      tags:
        - Knowledge Bases v2
      summary: List Documents
      description: >-
        Retrieves a paginated list of all documents within a specific knowledge
        base. Each document entry

        includes metadata such as the document type, processing status, creation
        timestamp, and other relevant

        information. This endpoint is useful for monitoring document status and
        managing the contents of a

        knowledge base.
      operationId: list_documents_v2_knowledge_bases__kb_id__documents_get
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
            title: Kb Id
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Page Size
        - name: page_token
          in: query
          required: false
          schema:
            type: string
            title: Page Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/app__knowledge_bases_v2__schemas__DocumentListResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    app__knowledge_bases_v2__schemas__DocumentListResponse:
      properties:
        data:
          items:
            anyOf:
              - $ref: '#/components/schemas/FileDocumentResponse'
              - $ref: >-
                  #/components/schemas/app__knowledge_bases_v2__schemas__WebsiteDocumentResponse
          type: array
          title: Data
          description: List of documents for the current page.
        next_page_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Page Token
          description: >-
            Token for retrieving the next page of results. Null if no more pages
            exist.
      type: object
      required:
        - data
      title: DocumentListResponse
      description: Model for paginated list of Documents.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FileDocumentResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the file document.
        document_type:
          type: string
          const: file
          title: Document Type
          description: Indicates this is a file-based document.
          default: file
        document_languages:
          items:
            $ref: '#/components/schemas/DocumentLanguage'
          type: array
          title: Document Languages
          description: Languages detected in the document content.
          default:
            - en
        filename:
          type: string
          title: Filename
          description: Original name of the uploaded file.
        file_type:
          type: string
          title: File Type
          description: MIME type or format of the file.
      type: object
      required:
        - filename
        - file_type
      title: FileDocumentResponse
    app__knowledge_bases_v2__schemas__WebsiteDocumentResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the website document.
        document_type:
          type: string
          const: website
          title: Document Type
          description: Indicates this is a website-based document.
          default: website
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
          description: Base URL of the crawled website.
        max_crawl_depth:
          type: integer
          title: Max Crawl Depth
          description: Maximum link depth that was crawled from the base URL.
        max_number_of_pages:
          type: integer
          title: Max Number Of Pages
          description: Maximum number of pages that were crawled.
        include_paths:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Paths
          description: URL patterns that were included in the crawl.
        exclude_paths:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Paths
          description: URL patterns that were excluded from the crawl.
        selected_sitemap_urls:
          items:
            type: string
          type: array
          title: Selected Sitemap Urls
          description: List of URLs selected from the sitemap that were crawled.
          default: []
      type: object
      required:
        - url
        - max_crawl_depth
        - max_number_of_pages
      title: WebsiteDocumentResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DocumentLanguage:
      type: string
      enum:
        - af
        - az
        - bs
        - cs
        - cy
        - da
        - de
        - en
        - es
        - et
        - fr
        - ga
        - hr
        - hu
        - id
        - is
        - it
        - ku
        - la
        - lt
        - lv
        - mi
        - ms
        - mt
        - nl
        - 'no'
        - oc
        - pi
        - pl
        - pt
        - ro
        - rs_latin
        - sk
        - sl
        - sq
        - sv
        - sw
        - tl
        - tr
        - uz
        - vi
        - ar
        - fa
        - ug
        - ur
        - bn
        - as
        - mni
        - ru
        - rs_cyrillic
        - be
        - bg
        - uk
        - mn
        - abq
        - ady
        - kbd
        - ava
        - dar
        - inh
        - che
        - lbe
        - lez
        - tab
        - tjk
        - hi
        - mr
        - ne
        - bh
        - mai
        - ang
        - bho
        - mah
        - sck
        - new
        - gom
        - sa
        - bgc
        - th
        - ch_sim
        - ch_tra
        - ja
        - ko
        - ta
        - te
        - kn
      title: DocumentLanguage

````