Update an ad rule
Changes any field of a rule except its connection and ad account. Send campaignIds: null to
check the whole ad account again. Changing the schedule, or enabling a disabled rule, moves the
next run; re-sending enabled: true on an enabled rule does not.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Path parameters
Body
application/jsonOptional parameters11 fields
campaign | adset | ad | keyword | search_termWhether the rule checks campaigns, ad sets, single ads, Google keywords or Google search terms. Each one is evaluated on its own.
keyword and search_term read Google Search, on Google Ads accounts only. A keyword's id is <adGroupId>~<criterionId>, as PATCH /v1/ads/keywords/{keywordId} takes it. A search term is one per ad group, its id <adGroupId>~<term>.
- They read a daily history Zernio fetches from Google. A day keeps its 50,000 rows that spent most.
- Every daily window works,
todayincluded: today is refreshed at most once an hour. - A new rule's first runs load its days a few at a time, and fail until all are in.
- A keyword rule judges every serving keyword, one with no traffic at zero. Paused keywords are not judged.
- Google lists only search terms that showed at least once, so a search term rule takes
impressionswith>or>=, never<or<=.
They take spend, impressions, clicks, conversions, ctr, cpc, cpm, cpa and roas over whole days, no usual, of, top or bottom, and compareTo only as campaign. A keyword rule can notify or pause; a search term rule only notifies.
Narrows the objects the rule checks. Every filter must hold. A campaign rule reads name, campaign_id, goal, days_live, days_since_change, budget_level and channel_type; an ad set rule all but days_since_change, plus campaign_name and adset_id; an ad rule also adset_name and ad_id.
A keyword rule reads name (the keyword text), campaign_name, adset_name, campaign_id, adset_id, match_type and blocked_by_negative. A search term rule reads those (name is the term) plus search_term_status.
Null removes the groups; each campaign is then judged on its own.
Null removes it; every matching run then acts and notifies again.
A group: all (every item must hold) or any (one is enough). An item is a condition or another group, nested up to 3 levels, with at most 10 conditions in total. A rate with no denominator (a CPA with no conversions) never matches.
Each type at most once, and at most one of pause, activate, adjust_budget, adjust_bid, adjust_target, reallocate_budget, duplicate and edit_name.
Either everyMinutes or times. Sending a schedule replaces the rule's whole timing. Without one, a new rule runs every 60 minutes.