Method: contactGroups.members.modify

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