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

The resource names of the contact people to add in the form of people/person_id.

resourceNamesToRemove[]

string

The resource names of the contact people to remove in the form of people/person_id.

Response body

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

The response to a modify contact group members request.

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.

Try it!