> ## 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 Group

> Rename a group, or switch it between single and multi

Only provided fields change. `subject_type` is not editable.

<Warning>
  **Switching `multi` to `single` fails with `409` while some record carries two
  of the group's tags.** That is the correct answer: the alternative is silently
  dropping one. Take the extra tags off those records first, then switch.
</Warning>

## Path Parameters

<ParamField path="groupId" type="string" required>
  The group's id, from [List Tag Groups](/api-reference/list-tag-groups).
</ParamField>

## Body

<ParamField body="name" type="string">
  1-80 characters. Renaming breaks nothing: assignments, filters and saved views
  all reference ids.
</ParamField>

<ParamField body="selection" type="string">
  `single` or `multi`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT "https://api.clustr-ai.com/api/public/tag-groups/5a1c3f88-92d4-4b0e-8e7a-1f2b3c4d5e60" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"name": "Pipeline stage"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "group": {
        "id": "5a1c3f88-92d4-4b0e-8e7a-1f2b3c4d5e60",
        "subject_type": "account",
        "name": "Pipeline stage",
        "selection": "single",
        "position": 2,
        "is_system": false
      }
    }
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": { "message": "some records carry two tags from this group", "code": "CONFLICT" }
  }
  ```

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