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

# Update User Group

> Update an existing user group.

> [!WARNING]
>
> You are reading the docs of Galtea 5.17. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/user-group/update.md).

Only an OWNER or ADMIN can update a user group.

## Returns

Returns the updated [User Group](https://docs.galtea.ai/v5.17/concepts/user-group.md) object.

## Example

```python theme={"system"}
user_group = galtea.user_groups.update(
    user_group_id=user_group_id,
    name="senior-quality-reviewers-" + run_identifier,
    description="Senior team for quality reviews",
)
```

### Set a permission list

```python theme={"system"}
# Give the group a permission list: its members can do exactly these actions on the group's
# products, and with metrics, models and comments across the organization, as far as their role allows.
user_group = galtea.user_groups.update(
    user_group_id=user_group_id,
    permissions=["product.read", "analytics.read", "analytics.readCoverage", "metric.read"],
)
```

### Remove the permission list

```python theme={"system"}
# None removes the custom list: the group follows the EDITOR preset.
# Leaving `permissions` out keeps the current list.
user_group = galtea.user_groups.update(user_group_id=user_group_id, permissions=None)
```

### Follow a permission preset

```python theme={"system"}
# The group follows the READER preset. When Galtea changes the preset, the group changes with it.
# Do not send a `permissions` list together with a preset: the API answers 400.
user_group = galtea.user_groups.update(
    user_group_id=user_group_id,
    permission_preset=UserGroupPermissionPreset.READER,
)
```

## Parameters

**user\_group\_id** `string` *required*

The ID of the user group to update.

**name** `string`

New name for the user group.

**description** `string`

New description for the user group.

**all\_products** `boolean`

Links the group to every product of the organization, current and future. A MEMBER in the group then reaches every product.

**permissions** `list[string] | None`

The permissions the group grants, each written `entity.action`, for example `analytics.readCoverage`. A product entry applies to the group's products, and a `metric`, `model` or `comment` entry across the organization. A list replaces the current list, so the group follows no preset, and an empty list grants nothing. Pass `None` to make the group follow the `EDITOR` preset, which grants every permission the role of its members allows. Leave it out to keep the current list. The API answers 400 for an entry that cannot be granted, for an action without the `read` of its entity, for a list with a product entry and no `product.read`, and for an entry without a read of another entity it needs, such as `analytics.read` without `metric.read`. See [permission lists](https://docs.galtea.ai/v5.17/concepts/user-group.md#permission-lists).

**permission\_preset** `string | UserGroupPermissionPreset | None`

The preset the group follows: `"EDITOR"`, `"HUMAN_EVALUATOR"` or `"READER"`. You can also pass a `UserGroupPermissionPreset` value. When Galtea changes the preset, the group's permissions change with it. The user group then reads back `permission_preset` with that value. For `EDITOR`, `permissions` reads back `None`, which means every permission the role of the members allows. For the other two, `permissions` reads back the current list of the preset. Do not send `permissions` together with a preset: the API answers 400. Pass `None` together with a `permissions` list to make the group hold its own list. Pass `None` with no list and the API answers 400. Leave it out to keep the current setting. `create` has no such parameter: a new group follows `EDITOR`. See [permission lists](https://docs.galtea.ai/v5.17/concepts/user-group.md#permission-lists).


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