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

# Rename tag value

> Rename a grouped tag (key, value) to (key, new_value). The cascade re-tags every workflow carrying the old label; the new label inherits the old color. Both values ride in the body so values containing '/' stay addressable. Rejects with 409 when the new value already exists for the key.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/tag-values/{key}/rename
openapi: 3.1.0
info:
  title: Skyvern API
  description: API for Skyvern
  version: 1.0.0
servers:
  - url: https://api.skyvern.com
    x-fern-server-name: Cloud
  - url: https://api-staging.skyvern.com
    x-fern-server-name: Staging
  - url: http://localhost:8000
    x-fern-server-name: Local
security: []
paths:
  /v1/tag-values/{key}/rename:
    patch:
      tags:
        - Tags
      summary: Rename tag value
      description: >-
        Rename a grouped tag (key, value) to (key, new_value). The cascade
        re-tags every workflow carrying the old label; the new label inherits
        the old color. Both values ride in the body so values containing '/'
        stay addressable. Rejects with 409 when the new value already exists for
        the key.
      operationId: rename_tag_value_v1_tag_values__key__rename_patch
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
            description: Tag key (group)
            examples:
              - env
            title: Key
          description: Tag key (group)
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Skyvern API key for authentication. API key can be found at
              https://app.skyvern.com/settings.
            title: X-Api-Key
          description: >-
            Skyvern API key for authentication. API key can be found at
            https://app.skyvern.com/settings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagValueRename'
      responses:
        '200':
          description: Successfully renamed tag value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagValueRenameResponse'
        '404':
          description: Tag value not found
        '409':
          description: Target value already exists for this key
        '422':
          description: Invalid value
components:
  schemas:
    TagValueRename:
      properties:
        value:
          type: string
          title: Value
          description: Current tag value (label) under the key to rename.
        new_value:
          type: string
          title: New Value
          description: New tag value (label) to rename it to.
      type: object
      required:
        - value
        - new_value
      title: TagValueRename
      description: >-
        Body for ``PATCH /v1/tag-values/{key}/rename``. Both the current and the
        new

        value ride in the body so values containing ``/`` stay addressable.
    TagValueRenameResponse:
      properties:
        key:
          type: string
          title: Key
        value:
          type: string
          title: Value
        color:
          type: string
          title: Color
        renamed_workflow_count:
          type: integer
          title: Renamed Workflow Count
      type: object
      required:
        - key
        - value
        - color
        - renamed_workflow_count
      title: TagValueRenameResponse
      description: >-
        Response for ``PATCH /v1/tag-values/{key}/rename``: the renamed label
        with its

        carried-over color and the number of workflows re-tagged.

````