SCALIX help

← All tools

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

NameTypeRequiredDescription
account_idstringyesNumeric ad account ID (digits only).
campaign_idstringyesNumeric campaign ID (digits only).
reasonstringnoReason for pausing (audit log).
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

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 classMeansWhat to doRetry
INVALID_ARGUMENTInvalid 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_DENIEDMissing rw_ads / insufficient role / out of scope (403).Confirm CAMPAIGN_MANAGER+ and rw_ads.no
CUSTOMER_NOT_FOUNDCampaign/account not found or out of scope (404).Verify IDs.no
PREVIEW_EXPIREDpreview_id unknown/expired.Re-preview before committing.no
TOKEN_REVOKEDToken expired/revoked (401).needs_reauth — refresh once and retry; else reconnect.yes
RESOURCE_EXHAUSTEDRate/quota limit (429).Backoff 5/10/20s cap 60s.yes
PLATFORM_UNAVAILABLELinkedIn 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.