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

# Download version config

> Download the config document recorded for this version as a JSON file
attachment (`*-v{version_number}.agent.json`), in the same canonical format as
the current-config download. The `ETag` header carries the config content hash;
send it back in `If-None-Match` to receive `304 Not Modified`.




## OpenAPI

````yaml /api-reference/agents/agents.oas.yaml get /v1/agents/{agent_id}/versions/{version_number}/config
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}/config:
    parameters:
      - $ref: '#/components/parameters/AgentIdPath'
      - $ref: '#/components/parameters/VersionNumberPath'
    get:
      tags:
        - Versions
      summary: Download version config
      description: >
        Download the config document recorded for this version as a JSON file

        attachment (`*-v{version_number}.agent.json`), in the same canonical
        format as

        the current-config download. The `ETag` header carries the config
        content hash;

        send it back in `If-None-Match` to receive `304 Not Modified`.
      operationId: downloadAgentVersionConfig
      responses:
        '200':
          description: Canonical agent config document (JSON file download).
          headers:
            Content-Disposition:
              schema:
                type: string
              description: >-
                Attachment filename derived from the agent name and version
                number.
            ETag:
              schema:
                type: string
              description: Content hash of the config document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConfigDocument'
        '304':
          description: Not modified (matched `If-None-Match`).
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                history-unsafe:
                  summary: Historical config cannot be reproduced safely
                  value:
                    detail: The historical AgentConfig cannot be downloaded safely.
        '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:
    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.
    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
    UUID:
      type: string
      format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
  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

````