gads_update_asset_group
Google Ads write high risk
Part of the Performance Max Agent.
What it does
Update a Performance Max asset group's mutable settings (name, final_urls, final_mobile_urls, path1/path2, status ENABLE/PAUSE/REMOVE) via AssetGroupService.MutateAssetGroups with an update_mask of only the changed fields. Asset membership is changed separately (gads_add/remove_asset_group_asset). Returns {asset_group_resource_name, changed_fields}. Accuracy: only fields present in update_mask change; enabling an under-provisioned group will surface NOT_ELIGIBLE rather than serve. Flow: preview (validate_only=true) -> diff (field: from -> to, e.g., status PAUSED -> ENABLED, plus a serving-eligibility check) -> approval -> execute -> confirm + immutable audit log. PREVIEW SEMANTICS: the first call (no preview_id) is sent to the Google Ads API in validation mode — field, enum, policy and permission errors surface AT PREVIEW, nothing is changed, and the response 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. validate_only=true forces another preview; validate_only=false alone never commits.
When to use it
Use to rename, repoint URLs/paths, or pause/enable/remove a PMax asset group. Before enabling, confirm the group meets PMax asset minimums (use gads_get_asset_group); preview the exact field deltas and get approval. Default to PAUSED for risky changes.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
asset_group_resource_name | string | yes | Asset group resource to update. |
name | string | no | New name (added to update_mask if set). |
final_urls | array | no | Replacement final URL list. |
final_mobile_urls | array | no | Replacement mobile URL list. |
path1 | string | no | Display path 1 <=15 chars. |
path2 | string | no | Display path 2 <=15 chars (needs path1). |
status | string | no | Enum ENABLED/PAUSED/REMOVED. |
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
Enabling/editing a PMax asset group affects live cross-channel serving; final URLs must remain advertiser-owned and content policy-compliant. Do not flip REMOVED->ENABLED to resurrect disapproved content (Circumventing Systems = egregious).
Reminder
Apply only the approved field changes; nothing retained beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
INVALID_ARGUMENT | Empty update_mask, path2 without path1, or paths over 15 chars. | Include at least one changed field; fix paths. | no |
ASSET_GROUP_NOT_ELIGIBLE | Cannot ENABLE because required assets are missing. | Add the minimum assets first (gads_add_asset_group_asset); relay the missing field types. | no |
NOT_FOUND | Asset group resource not found. | Verify via gads_list_asset_groups. | no |
TOKEN_REVOKED | Token revoked/expired. | Set needs_reauth; prompt reconnect. | no |
RESOURCE_EXHAUSTED | Quota/QPS exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, retry once. | yes |
PARTIAL_FAILURE | One op failed in a bulk update. | Return per-op errors. | no |
PLATFORM_UNAVAILABLE | Backend 5xx/INTERNAL. | Retry once after backoff. | yes |
Edge cases
- Empty/omitted update_mask -> no-op error; require >=1 changed field.
- Enable while under-provisioned -> ASSET_GROUP_NOT_ELIGIBLE, not a silent fail.
- Setting status=REMOVED is terminal (cannot be re-enabled) -> warn before approval.
- Replacing final_urls retriggers policy review -> note re-review.
- validate_only=true changes nothing.
- preview TTL expiry -> re-preview.