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

# List shelf versions

> List all versions for a shelf, ordered by version number descending.



## OpenAPI

````yaml openapi.yaml get /v1/shelves/{id}/versions
openapi: 3.1.0
info:
  description: >-
    Convert documents into structured Markdown filesystems that AI agents can
    hydrate and use in sandbox runtimes.
  title: Shelv API
  version: 1.0.0
servers:
  - url: https://api.shelv.dev
security:
  - bearerApiKey: []
paths:
  /v1/shelves/{id}/versions:
    get:
      tags:
        - Shelves
      summary: List shelf versions
      description: List all versions for a shelf, ordered by version number descending.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/ShelfPublicIdParam'
        - in: query
          name: page
          required: false
          schema:
            default: 1
            exclusiveMinimum: 0
            type: integer
        - in: query
          name: limit
          required: false
          schema:
            default: 20
            exclusiveMinimum: 0
            maximum: 100
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/ShelfVersionResponse'
                    type: array
                  pagination:
                    properties:
                      limit:
                        type: number
                      page:
                        type: number
                      total:
                        type: number
                      totalPages:
                        type: number
                    required:
                      - page
                      - limit
                      - total
                      - totalPages
                    type: object
                required:
                  - data
                  - pagination
                type: object
          description: Version list
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Shelf not found
      security:
        - bearerApiKey: []
components:
  schemas:
    ShelfPublicIdParam:
      pattern: ^shf_[0-9a-f]{24}$
      type: string
    ShelfVersionResponse:
      properties:
        createdAt:
          format: date-time
          type: string
        fileCount:
          type:
            - number
            - 'null'
        pageCount:
          type:
            - number
            - 'null'
        publicId:
          pattern: ^ver_[0-9a-f]{24}$
          type: string
        shelfPublicId:
          pattern: ^shf_[0-9a-f]{24}$
          type: string
        source:
          enum:
            - initial
            - edit
            - upload
          type: string
        storageSizeBytes:
          type:
            - number
            - 'null'
        versionNumber:
          exclusiveMinimum: 0
          type: integer
      required:
        - publicId
        - shelfPublicId
        - versionNumber
        - source
        - pageCount
        - storageSizeBytes
        - fileCount
        - createdAt
      type: object
    ErrorResponse:
      properties:
        code:
          type: string
        details: {}
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearerApiKey:
      bearerFormat: APIKey
      scheme: bearer
      type: http

````