update_ad_group_status
Pause or resume an ad group (on Meta, the ad set). On apply, Adlyse writes a DecisionLogEntry automatically — like every write on this server — so get_impact_analysis can correlate later metric shifts with the change.
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ad_account_id | string | yes | The ad account id | |
ad_group_id | string | yes | Platform ad-group id (Google/Microsoft) or ad-set id (Meta) | |
status | string | yes | enabled | paused | |
campaign_id | string | for MS | Required for Microsoft Ads (its API addresses ad groups via campaign) | |
preview | boolean | no | false | Return the intended change without calling the platform |
Unlike campaign writes, no before-state is included in the diff — ad-group status isn’t tracked in the synced metrics tables.
Returns#
json
{
"ad_account_id": "ad_acct_abc123",
"ad_group_id": "987654",
"platform": "google_ads",
"preview": false,
"diff": { "status": { "after": "paused" } },
"applied": true,
"decision_id": "dlog_abc123",
"platform_response": { },
"source": "adlyse.ads_writes@v1"
}Errors#
error_type | When |
|---|---|
auth_error | Missing / invalid API key |
not_found | Ad account doesn’t belong to your org |
validation_error | Bad status, or Microsoft without campaign_id |
unsupported_for_platform | Platform has no write adapter (e.g. TikTok) |
credentials_missing | The account’s OAuth link needs reconnecting |
platform_error | The platform API rejected the mutation |