> ## 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.

# Get agent version

> Get one version including its full config document.



## OpenAPI

````yaml /api-reference/agents/agents.oas.yaml get /v1/agents/{agent_id}/versions/{version_number}
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/{version_number}:
    parameters:
      - $ref: '#/components/parameters/AgentIdPath'
      - $ref: '#/components/parameters/VersionNumberPath'
    get:
      tags:
        - Versions
      summary: Get agent version
      description: Get one version including its full config document.
      operationId: getAgentVersion
      responses:
        '200':
          description: Version with config document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceAgentVersionDetailOut'
        '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.
    VersionNumberPath:
      name: version_number
      in: path
      required: true
      schema:
        type: integer
        minimum: 1
      description: Agent config version number.
  schemas:
    VoiceAgentVersionDetailOut:
      allOf:
        - $ref: '#/components/schemas/VoiceAgentVersionOut'
        - type: object
          properties:
            config:
              $ref: '#/components/schemas/AgentConfigDocument'
            config_issues:
              type: array
              items:
                $ref: '#/components/schemas/DependencyIssue'
              description: >-
                Issues detected when re-validating the stored config against the
                organisation's current resources.
    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'
    AgentConfigDocument:
      type: object
      additionalProperties: true
      description: >
        Canonical agent configuration document, exactly as produced by the agent

        config download endpoints. The document is a portable, secret-free

        representation of the agent's configuration; webhook auth is carried as

        organisation Vault secret references. Treat it as an opaque file:
        download,

        store, and re-import it without modification.
    DependencyIssue:
      type: object
      additionalProperties: false
      required:
        - path
        - code
        - resource_type
        - message
      properties:
        path:
          type: string
          description: Path of the config field the issue relates to.
        code:
          type: string
        resource_type:
          type: string
        resource_id:
          type: string
          nullable: true
        message:
          type: string
        remediation:
          type: string
          nullable: true
      description: >-
        A dependency issue detected while validating an agent config document
        against the organisation's current resources.
    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

````