Method: people.batchDeleteContacts
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\u003eDelete a batch of contacts, limited to 500 resource names per request, while preserving non-contact data.\u003c/p\u003e\n"],["\u003cp\u003eSend mutation requests for the same user sequentially to avoid latency issues and failures.\u003c/p\u003e\n"],["\u003cp\u003eThis operation utilizes a POST request to \u003ccode\u003ehttps://people.googleapis.com/v1/people:batchDeleteContacts\u003c/code\u003e and requires the \u003ccode\u003ehttps://www.googleapis.com/auth/contacts\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a JSON object with a \u003ccode\u003eresourceNames\u003c/code\u003e array listing the contact resource names to delete.\u003c/p\u003e\n"],["\u003cp\u003eA successful deletion results in an empty response body.\u003c/p\u003e\n"]]],["This document details the process of deleting multiple contacts via a batch request. Using a `POST` request to `https://people.googleapis.com/v1/people:batchDeleteContacts`, a JSON body with a `resourceNames` array is submitted, containing the string identifiers of the contacts to be removed. Up to 500 resource names can be specified per request. Successful execution returns an empty response. Requires OAuth scope `https://www.googleapis.com/auth/contacts`. Mutate requests for the same user should be sent sequentially.\n"],null,["# Method: people.batchDeleteContacts\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDelete a batch of contacts. Any non-contact data will not be deleted.\n\nMutate requests for the same user should be sent sequentially to avoid increased latency and failures.\n\n### HTTP request\n\n`POST https://people.googleapis.com/v1/people:batchDeleteContacts`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------|\n| ``` { \"resourceNames\": [ string ] } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `resourceNames[]` | `string` Required. The resource names of the contact to delete. It's repeatable. Allows up to 500 resource names in a single request. |\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization 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)."]]