gads_remove_customer_match_members
Google Ads write high risk
Part of the Google Ads Audience Agent.
What it does
Remove members from a Customer Match list. Identifiers are normalized + SHA-256 hashed server-side; raw PII purged after hashing. Removal does NOT require consent fields (only add does). Same ingestion-migration constraint as add: since April 1, 2026 the Google Ads API path (OfflineUserDataJobService/UserDataService) is DISABLED for developer tokens with no Customer Match upload in the prior 180 days (CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE) and must use the Data Manager API; active tokens still work on the Ads API path. The tool checks token state and, if the Ads API path is unavailable, surfaces CUSTOMER_MATCH_UPLOAD_UNAVAILABLE and says Google requires its Data Manager API, which Scalix does not offer, rather than silently failing. WRITE with preview->approve->commit: preview shows hashed-member count to remove + the ingestion path + preview_id; commit submits the removal (async) + audit. Returns a job/operation reference. PREVIEW SEMANTICS (Customer Match differs): OfflineUserDataJob has NO validation mode, so the preview is approval-only — NOTHING is checked with Google until commit. [KNOWN LIMITATION] Since April 1, 2026 Google rejects legacy Customer Match uploads for developer tokens not historically allowlisted (not_allowlisted_error.CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE) — this is token-level and fails on EVERY account, real or test; the supported path is Google's Data Manager API (legacy sunset March 2027). Scalix does not offer the Data Manager path, so a developer token Google has cut off cannot upload or remove members through Scalix; say so plainly. The preview response still returns a preview_id. To apply, show the preview to the user, get their approval, and re-call with that preview_id and IDENTICAL arguments within 30 minutes; changed arguments or an expired token fail closed to a fresh preview.
When to use it
Use to honor a user's opt-out/deletion or to prune a Customer Match list. Preview the hashed count and ingestion path, confirm intent, then commit. If the developer token is cut off from the Ads API path (since 2026-04-01), tell the user Google now requires its Data Manager API for this developer token, which Scalix does not offer; do not retry the Ads API path.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
user_list_id | string | yes | Target Customer Match list ID. |
members | array | yes | Member objects to remove (email/phone/crm_id/mobile_id). Normalized + SHA-256 hashed server-side; raw PII purged. Type must match the list's upload_key_type. |
manager_id | string | no | Optional MCC login-customer-id. |
validate_only | boolean | no | Optional. true forces another preview even with a preview_id; false is DEPRECATED and no longer commits — only a valid preview_id applies the write. |
preview_id | string | no | Omit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview. |
Safeguards
A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.
Policy
Process removals promptly to honor data-subject deletion/opt-out requests; hash identifiers before sending and never retain the raw values. Removal supports the user's right to be excluded — do not refuse a valid removal.
Reminder
Removals honor opt-out/deletion rights; identifiers are hashed then purged — Ads API ingestion is being sunset, use Data Manager API where required.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE | This developer token is not allowlisted for Customer Match ingestion via the Ads API (no upload in prior 180 days; cut off since 2026-04-01). | Tell the user Google now requires its Data Manager API for this developer token, which Scalix does not offer; do not retry the Ads API path. | no |
CUSTOMER_MATCH_UPLOAD_UNAVAILABLE | The Ads API Customer Match ingestion path is unavailable for this connection; use the Data Manager API. | Tell the user Google now requires its Data Manager API for this developer token, which Scalix does not offer; do not retry the Ads API path. | no |
PARTIAL_FAILURE | Some removal rows failed (bad hash/format) while others succeeded. | Report failed indices; the rest were processed. | no |
INVALID_ARGUMENT | Identifiers malformed or empty (e.g., type mismatch vs list upload_key_type). | Fix normalization and re-preview. | no |
TOKEN_REVOKED | OAuth token expired/revoked. | Refresh and retry once; else prompt reconnect (needs_reauth). | yes |
CUSTOMER_NOT_FOUND | Customer ID not found/accessible. | Verify the CID is authorized. | no |
PERMISSION_DENIED | No access, out-of-bearer-scope write, or missing Data Manager ingestion scope. | Confirm access and ingestion scope; else refuse. | no |
RESOURCE_EXHAUSTED | Rate/quota exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, then retry. | yes |
INTERNAL_ERROR | Transient server error (5xx). | Retry after backoff. | yes |
Edge cases
- Ads API path closed for non-allowlisted tokens since 2026-04-01 -> surface CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE / CUSTOMER_MATCH_UPLOAD_UNAVAILABLE and route to Data Manager API; active tokens still use Ads API.
- Removal is async — success means 'submitted'; takes effect over time.
- Removing identifiers not present in the list is a no-op, not an error.
- Removal needs no consent fields (unlike add).
- Raw PII never logged; only counts in audit.
- preview_id TTL expiry -> re-preview; expired token -> refresh once and retry.