# Method: contactGroups.members.modify

- [HTTP request](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#body.request_body)
  - [JSON representation](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#body.response_body)
  - [JSON representation](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#body.ModifyContactGroupMembersResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#body.aspect)
- [Try it!](https://developers.google.com/people/api/rest/v1/contactGroups.members/modify#try-it)

Modify the members of a contact group owned by the authenticated user.

The only system contact groups that can have members added are `contactGroups/myContacts` and `contactGroups/starred`. Other system contact groups are deprecated and can only have contacts removed.

### HTTP request

`POST https://people.googleapis.com/v1/{resourceName=contactGroups/*}/members:modify`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `resourceName` | `string` Required. The resource name of the contact group to modify. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "resourceNamesToAdd": [ string ], "resourceNamesToRemove": [ string ] } ``` |

| Fields ||
|---|---|
| `resourceNamesToAdd[]` | `string` Optional. The resource names of the contact people to add in the form of `people/{person_id}`. The total number of resource names in `resourceNamesToAdd` and `resourceNamesToRemove` must be less than or equal to 1000. |
| `resourceNamesToRemove[]` | `string` Optional. The resource names of the contact people to remove in the form of `people/{person_id}`. The total number of resource names in `resourceNamesToAdd` and `resourceNamesToRemove` must be less than or equal to 1000. |

### Response body

The response to a modify contact group members request.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "notFoundResourceNames": [ string ], "canNotRemoveLastContactGroupResourceNames": [ string ] } ``` |

| Fields ||
|---|---|
| `notFoundResourceNames[]` | `string` The contact people resource names that were not found. |
| `canNotRemoveLastContactGroupResourceNames[]` | `string` The contact people resource names that cannot be removed from their last contact group. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/contacts`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).