Hi,

Thank you for reaching out to the Google Ads API support team.

To create keywords for campaigns with a resource name, you may use this 
endpoint "Method: customers.campaignCriteria.mutate ". Also, to create keywords 
for ad group with resource name, you may use this end point "Method: 
customers.adGroupCriteria.mutate ".

Kindly refer to the below sample request for creating keywords using 
CampaignCriterionOperation:

{
  "operations": [
    {
      "create": {
        "keyword": {
          "matchType": {matchType},
          "text": {text}
        },
        "resourceName": 
"customers/{customerId}/campaignCriteria/{campaignId}~{criterionId}",
        "negative": true
      }
    }
  ]
}


Kindly refer to the below sample request for creating keywords using 
AdGroupCriterion:

"operations":[
     {
        "create":{
          "keyword":{
            "matchType":"{matchType}",
            "text":"{text}"
            },
    "adGroup":"customers/{customerId}/adGroups/{adGroupId}"

}}]}


I tried to create the keywords for the campaign and adgroup by my end. So, I 
would suggest you to try the above request from your end and let us know, how 
this goes on your end.
This message is in relation to case "ref:!00D1U01174p.!5004Q02tIwOC:ref" 
(ADR-00234450)

Thanks,

Google Ads API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/A7mf3000000000000000000000000000000000000000000000SDA2NQ00RH8fI5YqQTSLoqKcgfASMw%40sfdc.net.

Reply via email to