Ad Campaigns

Edit a Google campaign's device, location, or language targeting

Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of devices, locations, languages, locationTargetingType; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501.

devices is the full set of device bid modifiers: a supported device you leave out is switched off with a bid modifier of 0, since Google cannot remove a device criterion. A device the campaign's channel does not carry, and a set that switches every device off, both return 422.

locations accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with countries/regions/cities/zips/metros key lists (key from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. An empty location list returns 400 instead of removing every criterion: a Google campaign with no location criteria targets every country, so omit locations to leave targeting alone.

The removes and the creates go out in ONE Google googleAds:mutate, so a failed edit leaves the campaign's previous set intact rather than a half-applied one.

languages is an array of Google's language codes (ISO 639-1, plus variants such as zh_CN); an unknown code returns 400.

locationTargetingType switches who the location targeting reaches: presence (people in or regularly in the locations) or presence_or_interest (also people searching for or interested in them). Example: { "platform": "google", "targeting": { "locationTargetingType": "presence" } }.

The response includes the refreshed devices/locations/languages state read back from Google after the edit, and invalidates the cached copy GET on this campaign would otherwise keep serving.

put/v1/ads/campaigns/{campaignId}/targeting

Path parameters

campaignIdstring required

Google platform campaign ID

Request body

platform'google' required

Example request

{
  "targeting": {
    "locationTargetingType": "presence"
  }
}

Response

Targeting updated

campaignIdstring
updatedstring[]

Which targeting fields were applied.

locationTargetingType'presence' | 'presence_or_interest' | 'null' nullable

The value read back from Google after the edit.

Changes

Changed in 5 of the 56 revisions of this API.4918

  • 2c04683ce6944910See the full diff
    • ▲

      the //// request property type changed from object to no type

      request-property-type-changed

    • ▲

      the //// request property type changed from object to no type

      request-property-type-changed

    • ▲

      the //// request property type changed from object to no type

      request-property-type-changed

    • ▲

      the //// request property type changed from object to no type

      request-property-type-changed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      removed the request property /////

      request-property-removed

    • ●

      added the new locationTargetingType enum value to the / response property for the response status

      response-property-enum-value-added

    • ○

      added the new optional request property /

      new-optional-request-property

    • ○

      added subschema #1 subschema #2 to the //// request property oneOf list

      request-property-one-of-added

    • ○

      added subschema #1 subschema #2 to the //// request property oneOf list

      request-property-one-of-added

    • ○

      added subschema #1 subschema #2 to the //// request property oneOf list

      request-property-one-of-added

    • ○

      added subschema #1 subschema #2 to the //// request property oneOf list

      request-property-one-of-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      endpoint added

      endpoint-added