lads_update_campaign_group
LinkedIn Ads write high risk
Part of the LinkedIn Campaign Manager Agent.
What it does
Updates a campaign group via partial update (PATCH $set). Two-phase: At preview Scalix reads the group from LinkedIn (a nonexistent id is refused) and includes the current values of the fields being changed, the new values (preview.request) and, for a status, budget or schedule change, 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 (a group that already holds every value requested gets changed: false and no preview_id); on APPROVE the tool COMMITs the PATCH, confirms, and writes an audit log. Editable: name, status (ACTIVE|PAUSED|DRAFT|ARCHIVED), totalBudget, dailyBudget (DYNAMIC only), runSchedule. This tool cannot change the group's budget optimization strategy or remove a total budget (use Campaign Manager). IMPORTANT: for ENTERPRISE non-default groups only name and status are mutable; the default (backfilled=true) group is fully immutable. Accuracy notes: budgets are decimal strings + currencyCode matching account currency (not micros); raising/lowering totalBudget changes the shared cap for ALL child campaigns — state the impact across the campaigns in affected_campaigns before asking for approval.
When to use it
Use when the user wants to rename a group, change its shared budget/schedule, or move it between ACTIVE/PAUSED/DRAFT/ARCHIVED — always preview the before/after first. If raising/lowering the budget, state the projected impact across all child campaigns before asking for approval. Never touch an ENTERPRISE default group.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | yes | Numeric ad account ID (digits only). |
campaign_group_id | string | yes | Numeric campaign group ID (digits only). |
name | string | no | New name (<=100 chars). |
status | string | no | New status: ACTIVE|PAUSED|DRAFT|ARCHIVED (normalized to upper case; anything else is refused before the API call). Use lads_pause_campaign_group/lads_delete_campaign_group for those specific transitions; do not set PENDING_DELETION here. |
total_budget | object | no | {amount:string,currencyCode:string} decimal string; currency must equal account currency. This tool cannot remove a group's total budget: change the amount, or remove it in Campaign Manager. |
daily_budget | object | no | {amount:string,currencyCode:string}; DYNAMIC budgetOptimization only. |
run_schedule | object | no | {start,end} epoch ms; end required if totalBudget present. start is required whenever run_schedule is set: LinkedIn replaces the whole schedule, so to change only the end send the current start too. A missing start, or a bound that is not epoch ms (such as an ISO date), is refused at preview. |
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
Show before/after and apply only approved changes. Budget changes alter the shared cap for all child campaigns — surface the cross-campaign impact. Do not edit the ENTERPRISE default/backfilled group (immutable); for ENTERPRISE non-default groups only name/status are editable. Strict per-account isolation.
Reminder
Preview the diff, confirm, then patch; budget edits ripple to every child campaign in the group.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
FIELD_NOT_EDITABLE | Attempted to edit an immutable field — e.g., any field on a backfilled default group, a non-name/status field on an ENTERPRISE non-default group, or objectiveType. | Limit edits to allowed fields; for default groups, do not edit. Surface the platform message. | no |
INVALID_ARGUMENT | Bad value (currency mismatch, non-decimal amount, runSchedule.end missing with totalBudget, name >100, dailyBudget without DYNAMIC). | Surface the message; fix the field and re-preview. Don't guess. | no |
PERMISSION_DENIED | Missing rw_ads or insufficient role (VIEWER/CREATIVE_MANAGER), or out of scope (403). | Confirm CAMPAIGN_MANAGER+ and rw_ads. | no |
CUSTOMER_NOT_FOUND | Group/account not found or not in scope (404). | Verify IDs. | no |
PREVIEW_EXPIRED | preview_id unknown/expired (TTL elapsed) or fields changed since preview. | Re-preview before committing. | no |
TOKEN_REVOKED | Token expired/revoked (401). | needs_reauth — refresh once and retry the idempotent PATCH; 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 so re-send safely. | yes |
Edge cases
- ENTERPRISE non-default group: only name/status mutable — other fields error with FIELD_NOT_EDITABLE.
- Backfilled default group: fully immutable — block edits up front.
- totalBudget change affects every child campaign sharing the cap — preview must quantify it.
- Removing totalBudget is not supported by this tool (it sends $set patches only); remove it in Campaign Manager.
- Currency must match account currency or INVALID_ARGUMENT.
- PATCH is idempotent (204) -> safe to retry after a transient 5xx.
- Field changed after preview -> preview_id invalidated; re-preview.
- Preview TTL expiry -> PREVIEW_EXPIRED; re-preview.