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

# Update a contact tag

> Rename and/or recolour a contact tag; every contact carrying it shows the change. Renaming onto another tag's name returns 409. Requires contact and company tags on the workspace: without them every tag endpoint answers 400 with `details.code` `ENTITY_TAGS_NOT_ENABLED`; tell the user instead of retrying.

    > **Required scope:** `CONTACTS_WRITE`
    >
    > **Rate limit:** 30 requests per minute



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json patch /v1/contacts/tag/{tagId}
openapi: 3.1.0
info:
  title: Enginy API
  version: 1.0.0
  description: Public API for Enginy platform
servers:
  - url: https://openapi.enginy.ai
    description: Configured server
security: []
tags:
  - name: AI Variables
    description: >-
      Manage AI variables and discover the entity fields you can reference in
      prompts and entity requests.
  - name: Inbox
    description: >-
      Inbox endpoints for listing contact threads, reading thread messages,
      managing tags, and sending manual replies.
  - name: Workflows
    description: >-
      Build, validate, publish, run, and inspect advanced (graph) workflows,
      plus the block/condition catalog needed to author a workflow plan.
paths:
  /v1/contacts/tag/{tagId}:
    patch:
      tags:
        - Contacts
      summary: Update a contact tag
      description: >-
        Rename and/or recolour a contact tag; every contact carrying it shows
        the change. Renaming onto another tag's name returns 409. Requires
        contact and company tags on the workspace: without them every tag
        endpoint answers 400 with `details.code` `ENTITY_TAGS_NOT_ENABLED`; tell
        the user instead of retrying.

            > **Required scope:** `CONTACTS_WRITE`
            >
            > **Rate limit:** 30 requests per minute
      parameters:
        - schema:
            type: string
            description: The tag ID
          required: true
          description: The tag ID
          name: tagId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: >-
                    New name. Tag name, 1 to 20 characters after trimming. Names
                    are unique per pool, ignoring case.
                color:
                  type: string
                  description: >-
                    New colour. Tag colour as a `#rrggbb` hex value. The Enginy
                    app offers `#767676` (gray), `#E99342` (orange), `#E367BC`
                    (pink), `#6F78F0` (purple), `#F24473` (red), `#5BBE7E`
                    (green), `#57A4E9` (blue) and `#5EB2CC` (cyan).
            example:
              name: Evento 2
              color: '#5BBE7E'
      responses:
        '200':
          description: The updated tag
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Tag ID
                      name:
                        type: string
                        description: Tag name
                      color:
                        type: string
                        description: Tag colour as a `#rrggbb` hex value
                    required:
                      - id
                      - name
                      - color
                required:
                  - status
                  - message
                  - data
        '400':
          description: >-
            Tags are not enabled for this workspace (`details.code`
            `ENTITY_TAGS_NOT_ENABLED`), or the tag ID is not a number, or a tag
            rule was broken (`details.code` `ENTITY_TAG_INVALID`,
            `details.reason` one of `nameEmpty`, `nameTooLong`, `colorInvalid`,
            `emptyUpdate`, `tooManyEntityIds`, `tooManyTagIds`).
        '404':
          description: Contact tag not found in this workspace
        '409':
          description: >-
            Another tag of the pool already has this name (`details.reason`
            `nameTaken`)
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

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