# Method: contactGroups.update

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

Update the name of an existing contact group owned by the authenticated user.

Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error.

Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

### HTTP request

`PUT https://people.googleapis.com/v1/{contactGroup.resourceName=contactGroups/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `contactGroup.resourceName` | `string` The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contactGroupId}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "contactGroup": { "resourceName": string, "etag": string, "metadata": { "updateTime": string, "deleted": boolean }, "groupType": enum (`https://developers.google.com/people/api/rest/v1/contactGroups#GroupType`), "name": string, "formattedName": string, "memberResourceNames": [ string ], "memberCount": integer, "clientData": [ { "key": string, "value": string } ] }, "updateGroupFields": string, "readGroupFields": string } ``` |

| Fields ||
|---|---|
| `contactGroup.etag` | `string` The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource. Used for web cache validation. |
| `contactGroup.metadata` | ``object (`https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroupMetadata`)`` Output only. Metadata about the contact group. |
| `contactGroup.groupType` | ``enum (`https://developers.google.com/people/api/rest/v1/contactGroups#GroupType`)`` Output only. The contact group type. |
| `contactGroup.name` | `string` The contact group name set by the group owner or a system provided name for system groups. For [`contactGroups.create`](https://developers.google.com/people/api/rest/v1/contactGroups/create) or [`contactGroups.update`](https://developers.google.com/people/api/rest/v1/contactGroups/update) the name must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. |
| `contactGroup.formattedName` | `string` Output only. The name translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale for system groups names. Group names set by the owner are the same as name. |
| `contactGroup.memberResourceNames[]` | `string` Output only. The list of contact person resource names that are members of the contact group. The field is only populated for GET requests and will only return as many members as `maxMembers` in the get request. |
| `contactGroup.memberCount` | `integer` Output only. The total number of contacts in the group irrespective of max members in specified in the request. |
| `contactGroup.clientData[]` | ``object (`https://developers.google.com/people/api/rest/v1/contactGroups#GroupClientData`)`` The group's client data. |
| `updateGroupFields` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask` format)`` Optional. A field mask to restrict which fields on the group are updated. Multiple fields can be specified by separating them with commas. Defaults to `name` if not set or set to empty. Updated fields are replaced. Valid values are: - clientData - name |
| `readGroupFields` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask` format)`` Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, and `name` if not set or set to empty. Valid fields are: - clientData - groupType - memberCount - metadata - name |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroup`.

### 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).