# Update an Existing Tag

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /tags/update:
    put:
      summary: Update an Existing Tag
      deprecated: false
      description: >
        Updates an existing tag's properties including name, color, and
        description.


        **Required Fields:**

        - `tag_id`: ID of the tag to update

        - `name`: Updated display name for the tag

        - `color`: Updated hex color code

        - `description`: Updated description (can be empty)


        **Note:** Tag must exist and belong to the specified workspace. Names
        must be unique within the workspace.
      tags:
        - Tags
        - Tags
      parameters:
        - name: x-api-key
          in: header
          description: Your PlusVibe.ai account's API Key
          required: false
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - workspace_id
                - tag_id
                - name
                - color
              properties:
                workspace_id:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                  description: workspace identifier
                  examples:
                    - 507f1f77bcf86cd799439011
                tag_id:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                  description: Id of the tag to update
                  examples:
                    - 507f1f77bcf86cd799439012
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: Updated display name for the tag
                  examples:
                    - Premium Clients
                color:
                  type: string
                  pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
                  description: Updated hex color code for the tag
                  examples:
                    - '#9B59B6'
                description:
                  type: string
                  maxLength: 500
                  description: Updated description of the tag's purpose
                  examples:
                    - Premium tier clients with enhanced service requirements
              x-apidog-orders:
                - workspace_id
                - tag_id
                - name
                - color
                - description
            examples:
              update_client_tag:
                value:
                  workspace_id: 507f1f77bcf86cd799439011
                  tag_id: 507f1f77bcf86cd799439012
                  name: Plusvibe DFY - new
                  color: '#9B59B6'
                  description: Highest Reply Rate
                summary: Update client tag details
                description: Change VIP Clients to Premium Clients with new color
              update_campaign_tag:
                value:
                  workspace_id: 507f1f77bcf86cd799439011
                  tag_id: 507f1f77bcf86cd799439013
                  name: Q1 2025 Campaign
                  color: '#2ECC71'
                  description: Updated for first quarter 2025 marketing initiatives
                summary: Update campaign tag
                description: Update campaign tag for new quarter
      responses:
        '200':
          description: Tag updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                required:
                  - status
                x-apidog-orders:
                  - status
              example:
                status: success
          headers: {}
          x-apidog-name: OK
        '400':
          description: Bad Request - Validation or Business Logic Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  message:
                    type: string
                    examples:
                      - Validation Error
                  error:
                    type: string
                    examples:
                      - Validation Error
                  errors:
                    type: array
                    items:
                      type: string
                x-apidog-orders:
                  - success
                  - message
                  - error
                  - errors
              examples:
                '2':
                  summary: Invalid tag ID format
                  value:
                    success: false
                    message: Validation Error
                    error: Validation Error
                    errors:
                      - '"tag_id" length must be 24 characters long'
                '3':
                  summary: Tag not found or access denied
                  value:
                    success: false
                    message: Tag not found or access denied.
                    error: Tag not found or access denied.
                '4':
                  summary: Name conflicts with existing tag
                  value:
                    success: false
                    message: Tag already exists, please try a new name.
                    error: Tag already exists, please try a new name.
          headers: {}
          x-apidog-name: Bad Request
      security: []
      x-apidog-folder: Tags
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-21404674-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
