Replace campaign-level negative keywords
Replaces a Google campaign's full list of campaign-level negative keywords, or clears it.
Replaces the FULL set of campaign-level negative keywords (C.270): the desired
list is diffed against what Google already has, and the difference is applied
as one create/remove mutate. Send an empty array to clear every campaign
negative.
The platform is always discovered from the campaign itself; a non-Google
campaign returns 501 rather than 404, whether or not platform was sent.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Platform campaign ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcampaigns.replaceCampaignNegativeKeywords({ path: { campaignId: 'campaign_abc123', }, body: { keywords: [ 'string', ], },});console.log(data);{ "created": 0, "removed": 0, "keywords": [ { "criterionId": "string", "text": "string", "matchType": "exact" } ]}List campaign-level negative keywords
Lists the negative keywords set on a whole Google campaign, separate from ad group negatives. Returns the campaign-level negative keywords (`campaign_criterion.negative`), distinct from the ad-group-level negatives under `GET /v1/ads/keywords`. Cached for the quota window (not synced to Postgres), and gated by the shared Google Ads operations budget like every other on-demand Google surface. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read. The platform is always discovered from the campaign itself; a non-Google campaign returns 501 rather than 404, whether or not `platform` was passed.
List campaign negative lists
Lists the shared negative keyword lists attached to a Google campaign, separate from its own campaign-level negatives. Google Ads shared negative keyword lists (shared_set type NEGATIVE_KEYWORDS). Reads are cached for 10 minutes; quota exhaustion may return the last successful result for up to 7 days with stale=true. Customer selection is limited to this connection and its account scope.