Microsoft Ads how to update campaign status to Paused

doall 0 Reputation points
2023-01-24T23:34:49.63+00:00

On Microsoft Ads, I want to pause a campaign through Api. Here is my flow:

  1. CampaignManagementExampleHelper.GetCampaignsByIdsAsync(accountId, campaignIds, campaignType, returnAdditionalFields: null);
  2. Set campaign.Status = CampaignStatus.Paused;
  3. CampaignManagementExampleHelper.UpdateCampaignsAsync(accountId, campaigns);

I got this:

  • Error code: 1155
  • Error Message: The campaign type field of a campaign cannot be updated.

I didn't change campaign type at all, so not sure what is the cause.

Any suggestions?

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
384 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Gary Ruddy 0 Reputation points
    2023-01-30T06:12:26.1266667+00:00

    Optional

    0 comments No comments

  2. doall 0 Reputation points
    2023-02-01T21:07:52.12+00:00

    Found a work around (step 3):

    1. CampaignManagementExampleHelper.GetCampaignsByIdsAsync
    2. Set campaign.Status = CampaignStatus.Paused;
    3. set campaign.CampaignType = null;
    4. CampaignManagementExampleHelper.UpdateCampaignsAsync

    Still feels like a bug, but maybe by design.

    0 comments No comments