SCALIX help

← All tools

lads_pause_campaign_group

LinkedIn Ads write high risk

Part of the LinkedIn Campaign Manager Agent.

What it does

Pauses a campaign group by PATCHing status -> PAUSED, which stops serving across all child campaigns in the group. Two-phase: At preview Scalix reads the group from LinkedIn (a nonexistent id is refused) and includes its current status (a group already PAUSED gets changed: false and no preview_id; a DRAFT one, which does not serve, a note that pausing stops nothing) and affected_campaigns (the campaigns in the group, which the change reaches: count, active count, a complete flag, and id/name/status of up to 50) + preview_id; on APPROVE the tool COMMITs the PATCH, confirms, and logs the reason. A PAUSED group can later be resumed (status -> ACTIVE) via lads_update_campaign_group. Accuracy notes: pausing the group is a delivery-wide halt for its campaigns (each child's servingStatuses will show CAMPAIGN_GROUP_STATUS_HOLD); it does NOT change the individual campaigns' own status fields.

When to use it

Use to immediately stop spend across an entire group of campaigns at once (client pause, budget freeze, end of flight). Preview first so the user sees exactly how many campaigns will stop. Record why. Prefer this over pausing each campaign individually when the intent is group-wide.

Inputs

NameTypeRequiredDescription
account_idstringyesNumeric ad account ID (digits only).
campaign_group_idstringyesNumeric campaign group ID (digits only).
reasonstringnoReason for pausing, recorded in the 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 before pausing; log the reason. Pausing a group halts delivery for every campaign it contains — surface that scope at preview. Strict per-account isolation.

Reminder

Confirm and log the reason; this stops serving across all child campaigns in the group.

Errors

Error classMeansWhat to doRetry
FIELD_NOT_EDITABLECannot change status of an ENTERPRISE default (backfilled) group, or the group is in a terminal state (CANCELED/COMPLETED/REMOVED).Do not pause default/terminal groups; surface the platform message.no
INVALID_ARGUMENTInvalid status transition (e.g., DRAFT->PAUSED not allowed from the current state).Surface the message; confirm current status via lads_get_campaign_group first.no
PERMISSION_DENIEDMissing rw_ads or insufficient role, or out of scope (403).Confirm CAMPAIGN_MANAGER+ and rw_ads.no
CUSTOMER_NOT_FOUNDGroup/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, not an error; no preview_id is issued and nothing is sent.
  • Pausing the group sets children's servingStatuses to CAMPAIGN_GROUP_STATUS_HOLD without changing each campaign's own status.
  • On an ENTERPRISE account LinkedIn refuses changes to the default (backfilled) group through the API, so it cannot be paused here; Scalix does not check this at preview.
  • Group in DRAFT: it does not serve, so the preview includes a note that pausing it stops no delivery.
  • PATCH idempotent (204) -> safe retry after transient 5xx.
  • Resuming later requires status->ACTIVE (separate action via lads_update_campaign_group).