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

# Update or rename a version

> Replace a version's values or rename it. Admin only. Renaming a version that a live definition binds returns 409 with the referencing `definition_ids` (D-09). Cross-tenant access returns 404.



## OpenAPI

````yaml /openapi.json put /variables/{set_name}/versions/{version_name}
openapi: 3.1.0
info:
  title: GetDialed Flows API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/flows
    description: Production
security: []
paths:
  /variables/{set_name}/versions/{version_name}:
    put:
      tags:
        - variables
      summary: Update or rename a version
      description: >-
        Replace a version's values or rename it. Admin only. Renaming a version
        that a live definition binds returns 409 with the referencing
        `definition_ids` (D-09). Cross-tenant access returns 404.
      operationId: update_version_variables__set_name__versions__version_name__put
      parameters:
        - name: set_name
          in: path
          required: true
          schema:
            type: string
            title: Set Name
        - name: version_name
          in: path
          required: true
          schema:
            type: string
            title: Version Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariableVersionCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableVersionResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '403':
          description: Caller is authenticated but not an admin
          content:
            application/json:
              example:
                detail: Admin role required
        '404':
          description: >-
            No such variable set for this organization (cross-tenant access also
            returns 404)
          content:
            application/json:
              example:
                detail: Variable set not found
        '409':
          description: >-
            Referential guard (D-09) — the detail carries the referencing
            definition_ids.
          content:
            application/json:
              example:
                detail: >-
                  Variable set is referenced by live definitions; update them
                  first
        '422':
          description: >-
            The set/version failed typed-schema validation (D-03/D-04) or a
            storage cap.
          content:
            application/json:
              example:
                detail: >-
                  version 'sales' key 'email': value does not match declared
                  type
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    VariableVersionCreate:
      properties:
        name:
          type: string
          title: Name
        values:
          additionalProperties: true
          type: object
          title: Values
      type: object
      required:
        - name
      title: VariableVersionCreate
      description: Add / replace a single version under an existing set.
    VariableVersionResponse:
      properties:
        name:
          type: string
          title: Name
        values:
          additionalProperties: true
          type: object
          title: Values
      type: object
      required:
        - name
        - values
      title: VariableVersionResponse
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````