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

# Update a tag by ID

> Updates the name of a tag with the specified ID.



## OpenAPI

````yaml PATCH /tags/{tagId}
openapi: 3.0.0
info:
  title: Cogfy Messenger Public API
  version: 1.0.0
  description: API for interacting with the Cogfy Messenger platform
servers:
  - url: https://messenger-public-api.cogfy.com
    description: Production server
  - url: http://localhost:53981
    description: Local server
security:
  - ApiKeyAuth: []
tags: []
paths:
  /tags/{tagId}:
    patch:
      tags:
        - Tags
      summary: Update a tag by ID
      description: Updates the name of a tag with the specified ID.
      parameters:
        - in: path
          name: tagId
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The new name for the tag.
      responses:
        '200':
          description: Tag updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                    description: The new name for the tag.
        '404':
          description: Tag not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating the tag was not found.
        '409':
          description: Tag with the specified name already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating the tag name already exists.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````