Resource Service Mutates
Stay organized with collections
Save and categorize content based on your preferences.
Using a resource's individual service is the most straightforward way to mutate
it, but also the least flexible.
Mutate Endpoints
Using a resource-specific service is the most straightforward way to mutate.
Each mutable resource has a corresponding service and a set of operations that
enable you to create, update, or remove the resource.
Suppose you want to create a new Campaign
.
You would create a new Campaign
object, put it inside a CampaignOperation
,
and then send it to the
CampaignService.MutateCampaigns
endpoint.
You can do this for any of the Google Ads API services. So for example, if you wanted
to mutate an AdGroup
, you would pass an
AdGroupOperation
containing the
mutated AdGroup
to the
AdGroupService.MutateAdGroups
endpoint.
Similarly, if you want to modify a CampaignCriterion
, you would use a
CampaignCriterionOperation
and send it to the
CampaignCriterionService.MutateCampaignCriteria
endpoint.
Since the operations
field of the request can be repeated, a single mutate
request can contain multiple operations. However, each operation is treated
independently from all others, so no cross-referencing is allowed.
This is in contrast to the bulk mutate method
(GoogleAdsService.Mutate
),
where operations within the same request can reference entities from other
operations.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThe most straightforward way to mutate a resource is by using its individual service and corresponding operations (create, update, or remove).\u003c/p\u003e\n"],["\u003cp\u003eEach mutable resource has a dedicated service with specific endpoints for mutation, like \u003ccode\u003eCampaignService.MutateCampaigns\u003c/code\u003e for \u003ccode\u003eCampaign\u003c/code\u003e resources.\u003c/p\u003e\n"],["\u003cp\u003eA single mutate request to a resource-specific service can handle multiple operations, but each operation is treated independently.\u003c/p\u003e\n"],["\u003cp\u003eResource-specific mutation differs from bulk mutation (\u003ccode\u003eGoogleAdsService.Mutate\u003c/code\u003e) where operations can cross-reference each other within the same request.\u003c/p\u003e\n"]]],[],null,["# Resource Service Mutates\n\nUsing a resource's individual service is the most straightforward way to mutate\nit, but also the least flexible.\n\nMutate Endpoints\n----------------\n\nUsing a resource-specific service is the most straightforward way to mutate.\nEach mutable resource has a corresponding service and a set of operations that\nenable you to create, update, or remove the resource.\n\nSuppose you want to create a new [`Campaign`](/google-ads/api/reference/rpc/v21/Campaign).\nYou would create a new [`Campaign`](/google-ads/api/reference/rpc/v21/Campaign)\nobject, put it inside a [`CampaignOperation`](/google-ads/api/reference/rpc/v21/CampaignOperation),\nand then send it to the\n[`CampaignService.MutateCampaigns`](/google-ads/api/reference/rpc/v21/CampaignService/MutateCampaigns)\nendpoint.\n\nYou can do this for any of the Google Ads API services. So for example, if you wanted\nto mutate an [`AdGroup`](/google-ads/api/reference/rpc/v21/AdGroup), you would pass an\n[`AdGroupOperation`](/google-ads/api/reference/rpc/v21/AdGroupOperation) containing the\nmutated [`AdGroup`](/google-ads/api/reference/rpc/v21/AdGroup) to the\n[`AdGroupService.MutateAdGroups`](/google-ads/api/reference/rpc/v21/AdGroupService/MutateAdGroups) endpoint.\n\nSimilarly, if you want to modify a [`CampaignCriterion`](/google-ads/api/reference/rpc/v21/CampaignCriterion), you would use a\n[`CampaignCriterionOperation`](/google-ads/api/reference/rpc/v21/CampaignCriterionOperation) and send it to the\n[`CampaignCriterionService.MutateCampaignCriteria`](/google-ads/api/reference/rpc/v21/CampaignCriterionService/MutateCampaignCriteria) endpoint.\n\nSince the `operations` field of the request can be repeated, a single mutate\nrequest can contain multiple operations. However, each operation is treated\nindependently from all others, so no cross-referencing is allowed.\n\nThis is in contrast to the bulk mutate method\n([`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate)),\nwhere operations within the same request can reference entities from other\noperations."]]