propose_write
ads

Any Google Ads write the account allows, as one atomic GoogleAdsService.Mutate on the store's linked account. Each opera

Changed on

Any Google Ads write the account allows, as one atomic GoogleAdsService.Mutate on the store's linked account. Each operation is Google's JSON for a MutateOperation, e.g. {"campaign_criterion_operation": {"create": {"campaign": "customers/{customer_id}/campaigns/123", "device": {"type": "mobile"}, "bid_modifier": 0.8}}} or {"ad_group_operation": {"update": {"resource_name": "customers/{customer_id}/adGroups/456", "name": "x"}}} (an update without update_mask gets the fields it sets). {customer_id} is filled in; another account is refused. Google validates every operation before a card exists (nothing persists), and the card says whether it can widen spend and by which campaigns' daily budgets. A campaign is created PAUSED; its status, budget amount and bidding are refused here and the refusal names the Magistry tool that declares each of them. The answer carries undo.operations: pass them back to this tool to undo (creates removed, updated fields restored; a remove of a campaign, ad group, asset group, list or action is permanent in Google Ads). Ids come from a GAQL read of the account.

post/api/v1/tools/ads_google_mutate

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopesads:write

Headers

Idempotency-Key, string

Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.

Request body

object required
operations, object[] required

MutateOperation objects, in order; temporary ids (negative) may link them.

summary, string

One line for the card: what this write does and why.

idempotency_key, string required

Required. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.

Response

Tool result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision