Hi,

>From the logs provided, I see that the request was unable to update the 
>setting because the update_mask was set to "resource_name", which is 
>incorrect. The resource name of the campaign is immutable. The updateMask 
>tells the API which fields you are updating. The paths you specify must be 
>correct and match the fields you are modifying. So, use the updateMask to 
>update the enableAiMax field as shown below:

curl --request POST \
  'https://googleads.googleapis.com/v21/customers/{customer 
ID}/campaigns:mutate?key=[YOUR_API_KEY]' \
  --header 'developer-token: **********************' \
  --header 'login-customer-id: {login customer ID}' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"operations":[{"update":{"aiMaxSetting":{"enableAiMax":false},
"resourceName":"customers/{customer ID}/campaigns/{campaign ID}"},
"updateMask":"aiMaxSetting.enableAiMax"}]}' \
  --compressed

Retry at your end by making this change and let us know how it goes.

Thanks,

Google Ads API Team


Feedback
How was our support today?


[2025-08-29 14:44:34Z GMT] This message is in relation to case 
"ref:!00D1U01174p.!500Ht01u5G1i:ref" (ADR-00331072)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/M_IYC000000000000000000000000000000000000000000000T1RFMA00PpMdugyiRbis5VPIiHR3cg%40sfdc.net.
  • en... GDZ
    • ... GDZ
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
        • ... GDZ
          • ... GDZ
            • ... GDZ
              • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
                • ... GDZ
                • ... GDZ
                • ... GDZ
                • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
                • ... GDZ

Reply via email to