Skip to content
AdlyseMCP Docs
Product guideMCP reference
⌘K
Open Adlyse
⌘K
Overview
QuickstartAuthentication
adlyse-insights
adlyse-reports
adlyse-ads
list_campaignsget_performancelist_adsget_ad_performancelist_change_eventsupdate_campaign_statusupdate_campaign_budget
adlyse-workflows
adlyse-adminadlyse-all
  1. Overview
  2. adlyse-ads

update_campaign_status

Pause, resume, or remove a campaign. Supported on every platform with a write adapter (Google Ads, Meta Ads, Microsoft Ads, ChatGPT Ads — note ChatGPT Ads can’t remove, only pause; archiving is irreversible and not exposed).

When preview=true, this returns the before/after diff without calling the platform API. When preview=false, it mutates the live campaign and automatically writes a DecisionLogEntry with entry_type="edit", created_via="tool", and a short fingerprint of the calling API key in metadata. This is what closes the causal loop for get_impact_analysis.

If the campaign is already in the target status, the call is a no-op: changed: false, no platform call, no decision logged.

Parameters#

NameTypeRequiredDefaultDescription
ad_account_idstringyesAd account id
campaign_idstringyesPlatform campaign id (from list_campaigns)
statusstringyesOne of "enabled", "paused", or "removed" (canonical, translated per platform)
previewbooleannofalseWhen true, compute the local diff only; don’t mutate the platform

Platform status mapping#

CanonicalMetaGoogle
enabledACTIVEENABLED
pausedPAUSEDPAUSED
removeddeleteremove

Returns#

json
{
  "ad_account_id": "ad_acct_abc",
  "campaign_id": "c1",
  "campaign_name": "Retargeting - Core",
  "platform": "meta_ads",
  "preview": false,
  "changed": true,
  "applied": true,
  "diff": { "status": { "before": "enabled", "after": "paused" } },
  "decision_id": "decentry_TBcROKMXAp3AZcbPxTwQaFVB",
  "platform_response": { "id": "c1", "status": "PAUSED" },
  "source": "adlyse.ads_writes@v1"
}
FieldDescription
previewtrue = no platform call was made; false = live mutation
changedfalse if the campaign was already in the target status — no-op
appliedtrue only when a platform call succeeded and a decision was logged
diff.status.beforeCampaign’s status as of the latest sync
decision_idId of the auto-logged DecisionLogEntry; null on preview or no-op
platform_responseRaw response from the platform’s mutation API

Errors#

error_typeWhen
auth_errorMissing / invalid API key
validation_errorstatus not in {enabled, paused, removed}
not_foundAd account doesn’t belong to your org, or campaign isn’t synced under this account
unsupported_for_platformAd account’s platform has no write adapter (e.g. TikTok)
credentials_missingAd account has no linked OAuth credentials; reconnect it
platform_errorPlatform API rejected the mutation; no decision is logged on failure

Example: preview then apply#

Preview request:

json
{
  "ad_account_id": "ad_acct_abc",
  "campaign_id": "c1",
  "status": "paused",
  "preview": true
}

Preview response:

json
{
  "campaign_id": "c1",
  "platform": "meta_ads",
  "preview": true,
  "changed": true,
  "applied": false,
  "diff": { "status": { "before": "enabled", "after": "paused" } },
  "decision_id": null,
  "source": "adlyse.ads_writes@v1"
}

Apply request:

json
{
  "ad_account_id": "ad_acct_abc",
  "campaign_id": "c1",
  "status": "paused",
  "preview": false
}

Apply response:

json
{
  "campaign_id": "c1",
  "platform": "meta_ads",
  "preview": false,
  "changed": true,
  "applied": true,
  "diff": { "status": { "before": "enabled", "after": "paused" } },
  "decision_id": "decentry_TBcROKMXAp3AZcbPxTwQaFVB",
  "platform_response": { "id": "c1", "status": "PAUSED" },
  "source": "adlyse.ads_writes@v1"
}

See also#

  • update_campaign_budget — change daily budget
  • Home — how approved decisions feed impact analysis
Previouslist_change_eventsNextupdate_campaign_budget