Create an ad rule
Changed onCreates a rule that checks the campaigns or ad sets of one ad account on a schedule and acts on each one that meets every condition.
Rules support Meta, Google, TikTok, LinkedIn, Pinterest, X and Reddit ads connections. Use POST /v1/ads/rules/{ruleId}/preview to see what a rule would match before enabling it.
Evaluation
Each campaign or ad set is evaluated on its own, over the ad account's calendar days, from the metrics Zernio syncs.
Actions
A rule can notify (the ad_rule.triggered webhook), and take at most one of:
- pause
- activate
- adjust_budget
Cooldown
After acting on an object, the rule leaves that object alone for cooldownMinutes. A rule that pauses, activates or adjusts budgets needs a cooldown at least as long as its schedule.
How activate works
activate only reactivates objects a rule paused, never ones you paused yourself, and only once the cooldown has passed since that pause.
If you reactivate and pause such an object yourself between two runs of a rule, Zernio cannot tell your pause from the rule's, and an activate rule may reactivate it.
Request
- Base URLhttps://zernio.com/api
- URLhttps://zernio.com/api/v1/ads/rules
- AuthHTTP bearer
Request body
Response
Rule created
Changes
- breaking
removed the enum value
clicksof the request property/// - breaking
removed the enum value
conversionsof the request property/// - breaking
removed the enum value
cpaof the request property/// - breaking
removed the enum value
cpcof the request property/// - breaking
removed the enum value
cpmof the request property/// - breaking
removed the enum value
ctrof the request property/// - breaking
removed the enum value
frequencyof the request property/// - breaking
removed the enum value
impressionsof the request property/// - breaking
removed the enum value
reachof the request property/// - breaking
removed the enum value
roasof the request property/// - breaking
removed the enum value
spendof the request property/// - info
added
subschema #1subschema #2to the///request propertyanyOflist - info
added
subschema #1subschema #2to the////response propertyanyOflist for the response status - info
removed the
clicksenum value from the////response property for the response status - info
removed the
conversionsenum value from the////response property for the response status - info
removed the
cpaenum value from the////response property for the response status - info
removed the
cpcenum value from the////response property for the response status - info
removed the
cpmenum value from the////response property for the response status - info
removed the
ctrenum value from the////response property for the response status - info
removed the
frequencyenum value from the////response property for the response status - info
removed the
impressionsenum value from the////response property for the response status - info
removed the
reachenum value from the////response property for the response status - info
removed the
roasenum value from the////response property for the response status - info
removed the
spendenum value from the////response property for the response status
- breaking
- breaking
removed
subschema #2subschema #3subschema #4from the/request propertyoneOflist - breaking
added
subschema #2subschema #3subschema #4to the//response propertyoneOflist for the response status - warning
added the new
adenum value to the/response property for the response status - warning
added the new
frequencyenum value to the////response property for the response status - warning
added the new
reachenum value to the////response property for the response status - info
added the new
adenum value to the request property - info
added the new
frequencyenum value to the request property/// - info
added the new
reachenum value to the request property/// - info
added
subschema #2subschema #3subschema #4to the/request propertyoneOflist - info
removed
subschema #2subschema #3subschema #4from the//response propertyoneOflist for the response status
- breaking