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

# Update a tag definition.

> Update a tag definition. Deactivating is a status flip to `inactive`, which hides the tag from pickers and refuses new labels while existing ones keep rendering; it is what the UI offers in place of deleting a SYSTEM tag. Renaming never moves the id, so tagged fields simply render the new name.



## OpenAPI

````yaml /api-reference/bundled.yaml put /v0/tags/{tagId}
openapi: 3.1.0
info:
  title: Gable API
  description: >
    API to interact with the Gable platform

    ## Authorization

    All API requests require an API key to be passed in the `X-API-KEY` header.
    For instructions on finding your API key and api endpoint check out the [API
    Key documentation](../docs/api-keys.md).

    Example: `curl -H "X-API-KEY: <your-api-key>"
    https://api-{organization}.gable.ai/v0/ping`
  contact:
    name: Gable Engineering
    url: https://gable.ai
    email: engineers@gable.ai
  version: 1.54.0
servers:
  - url: https://{hostname}.gable.ai
    description: Gable API
    variables:
      hostname:
        default: demo-api
        description: Customer environment assigned by Gable
security:
  - ApiKeyAuth: []
tags:
  - name: action
  - name: api-keys
  - name: auth
  - name: changelog
  - name: config
  - name: debug
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: data-tagging
    description: Tag vocabulary management and field level tagging of lineage boundaries.
paths:
  /v0/tags/{tagId}:
    put:
      tags:
        - data-tagging
      summary: Update a tag definition.
      description: >-
        Update a tag definition. Deactivating is a status flip to `inactive`,
        which hides the tag from pickers and refuses new labels while existing
        ones keep rendering; it is what the UI offers in place of deleting a
        SYSTEM tag. Renaming never moves the id, so tagged fields simply render
        the new name.
      operationId: putTag
      parameters:
        - in: path
          name: tagId
          required: true
          schema:
            type: string
          description: The tag definition id, as minted on create.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutTagRequest'
      responses:
        '200':
          description: The updated definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagDefinitionResponse'
        '400':
          description: Bad Request (unrecognized status, or an empty name)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No definition exists under that id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Concurrent vocabulary writes lost the version condition three times.
            The vocabulary is one stored item, so writes serialize on it and a
            losing writer retries rather than overwriting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PutTagRequest:
      type: object
      description: >-
        Update a tag definition. Every property is optional and an omitted one
        is left alone. `id` and `kind` are not updatable: `id` is the join key
        every field tag carries, and `kind` is the server's classification.
      properties:
        name:
          type: string
          minLength: 1
          description: >-
            New display name. The id stays as it was minted and every field
            keeps its tag, since field tags address the definition by id and
            resolve the name at read time.
        status:
          $ref: '#/components/schemas/TagStatus'
          description: >-
            Deactivating hides the tag everywhere — pickers and field tag reads
            — and refuses new ADDs; the stored labels survive and render again
            on reactivation. This is what the UI offers in place of deleting a
            SYSTEM tag.
        description:
          type: string
        color:
          type: string
        detection_enabled:
          type: boolean
          description: >-
            Advisory only. The ingest detector always applies `pii`, gated on
            nothing but that definition existing, so setting this is accepted
            and inert.
      additionalProperties: false
    TagDefinitionResponse:
      type: object
      description: A single tag definition, as returned by create and update.
      properties:
        tag:
          $ref: '#/components/schemas/TagDefinition'
      required:
        - tag
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    TagStatus:
      type: string
      description: >-
        Lifecycle state of a tag definition, lowercase on the wire to match the
        `status` query param of GET /v0/tags and translated by the handler to
        the uppercase stored form.


        Deactivation is a status flip, not a delete: an `inactive` definition
        drops out of the default list and out of pickers, an ADD naming it is
        refused with `TAG_INACTIVE`, and component reads stop rendering it on
        every field. The stored assignments survive in the event log and render
        again on reactivation.


        Ingest detection is not gated on status: a scan keeps applying `pii`
        while the definition is inactive, and those assignments surface once it
        is reactivated.
      enum:
        - active
        - inactive
    TagDefinition:
      type: object
      description: >-
        One tag in the organization's vocabulary. Field tags reference it by
        `id` and the read joins it in, so a rename takes effect everywhere at
        once. readOnly properties are not settable on POST or PUT.
      properties:
        id:
          type: string
          readOnly: true
          description: >-
            Minted from `name` (lowercased, runs of non alphanumerics collapsed
            to `_`). A collision, including with a SYSTEM id such as `pii`, is
            refused with 409. A later rename changes `name` only.
        name:
          type: string
          minLength: 1
          description: Display name, shown on chips and in pickers.
        kind:
          $ref: '#/components/schemas/TagKind'
          readOnly: true
          description: Set by the server. POST /v0/tags always creates a USER tag.
        status:
          $ref: '#/components/schemas/TagStatus'
        description:
          type: string
          description: Optional longer explanation of what the tag means.
        color:
          type: string
          description: Optional display color, also carried on every field tag reference.
        detection_enabled:
          type: boolean
          description: >-
            Advisory only. The read defaults an unset stored value to false. The
            ingest detector always applies `pii`, gated on nothing but that
            definition existing, so the value is inert on every tag.
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Absent on the seeded SYSTEM tags.
        created_by:
          readOnly: true
          description: Null for the seeded SYSTEM tags and for API key writes.
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - name
        - kind
        - status
        - detection_enabled
      additionalProperties: false
    TagKind:
      type: string
      description: >-
        Where a tag definition came from. SYSTEM tags are seeded by Gable
        (`pii`, `phi`, `pifi`, `secret`) and cannot be created or deleted
        through the API; the UI deactivates them instead. POST /v0/tags only
        ever mints USER tags.
      enum:
        - SYSTEM
        - USER
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.