OverviewProductsPlatformsAPI ReferenceResources

Manage ads

Pause or resume Microsoft Ads campaigns, ad groups and ads, change a campaign's daily budget, and delete them.


Microsoft keeps an on/off switch at each level, and Zernio writes to the level you call.

Pause or resume

PUT /v1/ads/{adId}/status sets the ad's own switch. Its ad group, campaign and sibling ads keep theirs.

TypeScript
const { data: paused } = await zernio.adcampaigns.updateAdStatus({
  path: { adId: '6ae0968fa23091cc35b72121' },
  body: { status: 'paused' }
});

Response (200):

JSON
{ "updated": 1, "skipped": 0, "status": "paused", "configuredStatus": "PAUSED" }

PUT /v1/ads/campaigns/{campaignId}/status and PUT /v1/ads/ad-sets/{adSetId}/status set the campaign's or the ad group's switch the same way.

Other changes

ChangeCallMicrosoft behaviour
Budgetbudget: { amount, type: "daily" } on PUT /v1/ads/{adId} or PUT /v1/ads/campaigns/{campaignId}Changes the campaign's daily budget
DeleteDELETE /v1/ads/{adId} or DELETE /v1/ads/campaigns/{campaignId}Deletes on Microsoft Advertising

How it behaves

  • An ad reads paused while its campaign or ad group is paused, even when its own switch is on: configuredStatus shows the ad's own switch.
  • Deleting an ad Zernio created deletes its whole campaign, because Zernio built that campaign for the ad. Deleting a synced ad deletes only the ad.
  • Rename, bid, targeting and creative changes are not available.
  • A campaign, ad group or ad deleted in Microsoft Advertising settles as cancelled on the next sync.

If it fails

ErrorCauseFix
422 with param: "budget.type"A lifetime budgetSend type: "daily".
501 with code feature_not_availableA rename, bid, targeting or creative change, or deleting an ad groupMake the change in Microsoft Advertising, or create a new ad.
Was this page helpful?

On this page