Skip to content
AdlyseDocs
Product guideMCP reference
⌘K
Open Adlyse
⌘K
Overview
QuickstartAuthentication
adlyse-insights
adlyse-ads
list_ad_accountsget_platform_supportget_ad_creation_capabilitiesget_ad_build_specupdate_ad_build_speclist_ad_plansget_ad_plan_publicationget_ad_planimport_ad_to_planimport_live_ad_to_plancreate_ad_plan_variantsadd_ad_plan_variantsupdate_ad_plan_groupgroup_ad_plansget_ad_plan_groupfreeze_ad_plan_grouppublish_ad_plan_groupcreate_ad_plancreate_ad_edit_planupdate_ad_planattach_ad_plan_assetfill_ad_plan_slotsfreeze_ad_planpublish_ad_planresolve_ad_publish_steplist_campaignsget_performancelist_change_eventslist_adsget_ad_performancelist_creative_librarylist_experimentsget_experimentpause_experimentresume_experimentstop_experimentpause_creative_adsupdate_ad_group_statusupdate_ad_statusupdate_campaign_statusupdate_campaign_budgetlist_swipe_filesave_competitor_ad_to_swipe_filesave_creative_to_swipe_fileremix_from_swipe_filestart_creative_jobresize_creativemake_variants_of_winnerget_creative_jobestimate_creative_batchstart_creative_batchbatch_to_plan_groupget_creative_batchsnapshot_catalog_productsgenerate_ad_copylist_ad_copycreate_creative_conceptrequest_creative_reviewget_creative_review
adlyse-workflows
adlyse-admin
adlyse-all
  1. Overview
  2. adlyse-ads

update_campaign_status

Pause, resume, or remove a campaign. Supported on every platform with edits (get_platform_support lists them). Only platforms whose support lists campaign removal (Google Ads, Meta Ads) accept removed; the rest refuse it with unsupported_for_platform, so pause instead.

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
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
Previousupdate_ad_statusNextupdate_campaign_budget