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

# Update the user-manageable fields of a tag key



## OpenAPI

````yaml https://openapi.production.reelevant.io/v1/render/statistics patch /analytics/settings/tags/{id}
openapi: 3.0.0
info:
  title: statistics
  version: 1276740a176d654cb1c3e602b6648d22e3bf52a9
  description: >-
    # Errors

    | Error code | Message | HTTP status code | Payload |

    | :--- | :--- | :--- | :--- |

    |
    9000,9001,9002,9003,9004,9006,9007,9008,9009,9010,9011,9012,9013,9014,9015,9016,9017
    | A tag key with this name already exists | 409 | ```{"name":"string"}``` |
servers:
  - url: https://api.reelevant.com/v2/statistics/
    description: production
security: []
paths:
  /analytics/settings/tags/{id}:
    patch:
      tags:
        - AnalyticsSettings
      summary: Update the user-manageable fields of a tag key
      operationId: update-tag-key
      parameters:
        - name: id
          in: path
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  pattern: \S
                description:
                  type: string
                cardinality:
                  $ref: '#/components/schemas/TagCardinality'
              required:
                - name
                - cardinality
              additionalProperties: false
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                    required:
                      - status
                    additionalProperties: false
                  - $ref: >-
                      #/components/schemas/InternalResponse_Intersection_definition_TagDefinition_id_string_companyId_string_resourceGroupIds_Array_string_createdAt_Date_updatedAt_Date_Omit
        '409':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/InternalResponse_'
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - fail
                      error_code:
                        $ref: '#/components/schemas/StatisticsErrorCode'
                      code:
                        type: number
                        enum:
                          - 409
                      message:
                        type: string
                        enum:
                          - A tag key with this name already exists
                      data:
                        type: object
                        properties:
                          name:
                            type: string
                        required:
                          - name
                        additionalProperties: false
                    required:
                      - status
                      - error_code
                      - code
                      - message
                    additionalProperties: false
      security:
        - password_auth: []
components:
  schemas:
    TagCardinality:
      type: string
      enum:
        - single
        - multiple
    InternalResponse_Intersection_definition_TagDefinition_id_string_companyId_string_resourceGroupIds_Array_string_createdAt_Date_updatedAt_Date_Omit:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          allOf:
            - type: object
              properties:
                definition:
                  $ref: '#/components/schemas/TagDefinition'
              required:
                - definition
              additionalProperties: false
            - type: object
              properties:
                id:
                  type: string
                  readOnly: true
                companyId:
                  type: string
                  readOnly: true
                resourceGroupIds:
                  type: array
                  items:
                    type: string
                createdAt:
                  type: string
                  format: date-time
                  readOnly: true
                updatedAt:
                  type: string
                  format: date-time
                  readOnly: true
              required:
                - id
                - companyId
                - resourceGroupIds
                - createdAt
                - updatedAt
              additionalProperties: false
            - $ref: >-
                #/components/schemas/AnalyticsSettingsDocument_Without_CompanyId_ToJSON__id_ResourceGroupIds_Serialize
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    InternalResponse_:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    StatisticsErrorCode:
      type: number
      enum:
        - 9000
        - 9001
        - 9002
        - 9003
        - 9004
        - 9006
        - 9007
        - 9008
        - 9009
        - 9010
        - 9011
        - 9012
        - 9013
        - 9014
        - 9015
        - 9016
        - 9017
    TagDefinition:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        assignmentMode:
          $ref: '#/components/schemas/TagAssignmentMode'
        cardinality:
          $ref: '#/components/schemas/TagCardinality'
        values:
          type: array
          items:
            $ref: '#/components/schemas/TagValue'
      required:
        - name
        - assignmentMode
        - cardinality
        - values
      additionalProperties: false
    AnalyticsSettingsDocument_Without_CompanyId_ToJSON__id_ResourceGroupIds_Serialize:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/AnalyticsSettingsType'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - type
      additionalProperties: false
    TagAssignmentMode:
      type: string
      enum:
        - custom
        - system
    TagValue:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        name:
          type: string
        description:
          type: string
      required:
        - _id
        - name
      additionalProperties: false
    AnalyticsSettingsType:
      type: string
      enum:
        - Tag
        - Attribution
        - Reporting
    ObjectId:
      type: string
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v1/auth/token
          refreshUrl: https://api.reelevant.com/v1/auth/token
          scopes: {}

````