# Update a group

`PATCH /v1/groups/{id}`

Requires an API key with the `groups:write` scope. [About keys and scopes](/docs/api/authentication)

Renames a group or changes its description. Membership is managed through the member operations, not here.

## Path parameters

- `id` (string, required, uuid)

## Request body

- `name` (string, optional, 1–255 characters) — Unique within the workspace.
- `description` (string | null, optional, 1–1000 characters)

## Returns

Returns `200 OK` with a `Group` in `data`. Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

- `id` (string, required, uuid)
- `name` (string, required)
- `description` (string | null, required)
- `memberCount` (integer, required, min 0, max 9007199254740991) — Contacts currently in the group.
- `createdAt` (string, required, date-time)
- `updatedAt` (string, required, date-time)

## Example

```bash
curl -X PATCH https://api.kirora.io/v1/groups/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b \
  -H "Authorization: Bearer $KIRORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Weekend specials",
    "description": "description_example"
  }'
```

Response `200`:

```json
{
  "data": {
    "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
    "name": "Weekend specials",
    "description": "description_example",
    "memberCount": 0,
    "createdAt": "2030-03-14T09:30:00Z",
    "updatedAt": "2030-03-14T09:30:00Z"
  }
}
```
