Method: contactGroups.update
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eUpdate the name of an existing contact group owned by the authenticated user.\u003c/p\u003e\n"],["\u003cp\u003eUpdated contact group names must be unique and a duplicate name will return a HTTP 409 error.\u003c/p\u003e\n"],["\u003cp\u003eThe request body allows for specifying the updated contact group name and optional fields to update or return.\u003c/p\u003e\n"],["\u003cp\u003eThis request requires the \u003ccode\u003ehttps://www.googleapis.com/auth/contacts\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This document outlines how to update an existing contact group using the Google People API. A `PUT` request is sent to `https://people.googleapis.com/v1/{contactGroup.resourceName=contactGroups/*}`, specifying the group's resource name in the path. The request body must include the updated `contactGroup` details in JSON format and may include `updateGroupFields` and `readGroupFields`. Updated group names must be unique, and requests for the same user should be sent sequentially. The `https://www.googleapis.com/auth/contacts` scope is required.\n"],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION.contact_group.SCHEMA_REPRESENTATION)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION.contact_group.SCHEMA_REPRESENTATION_1)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdate the name of an existing contact group owned by the authenticated user.\n\nUpdated 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.\n\nMutate requests for the same user should be sent sequentially to avoid increased latency and failures.\n\nHTTP request\n\n`PUT https://people.googleapis.com/v1/{contactGroup.resourceName=contactGroups/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `contactGroup.resourceName` | `string` The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contactGroupId}`. |\n\nRequest body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"contactGroup\": { \"resourceName\": string, \"etag\": string, \"metadata\": { \"updateTime\": string, \"deleted\": boolean }, \"groupType\": enum (/people/api/rest/v1/contactGroups#GroupType), \"name\": string, \"formattedName\": string, \"memberResourceNames\": [ string ], \"memberCount\": integer, \"clientData\": [ { \"key\": string, \"value\": string } ] }, \"updateGroupFields\": string, \"readGroupFields\": string } ``` |\n\n| Fields ||\n|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `contactGroup.etag` | `string` The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource. Used for web cache validation. |\n| `contactGroup.metadata` | `object (`[ContactGroupMetadata](/people/api/rest/v1/contactGroups#ContactGroupMetadata)`)` Output only. Metadata about the contact group. |\n| `contactGroup.groupType` | `enum (`[GroupType](/people/api/rest/v1/contactGroups#GroupType)`)` Output only. The contact group type. |\n| `contactGroup.name` | `string` The contact group name set by the group owner or a system provided name for system groups. For [`contactGroups.create`](/people/api/rest/v1/contactGroups/create) or [`contactGroups.update`](/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. |\n| `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. |\n| `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. |\n| `contactGroup.memberCount` | `integer` Output only. The total number of contacts in the group irrespective of max members in specified in the request. |\n| `contactGroup.clientData[]` | `object (`[GroupClientData](/people/api/rest/v1/contactGroups#GroupClientData)`)` The group's client data. |\n| `updateGroupFields` | `string (`[FieldMask](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 |\n| `readGroupFields` | `string (`[FieldMask](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 |\n\nResponse body\n\nIf successful, the response body contains an instance of [ContactGroup](/people/api/rest/v1/contactGroups#ContactGroup).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/contacts`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]