# IRPCDocClassGroupsAdmin.ModifyDocClassGroup

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Class groups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/ModifyDocClassGroup/

Badges: `Administration API / specialized` `admin` `session` `idempotent`

Saves a changed class group: its name and member classes.

- **Service:** [Class groups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/index.md) `MFiles.IRPCDocClassGroupsAdmin`
- **gRPC method:** `/MFiles.IRPCDocClassGroupsAdmin/ModifyDocClassGroup`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/modify-doc-class-group`
- **Request:** [`ModifyDocClassGroupRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/ModifyDocClassGroup/index.md#request)
- **Response:** [`ModifyDocClassGroupResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/ModifyDocClassGroup/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires `change_metadata_structure` and `license_allows_modifications`, and read access to the
  group. `object_type` must be 0 (Document), as in
  [AddDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/AddDocClassGroup/index.md).
- Classes added to or removed from `member_classes` change the class-group information of
  existing documents of those classes.
- Increments the metadata structure version.

<a id="request"></a>

## Request: ModifyDocClassGroupRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `class_group` | [`ClassGroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ClassGroup/index.md) | The complete new [ClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ClassGroup/index.md); `id` identifies the group to modify. |
| `class_group.id` | `int32` | The ID of the class group (an item ID in value list 2, Class groups). |
| `class_group.name` | `string` | The name of the group. |
| `class_group.member_classes[]` | repeated `int32` | The IDs of the classes in the group. |
| `class_group.object_type` | `int32` | The object type with which this class group is used. |

<a id="response"></a>

## Response: ModifyDocClassGroupResponse

No fields.

<a id="related"></a>

## Related methods

- [AddDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/AddDocClassGroup/index.md): Creates a class group.
