SCALIX help

← All tools

gads_pause_ad

Google Ads write low risk

Part of the Google Ads Manager Agent.

What it does

Pause an ad by setting ad_group_ad.status = PAUSED via AdGroupAdService.MutateAdGroupAds update with update_mask=status. Stops the ad serving while preserving its creative and history so it can be re-enabled — reversible. PREVIEW->APPROVE->COMMIT: validate_only=true dry run -> plain-English confirmation (which ad, current status -> PAUSED, effect on serving) -> explicit approval -> execute -> confirm resource name + UTC timestamp + audit log including the reason. The preview shows the ad's current status next to PAUSED. An id already in the target status is flagged; when all of them are, the call returns changed: false and no preview_id, since there is nothing to approve. 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 temporarily stop a single ad from serving (e.g. underperformer, seasonal). Confirm the ad and effect, preview with validate_only, and apply only on explicit approval; prefer pause over remove when the user may want it back.

Inputs

NameTypeRequiredDescription
ad_idstringyesNumeric ad id.
ad_group_idstringyesParent ad group id.
customer_idstringyes10-digit CID, dashes stripped.
reasonstringnoOptional human reason captured in the audit log.
validate_onlybooleannoOptional. 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_idstringnoOmit 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

No content-policy risk. Do not pause/unpause to cycle disapproved content past review. Confirmation and immutable audit logging required for every status change.

Reminder

Reversible — log who/why; never pause to game enforcement timing.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCustomer ID not found / unauthorized.Verify CID and authorization; re-auth if revoked.no
TOKEN_REVOKEDOAuth credential revoked/expired.Prompt reconnect (needs_reauth).no
INVALID_ARGUMENTStatus update rejected (e.g. ad removed) — surfacing Google's message.Surface exact error; verify the ad state.no
PERMISSION_DENIEDScope/role does not permit writes here.Confirm adwords scope and editor role on this CID.no
MANAGER_ACCOUNT_WRITECannot mutate ads on an MCC.Target a client account.no
PARTIAL_FAILUREA bulk pause partially succeeded.Return success:true with per-row warnings for the failed rows.no
RESOURCE_EXHAUSTEDRate/quota exceeded (429).Backoff 5->10->20s cap 60s; honor retryDelay.yes
PLATFORM_UNAVAILABLEGoogle Ads API 5xx.Re-check state, then retry.yes

Edge cases

  • Ad already PAUSED -> success with changed: false and its current state, and no preview_id (nothing to approve).
  • Cannot pause a REMOVED ad -> INVALID_ARGUMENT.
  • Pausing the last enabled ad stops the ad group serving — warn the user.
  • One ad per call; the commit is atomic.
  • Preview TTL expiry -> re-preview; expired token -> refresh once, retry.