How to Remove Custom Parameters in the Ads API

460 views
Skip to first unread message

Dorian Kind

unread,
Feb 25, 2022, 10:56:21 AM2/25/22
to Google Ads API and AdWords API Forum
Hello,

in the Adwords API, Custom Parameters can be removed by sending an update operation with the "isRemove" flag set.

In the Ads API, this flag doesn't exist. Setting the Custom Parameter's "value" field to the empty string will not remove it and just omitting it (only sending the "key"  attribute) causes an "INVALID_ARGUMENT" error with the explanation "Custom parameter value cannot be null".

How do I go about removing existing Custom Parameters from a campaign (or ad group, ad, keyword etc.)?

Thanks & best regards
Dorian

Dorian Kind

unread,
Mar 1, 2022, 5:17:42 AM3/1/22
to Google Ads API and AdWords API Forum
To bump this thread, note that it's of course possible to just send the full set of custom parameters excluding the unwanted one in an update operation, which will essentially remove the omitted parameter. Still wondering whether there is more elegant way of doing this.

Google Ads API Forum Advisor

unread,
Mar 1, 2022, 11:22:14 AM3/1/22
to dor...@webrepublic.ch, adwor...@googlegroups.com
Hi Dorian,

Thanks for reaching out. As you pointed out, there isn't a field to set the status of an existing custom parameter. To remove a single parameter from the list, you will have to make an update request that only includes the custom parameters that you wish to be included.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Wz985:ref

Dorian Kind

unread,
Mar 1, 2022, 11:49:18 AM3/1/22
to Google Ads API and AdWords API Forum
Thanks for the confirmation, Matt.
Reply all
Reply to author
Forward
0 new messages