Page Summary
-
Update a batch of up to 200 contacts and optionally receive a map of updated contact data.
-
Specify which fields to update using
updateMaskand which fields to return usingreadMask. -
Sequential requests for the same user are recommended to avoid latency and failures.
-
Requires the
https://www.googleapis.com/auth/contactsOAuth scope for authorization. -
The API uses the
POSTmethod and thehttps://people.googleapis.com/v1/people:batchUpdateContactsendpoint.
Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts.
Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
HTTP request
POST https://people.googleapis.com/v1/people:batchUpdateContacts
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "contacts" : { string : { object ( |
contacts
map (key: string, value: object (
Person
))
Required. A map of resource names to the person data to be updated. Allows up to 200 contacts in a single request.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
updateMask
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 specified fields will be replaced, or cleared if left empty for each person. Valid values are:
- addresses
- biographies
- birthdays
- calendarUrls
- clientData
- emailAddresses
- events
- externalIds
- genders
- imClients
- interests
- locales
- locations
- memberships
- miscKeywords
- names
- nicknames
- occupations
- organizations
- phoneNumbers
- relations
- sipAddresses
- urls
- userDefined
readMask
string (
FieldMask
format)
Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. If read mask is left empty, the post-mutate-get is skipped and no data will be returned in the response. Valid values are:
- addresses
- ageRanges
- biographies
- birthdays
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- events
- externalIds
- genders
- imClients
- interests
- locales
- locations
- memberships
- metadata
- miscKeywords
- names
- nicknames
- occupations
- organizations
- phoneNumbers
- photos
- relations
- sipAddresses
- skills
- urls
- userDefined
sources[]
enum (
ReadSourceType
)
Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT
and READ_SOURCE_TYPE_PROFILE
if not set.
Response body
If not successful, returns BatchUpdateContactsErrorDetails
, a list of errors corresponding to each contact.
The response to a request to update a batch of contacts.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"updateResult"
:
{
string
:
{
object (
|
| Fields | |
|---|---|
updateResult
|
A map of resource names to the contacts that were updated, unless the request An object containing a list of |
Authorization scopes
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/contacts
For more information, see the Authorization guide .

