campaigns and ads
Replace campaign-level negative keywords
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.
PlatformsGoogle
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
campaignIdstring
Platform campaign ID
platform?string
Optional and NOT authoritative: the resolved campaign's own platform decides 200 vs 501, never this hint.
Value in
"facebook" | "instagram" | "tiktok" | "linkedin" | "pinterest" | "google" | "twitter" | "openai"keywords
Items
items <= 1000Response Body
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"
}
]
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Empty
Empty
Empty
Was this page helpful?