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

# Update a tag



## OpenAPI

````yaml patch /tags/{tagId}
openapi: 3.0.0
info:
  title: Thena Help Center API Documentation
  description: The Thena Help Center API description
  version: '1.0'
  contact: {}
servers:
  - url: https://helpcenter.thena.ai
    description: Production
security:
  - ApiKey: []
    base-access: []
    OrgId: []
    UserId: []
tags: []
paths:
  /tags/{tagId}:
    patch:
      tags:
        - Tag
      summary: Update a tag
      operationId: TagController_update
      parameters:
        - name: tagId
          required: true
          in: path
          description: MongoDB ObjectId of the tag
          schema:
            example: 507f1f77bcf86cd799439011
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTagDto'
      responses:
        '200':
          description: Tag updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTagResponse'
        '409':
          description: Tag already present
          content:
            application/json:
              schema:
                example:
                  message: Tag already present
                  error: API Error
                  statusCode: 409
        '500':
          description: Failed to update tag
          content:
            application/json:
              schema:
                example:
                  message: Failed to update tag
                  error: API Error
                  statusCode: 500
components:
  schemas:
    UpdateTagDto:
      type: object
      properties:
        name:
          type: string
          description: Updated name of the tag
          example: Feature Request
      required:
        - name
    UpdateTagResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TagResponseDto'
        message:
          type: string
          example: Tag updated successfully
      required:
        - data
        - message
    TagResponseDto:
      type: object
      properties:
        _id:
          type: string
          example: 672de3624def8e23e1343253
        orgId:
          type: string
          example: 667d37bb3a401eba4a609426
        name:
          type: string
          example: Feature Request
        lowerName:
          type: string
          example: feature request
        createdBy:
          type: string
          example: 667d37bd1e87838451261acb
        createdAt:
          type: string
          example: '2024-11-08T10:09:38.815Z'
        updatedAt:
          type: string
          example: '2024-11-08T10:09:38.815Z'
      required:
        - _id
        - orgId
        - name
        - lowerName
        - createdBy
        - createdAt
        - updatedAt
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Enter your API key

````