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

# List agent versions

> List configuration versions for a voice agent (paginated, newest first).

A new immutable version is recorded every time the agent's configuration
changes, including creation, updates, restores, duplication, and imports.




## OpenAPI

````yaml /api-reference/agents/agents.oas.yaml get /v1/agents/{agent_id}/versions
openapi: 3.0.3
info:
  title: SLNG Voice Agents API
  version: 1.0.0
  description: >
    Public API for managing Voice Agents, dispatching outbound calls, and
    creating web (non-telephony) sessions.


    Base URL: `https://api.agents.slng.ai`
  contact:
    name: SLNG Support
    email: support@slng.ai
servers:
  - url: https://api.agents.slng.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Voice agent CRUD.
  - name: Versions
    description: Agent configuration version history and restore.
  - name: Calls
    description: Call dispatch and status.
  - name: Sessions
    description: Web (non-telephony) sessions.
paths:
  /v1/agents/{agent_id}/versions:
    parameters:
      - $ref: '#/components/parameters/AgentIdPath'
    get:
      tags:
        - Versions
      summary: List agent versions
      description: >
        List configuration versions for a voice agent (paginated, newest first).


        A new immutable version is recorded every time the agent's configuration

        changes, including creation, updates, restores, duplication, and
        imports.
      operationId: listAgentVersions
      parameters:
        - $ref: '#/components/parameters/PageQuery'
        - $ref: '#/components/parameters/PageSizeQuery'
      responses:
        '200':
          description: Paginated versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedVoiceAgentVersionListOut'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    AgentIdPath:
      name: agent_id
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
      description: Voice agent ID.
    PageQuery:
      name: page
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Page number (1-indexed).
    PageSizeQuery:
      name: page_size
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
      description: Page size.
  schemas:
    PaginatedVoiceAgentVersionListOut:
      type: object
      additionalProperties: false
      required:
        - items
        - meta
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/VoiceAgentVersionOut'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
    UUID:
      type: string
      format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
    VoiceAgentVersionOut:
      type: object
      additionalProperties: false
      required:
        - id
        - voice_agent_id
        - version_number
        - config_schema_version
        - config_hash
        - changed_fields
        - source
        - actor_type
        - created_at
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        voice_agent_id:
          $ref: '#/components/schemas/UUID'
        version_number:
          type: integer
          minimum: 1
          description: Monotonically increasing version number, unique per agent.
        config_schema_version:
          type: integer
          description: Format version of the config document recorded for this version.
        config_hash:
          type: string
          description: Content hash of the version's config document.
        code_dependency_hash:
          type: string
          nullable: true
        changed_fields:
          type: array
          items:
            type: string
          description: >-
            Top-level config fields that changed relative to the previous
            version.
        source:
          type: string
          enum:
            - baseline
            - create
            - update
            - rollback
            - duplicate
            - import
            - credential_normalization
          description: The operation that recorded this version.
        restored_from_version:
          type: integer
          nullable: true
          description: For `rollback` versions, the version number that was restored.
        actor_type:
          type: string
          enum:
            - client
            - admin
            - system
        label:
          type: string
          maxLength: 120
          nullable: true
          description: Optional human-readable label.
        created_at:
          $ref: '#/components/schemas/DateTime'
    PaginationMeta:
      type: object
      additionalProperties: false
      required:
        - page
        - page_size
        - total
        - pages
      properties:
        page:
          type: integer
          minimum: 1
        page_size:
          type: integer
          minimum: 1
        total:
          type: integer
          minimum: 0
        pages:
          type: integer
          minimum: 0
    ErrorResponse:
      type: object
      additionalProperties: true
      description: >
        Error payloads can vary depending on where the error is raised (edge
        gateway vs backend).


        Common shapes include:

        - `{ "error": "message" }`

        - `{ "detail": "message" }`

        - `{ "detail": [ { "loc": [...], "msg": "...", "type": "..." } ] }`
        (validation)
      properties:
        error:
          type: string
        detail:
          oneOf:
            - type: string
            - type: array
              items:
                type: object
    DateTime:
      type: string
      format: date-time
      example: '2026-01-15T10:30:00Z'
  responses:
    UnauthorizedError:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized:
              summary: Authentication failed
              value:
                detail: Authentication is required for this endpoint.
    ForbiddenError:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            forbidden:
              summary: Access denied
              value:
                detail: You do not have access to this resource.
    NotFoundError:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            not-found:
              summary: Resource not found
              value:
                detail: The requested resource was not found.
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            validation-error:
              summary: Request validation failed
              value:
                detail:
                  - loc:
                      - body
                      - language
                    msg: Input should be a valid string
                    type: string_type
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal-server-error:
              summary: Unexpected application error
              value:
                detail: An unexpected internal error occurred.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````