SCALIX help

← All tools

lads_resume_campaign

LinkedIn Ads write high risk

Part of the LinkedIn Campaign Manager Agent.

What it does

Resumes a paused campaign by PATCHing status -> ACTIVE, restoring eligibility to serve (subject to budget/schedule/audience/account holds). Commit logs the reason. Setting ACTIVE only makes the campaign ELIGIBLE — it still won't serve under a paused parent group, an audience <300, or a budget/billing hold. Accuracy notes: setting ACTIVE makes the campaign ELIGIBLE — it still won't serve if the parent group is paused, the audience is <300, or a budget/billing hold applies; the preview includes a warning naming the holds LinkedIn reports in the campaign's servingStatuses (every one but RUNNABLE and STOPPED, the pause itself). 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 ACTIVE 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 restart a paused campaign. Preview should flag any servingStatuses (audience <300, budget/billing holds, paused parent group) that mean it still won't deliver after resuming, so the user isn't surprised. Capture why it's being resumed.

Inputs

NameTypeRequiredDescription
account_idstringyesNumeric ad account ID (digits only).
campaign_idstringyesNumeric campaign ID (digits only).
reasonstringnoReason for resuming (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. Activating resumes spend — verify the user intends delivery to restart and that no policy issue (targeting/politicalIntent) is outstanding. At preview Scalix refuses a campaign declared POLITICAL, NOT_DECLARED with EU targeting, or a JOB_APPLICANT/TALENT_LEAD campaign that targets by age or gender, and shows LinkedIn's EU statement for an EU campaign declared NOT_POLITICAL. Strict per-account isolation.

Reminder

Confirm and log; setting ACTIVE restarts spend (subject to remaining budget/audience/account holds).

Errors

Error classMeansWhat to doRetry
INVALID_ARGUMENTInvalid transition (e.g., COMPLETED/CANCELED can't go straight to ACTIVE; ARCHIVED may need a distinct un-archive path).Check current status; surface the platform message; don't guess the transition path.no
POLICY_VIOLATIONOutstanding policy issue blocks activation (e.g., undeclared politicalIntent for EU targeting, disapproved content).Resolve the declaration/policy issue before resuming.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 ACTIVE -> success with changed: false and the current status; no preview_id is issued and nothing is sent.
  • Set ACTIVE but still not serving if parent group paused / audience under LinkedIn's minimum / budget or date hold -> the preview includes a warning naming the campaign's servingStatuses holds (e.g. CAMPAIGN_GROUP_STATUS_HOLD, CAMPAIGN_AUDIENCE_COUNT_HOLD).
  • CANCELED is terminal (LinkedIn: permanently canceled). A COMPLETED campaign is reactivated with its status, a new end and its original start (LinkedIn's "Reactivate a Completed Campaign": lads_update_campaign with status ACTIVE and run_schedule), not by this status-only resume. ARCHIVED may need a distinct un-archive flow.
  • PATCH idempotent (204) -> safe retry after transient 5xx.
  • Field changed after preview -> re-preview.