Hi,
Thanks for reaching out to the Google Ads API Forum.
With regards to your concern, you may refer to this service (https://developers.google.com/google-ads/api/reference/rpc/v14/GoogleAdsService#mutate), this method supports atomic transactions with multiple types of resources. For example, you can atomically create a campaign and a campaign budget, or perform up to thousands of mutates atomically. Then, you may check this reference (https://developers.google.com/google-ads/api/reference/rpc/v14/MutateOperation) for the list of operations to perform on individual resources. You may try this on your end and please let us know how it goes.
![]() |
Google Ads API Team |
Hi,
Thanks for getting back with us.
With regards to your concern, you may refer to the customers.googleAds.mutate to perform the following implementation simultaneously. You may also use the API explorer to build and validate your request.
Additionally, you may need to use the labelOperation first, then the adGroupCriterionOperation, lastly adGroupCriterionLabelOperation. For the resource name you may use a temp id to perform the operations with the negative sign in front of the id. For example "resourceName": "customers/{customer_id}/labels/-1". You may use the endpoint below in your HTTP request URI to send the said request.
https://googleads.googleapis.com/v14/customers/{customerId}/googleAds:mutate
You may also refer to the sample request provided below:
{
"mutateOperations": [
{
"labelOperation": {
"create": {
"name": "<insert text here>",
"resourceName": "customers/{customer_id}/labels/-1"
}
}
},
{
"adGroupCriterionOperation": {
"create": {
"keyword": {
"matchType": "<please refer to the enums here: https://developers.google.com/google-ads/api/rest/reference/rest/v14/KeywordMatchType>",
"text": "<insert text here>"
},
"resourceName": "customers/{customer_id}/adGroupCriteria/{adgroup_id}~-2"
}
}
},
{
"adGroupCriterionLabelOperation": {
"create": {
"label": "customers/{customer_id}/labels/-1",
"adGroupCriterion": "customers/{customer_id}/adGroupCriteria/{adgroup_id}~-2"
}
}
}
]
}
Let me know how this goes on your end.
Links included in this email: