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

# Update Tag

> Rename a tag, recolour it, or change whether it closes an opportunity

Only provided fields change. Renaming breaks nothing: assignments, filters and
saved views all reference the tag's id.

<Note>
  **A tag cannot move to another group.** The database refuses it. Moving one
  would mean rewriting every assignment and re-checking every single-select
  group it lands in, for a gesture the product does not offer. Create the tag in
  the other group and retag the records instead.
</Note>

## Path Parameters

<ParamField path="tagId" type="string" required>
  The tag's id, from [List Tags](/api-reference/list-tags).
</ParamField>

## Body

<ParamField body="name" type="string">1-50 characters.</ParamField>
<ParamField body="color" type="string">A hex colour.</ParamField>

<ParamField body="closes" type="boolean">
  Opportunity tags only: whether this tag closes the opportunity it is on.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT "https://api.clustr-ai.com/api/public/tags/cbfd0074-57bd-4fa7-a5fc-8bb5392b16c9" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"closes": true}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "tag": {
        "id": "cbfd0074-57bd-4fa7-a5fc-8bb5392b16c9",
        "group_id": "2b7c9d10-4e5f-4a61-9c22-8d3f1a7b0e44",
        "name": "Meeting booked",
        "color": "#22C55E",
        "position": 3,
        "closes": true
      }
    }
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": { "message": "tag not found", "code": "NOT_FOUND" }
  }
  ```
</ResponseExample>
