# Change definitions key groups groupId

Renames, re-describes or recolours a record group, moves it with `position`, and files it under a status section with `statusGroup` (a name, or null to unfile it — omitting the field leaves the filing alone). At least one field must be given. Answers the group with its member count; the records in it are untouched.

Access class: `def:read`.

## Endpoint

`PATCH /v1/definitions/{key}/groups/{groupId}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| groupId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "colour": "string",
    "description": "string",
    "name": "string",
    "position": 1,
    "statusGroup": "string"
  },
  "params": {
    ":groupId": "",
    ":key": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "colour": "string",
    "createdAt": "string",
    "createdByUserId": 1,
    "description": "string",
    "id": "",
    "memberCount": 1,
    "name": "string",
    "position": 1,
    "statusGroup": "string",
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
