---
title: "Update a user group"
method: PATCH
path: "/users/groups/{group_id}"
tags: ["User"]
---

# Update a user group

`PATCH /users/groups/{group_id}`

Update an existing user group.

## Path parameters

- `group_id` integer, required — ID of the user group to update.

## Query parameters

- `cookie_name` string, nullable
- `tenant_id` integer

## Request body

- GroupIn — Schema for creating a user group
  - `name` string, required — Display name of the user group.
  - `description` string, nullable — Optional description of the group's purpose.

## Response `200`

Successful Response

- UserGroup — Named group scoped to a tenant.
  - `created_at` string, date-time — UTC timestamp when the record was created.
  - `updated_at` string, date-time — UTC timestamp when the record was last updated.
  - `id` integer, nullable — Primary key for UserGroups.
  - `tenant_id` integer, required — ID of the tenant.
  - `name` string — Name of the user group.
  - `description` string, nullable — Description of the user group.
  - `creator_user_id` integer, nullable, required — ID of the user who created the group.

## Other responses

- `400` — Group belongs to another tenant or caller lacks admin rights.
- `401` — Missing or invalid authentication.
- `403` — Administrator privileges required.
- `404` — No user group exists with the given id.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/versions/b53e89b98c2b/schema)
