gads_pause_keyword
Google Ads write medium risk
Part of the Google Ads Manager Agent.
What it does
Pause one or more keywords by setting ad_group_criterion.status=PAUSED via update + update_mask=status. PREVIEW->APPROVE->COMMIT: previews via validate_only=true listing each keyword and current->PAUSED, captures an optional reason, waits for explicit approval, commits with validate_only=false (atomic: every keyword or none), returns the paused resource_names, and logs the reason/actor to the immutable audit log. Pausing stops the keyword from serving but preserves history (reversible via gads_enable_keyword). Returns {success, data, count, warnings}. The preview shows each keyword's text, match type and 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 stop wasteful/low-QS or off-strategy keywords after a wasted-spend or keyword analysis, once the user approves the exact list. Always show the list before committing.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID, dashes stripped. |
keywords | array | yes | List of criterion_resource_name OR {ad_group_id, criterion_id}. Up to 10,000 ops. |
reason | string | no | Optional human reason recorded in the audit log. |
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
Pausing is non-content-policy; require approval and log the reason/actor. Do not pause keywords to mask a disapproved ad rather than fixing the underlying violation (that does not cure a Circumventing-Systems/Misrepresentation issue).
Reminder
Log the actor and reason for every status change; never expose tokens.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Account not found/linked. | Verify CID/authorization. | no |
TOKEN_REVOKED | Authorization expired/revoked. | needs_reauth. | no |
CRITERION_NOT_FOUND | Keyword criterion not found (already removed). | Re-list and retry with valid IDs. | no |
INVALID_ARGUMENT | Malformed resource name or invalid status transition. | Surface Google's message; correct input. | no |
MANAGER_ACCOUNT_NOT_SUPPORTED | Cannot mutate criteria on a manager (MCC) account. | Target a child serving account. | no |
PARTIAL_FAILURE | Some keywords failed to pause while others succeeded. | Return per-op errors with index; succeeded ops committed. | no |
PERMISSION_DENIED | No write access / out of bearer scope. | Confirm role/scope. | no |
RESOURCE_EXHAUSTED | Rate/quota limit (HTTP 429). | Backoff 5/10/20s cap 60s; honor retryDelay. | yes |
INTERNAL_ERROR | Transient 5xx. | Retry once after backoff. | yes |
Edge cases
- Empty list -> invalid_argument ('No ids provided.'); nothing is sent.
- Keyword already PAUSED -> flagged; when every keyword is, success with changed: false and no preview_id (nothing to approve).
- Keyword REMOVED -> cannot pause; surface clearly.
- validate_only clean still needs explicit approval before commit.
- Idempotent: re-running pause on already-paused keywords is safe.
- The commit is atomic: if Google rejects one keyword, none is paused.
- Expired token -> refresh once and retry.