AI-generated Key Takeaways
-
The Google Ads API offers resource-specific services for mutating individual resource types like campaigns.
-
The
GoogleAdsService.Mutateendpoint provides benefits like grouping actions across different resource services and using temporary resource names. -
You can use
GoogleAdsService.Mutateto perform linked operations, such as creating a complete campaign structure in a single request. -
Generally, cross-account mutation is not permitted unless the account is the manager of the client that created the object.
The Google Ads API provides a few different ways for mutating resources, depending on your use case. Each resource has a corresponding service that lets you specify mutate operations for that specific resource type. For example, the Campaign resource has a corresponding CampaignService.MutateCampaigns endpoint for mutating campaigns.
Another option is the GoogleAdsService.Mutate endpoint, which essentially wraps a series of individual mutate calls on the resource services and provides the following benefits:
- Grouped actions across different resource services. Normal calls can only execute operations against a single resource service.
- Temporary resource names. Combine operations to create an entity and its child entities in a single request.
With these two properties, you can use GoogleAdsService.Mutate to, for example, create an entire campaign structure only if every step along the way succeeds.