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

# Update a tag

> Patch an existing tag.



## OpenAPI

````yaml https://app.herondata.io/swagger patch /api/tags/{heron_id}
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/tags/{heron_id}:
    patch:
      tags:
        - Tags
      summary: Update a tag
      description: Patch an existing tag.
      parameters:
        - in: path
          name: heron_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagPatchSchema'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  tag:
                    $ref: '#/components/schemas/TagSchema'
                type: object
          description: OK
        '400':
          description: Invalid request body
        '404':
          description: Tag not found
        '422':
          description: Tag name already exists
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TagPatchSchema:
      properties:
        color:
          description: >-
            Optional display color as a six-digit hex code such as #1a2b3c. Pass
            null to clear.
          nullable: true
          type: string
        description:
          description: Optional human-readable description of the tag. Pass null to clear.
          nullable: true
          type: string
        name:
          description: >-
            Identifier normalized to lowercase: alphanumeric plus '_', '-', ':',
            up to 140 chars. Unique per user (case-insensitive).
          type: string
      type: object
    TagSchema:
      properties:
        color:
          description: >-
            Optional display color as a six-digit hex code such as #1a2b3c,
            normalized to lowercase.
          nullable: true
          type: string
        description:
          description: Optional human-readable description of the tag.
          nullable: true
          type: string
        heron_id:
          description: Unique identifier for the tag
          readOnly: true
          type: string
        name:
          description: >-
            Identifier normalized to lowercase: alphanumeric plus '_', '-', ':',
            up to 140 chars. Unique per user (case-insensitive).
          type: string
      required:
        - name
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````