lads_pause_campaign
LinkedIn Ads write high risk
Part of the LinkedIn Campaign Manager Agent.
What it does
Pauses a single campaign by PATCHing status -> PAUSED, immediately stopping its spend/delivery. Commit logs the reason. Reversible via lads_resume_campaign. Accuracy notes: PAUSED keeps the campaign fully configured (can resume to ACTIVE); does not affect sibling campaigns or the parent group; servingStatuses will reflect the pause. Two-phase (parity with Google, ADR-028/029): the first call (no preview_id) reads the campaign from LinkedIn (a nonexistent id is refused), builds the request locally and returns a preview_id — nothing is changed on LinkedIn (a campaign already PAUSED gets changed: false and no preview_id); re-call with that preview_id and identical arguments to COMMIT (single-use, 30-min; a changed/forged/replayed token fails closed).
When to use it
Use to immediately stop a single campaign's spend (overspend, creative issue, client request). Preview to confirm the right campaign and capture why. Reversible — use lads_resume_campaign to restart.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | yes | Numeric ad account ID (digits only). |
campaign_id | string | yes | Numeric campaign ID (digits only). |
reason | string | no | Reason for pausing (audit log). |
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
Confirmation required; log the reason. Pausing stops spend immediately for this campaign only. Strict per-account isolation.
Reminder
Confirm and log the reason; this halts the campaign's delivery (reversible via resume).
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
INVALID_ARGUMENT | Invalid status transition (e.g., campaign is DRAFT/COMPLETED/CANCELED and can't be set to PAUSED). | Check current status via lads_get_campaign; surface the platform message. | no |
PERMISSION_DENIED | Missing rw_ads / insufficient role / out of scope (403). | Confirm CAMPAIGN_MANAGER+ and rw_ads. | no |
CUSTOMER_NOT_FOUND | Campaign/account not found or out of scope (404). | Verify IDs. | no |
PREVIEW_EXPIRED | preview_id unknown/expired. | Re-preview before committing. | no |
TOKEN_REVOKED | Token expired/revoked (401). | needs_reauth — refresh once and retry; else reconnect. | yes |
RESOURCE_EXHAUSTED | Rate/quota limit (429). | Backoff 5/10/20s cap 60s. | yes |
PLATFORM_UNAVAILABLE | LinkedIn 5xx. | Retry with backoff; PATCH is idempotent. | yes |
Edge cases
- Already PAUSED -> success with changed: false and the current status; no preview_id is issued and nothing is sent (on a commit too, if it was paused after the preview).
- DRAFT/COMPLETED/CANCELED can't be paused -> INVALID_ARGUMENT.
- Pausing one campaign does not affect siblings or the parent group.
- If the parent group is paused, this campaign already shows CAMPAIGN_GROUP_STATUS_HOLD — note the distinction (its own status may still be ACTIVE).
- PATCH idempotent (204) -> safe retry after transient 5xx.