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 |
