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

# Update version label

> Set or clear a version's label. The label is the only mutable field on a
version; the configuration itself is immutable.




## OpenAPI

````yaml /api-reference/agents/agents.oas.yaml patch /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'
    patch:
      tags:
        - Versions
      summary: Update version label
      description: |
        Set or clear a version's label. The label is the only mutable field on a
        version; the configuration itself is immutable.
      operationId: updateAgentVersionLabel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceAgentVersionLabelUpdate'
            examples:
              set-label:
                summary: Label a known-good version
                value:
                  label: Before prompt experiment
      responses:
        '200':
          description: Updated version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceAgentVersionOut'
        '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:
    VoiceAgentVersionLabelUpdate:
      type: object
      additionalProperties: false
      properties:
        label:
          type: string
          maxLength: 120
          nullable: true
          description: >-
            New label. Whitespace is trimmed; `null` or an empty string clears
            the label.
      description: The label is the only mutable field on a version.
    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'
    UUID:
      type: string
      format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
    DateTime:
      type: string
      format: date-time
      example: '2026-01-15T10:30:00Z'
    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
  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

````