Is it possible to change the campaign of an Adgroup?

14 views
Skip to first unread message

Eduardo Cesar

unread,
Aug 8, 2017, 3:52:54 AM8/8/17
to AdWords API Forum
How can I change de campaign of a specifc Adgroup. I tried the code bellow, but did not work. Error: Server raised fault: '[EntityNotFound.INVALID_ID @ operations[0].operand.id; trigger:'AdGroupId: 19961385808']'  (I have certain that this Adgroup exists)

def change_campaign(ad_group_service, ad_group_id, campaign_id):
"""Change the campaign id"""
operations = [{
'operator': 'SET',
'operand': {
'id': ad_group_id,
'campaignId': campaign_id
}
}]

ad_group_service.mutate(operations)

Peter Oliquino

unread,
Aug 8, 2017, 4:58:52 AM8/8/17
to AdWords API Forum
Hi Eduardo,

Changing the campaign of a specific ad group is not supported in the AdWords API. You will need to REMOVE the current ad group and recreate it by specifying a different CampaignId and passing it to the ADD operator of the AdGroupService.

Best regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages