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

# List knowledge base versions

> Lists every version of the knowledge base, newest first. Agents read `currentVersion`.



## OpenAPI

````yaml /api-reference/rest/openapi.yaml get /v1/knowledge-bases/{knowledgeId}/versions
openapi: 3.1.0
info:
  title: Zero Runtime REST API
  version: '1.0'
  description: >-
    Create, configure, version and deploy agents, and wire SIP telephony to
    them.
servers:
  - url: https://api.zeroruntime.ai
security:
  - token: []
tags:
  - name: Agents
  - name: Versions
  - name: Deployment
  - name: Phone numbers
  - name: Routing rules
  - name: Calls
  - name: Batch calls
  - name: Knowledge bases
  - name: Knowledge base folders
paths:
  /v1/knowledge-bases/{knowledgeId}/versions:
    parameters:
      - $ref: '#/components/parameters/knowledgeId'
    get:
      tags:
        - Knowledge bases
      summary: List knowledge base versions
      description: >-
        Lists every version of the knowledge base, newest first. Agents read
        `currentVersion`.
      responses:
        '200':
          description: The versions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  knowledgeId:
                    type: string
                  currentVersion:
                    type: integer
                  latestVersion:
                    type: integer
                  versions:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeBaseVersion'
              example:
                knowledgeId: w8d3k
                currentVersion: 1
                latestVersion: 2
                versions:
                  - version: 2
                    status: failed
                    statusReason: Crawl produced no content
                    failureCode: null
                    createdVia: crawl
                    note: null
                    sizeInBytes: null
                    pageCount: null
                    sectionCount: null
                    charCount: null
                    isCurrent: false
                    createdAt: '2026-10-20T09:30:00.000Z'
                    updatedAt: '2026-10-20T09:31:10.000Z'
                  - version: 1
                    status: ready
                    statusReason: null
                    failureCode: null
                    createdVia: crawl
                    note: null
                    sizeInBytes: 0
                    pageCount: 3
                    sectionCount: 21
                    charCount: 18240
                    isCurrent: true
                    createdAt: '2026-10-13T09:30:00.000Z'
                    updatedAt: '2026-10-13T09:31:12.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: The knowledge base isn't yours or is deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
              example:
                message: Knowledge base not found
components:
  parameters:
    knowledgeId:
      name: knowledgeId
      in: path
      required: true
      schema:
        type: string
      example: k7x2m
  schemas:
    KnowledgeBaseVersion:
      type: object
      properties:
        version:
          type: integer
        status:
          $ref: '#/components/schemas/KnowledgeBaseStatus'
        statusReason:
          type:
            - string
            - 'null'
          description: Why processing failed.
        failureCode:
          type:
            - string
            - 'null'
        createdVia:
          type: string
          enum:
            - upload
            - crawl
            - edit
            - qa
          description: >-
            How the version was made: a file `upload`, a website `crawl`
            (including each auto-refresh run), an `edit`, or an answer added in
            the dashboard (`qa`).
        note:
          type:
            - string
            - 'null'
          description: The `note` sent with an edit.
        sizeInBytes:
          type:
            - integer
            - 'null'
        pageCount:
          type:
            - integer
            - 'null'
        sectionCount:
          type:
            - integer
            - 'null'
        charCount:
          type:
            - integer
            - 'null'
        isCurrent:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Message:
      type: object
      properties:
        message:
          type: string
    KnowledgeBaseStatus:
      type: string
      enum:
        - processing
        - ready
        - failed
      description: |
        - `processing`: being parsed and indexed. Not available to agents yet.
        - `ready`: indexed and available to agents.
        - `failed`: processing stopped. `statusReason` says why.
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid `Authorization` header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    token:
      type: apiKey
      in: header
      name: Authorization
      description: Your API token, sent raw (no `Bearer` prefix).
      x-default: <auth-token>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.