AdlyseAdlyseMCP Docs
⌘K
Overview
adlyse-insights
list_ad_accountsget_dashboard_snapshotget_impact_analysislist_guidelinesget_guideline
adlyse-reports
list_report_templateslist_reportsget_reportgenerate_reportlist_report_targets
adlyse-ads
list_campaignsget_performancelist_adsget_ad_performancelist_change_eventsupdate_campaign_statusupdate_campaign_budget
adlyse-workflows
list_workflowsget_workflowrun_workflowget_run_status
  1. Overview/
  2. adlyse-ads

update_campaign_status

Pause, resume, or remove a campaign. Supports Google Ads and Meta Ads today; TikTok mutations aren’t yet implemented.

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 is on 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
  • Decision Log — how these entries feed impact analysis
←Previous
list_change_events
Next→
update_campaign_budget