Method: people.updateContact

Update contact data for an existing contact person. Any non-contact data will not be modified.

The request throws a 400 error if updatePersonFields is not specified.
The request throws a 400 error if person.metadata.sources is not specified for the contact to be updated.
The request throws a 400 error with an error with reason "failedPrecondition" if person.metadata.sources.etag is different than the contact's etag, which indicates the contact has changed since its data was read. Clients should get the latest person and re-apply their updates to the latest person.

HTTP request

PATCH https://people.googleapis.com/v1/{person.resourceName=people/*}:updateContact

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
person.resourceName

string

The resource name for the person, assigned by the server. An ASCII string with a max length of 27 characters, in the form of people/person_id.

Query parameters

Parameters
updatePersonFields

string (FieldMask format)

Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All updated fields will be replaced. Valid values are:

  • addresses
  • biographies
  • birthdays
  • emailAddresses
  • events
  • genders
  • imClients
  • interests
  • locales
  • memberships
  • names
  • nicknames
  • occupations
  • organizations
  • phoneNumbers
  • relations
  • residences
  • sipAddresses
  • urls
  • userDefined

Request body

The request body contains an instance of Person.

Response body

If successful, the response body contains an instance of Person.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/contacts

For more information, see the Authorization guide.

Try it!