Zernio
APIFor you
Zernio
APIFor you
API Reference

Automated Rules

Rules

List ad rulesGETCreate an ad rulePOSTGet an ad ruleGETUpdate an ad rulePATCHDelete an ad ruleDELETE

Preview and History

Preview an ad rulePOSTList an ad rule's runsGET
Dashboard
OverviewPlatformsAPI ReferenceResources
Automated Rules

Delete an ad rule

Deletes a rule and its run history. Changes the rule already made on the platform stay.


PlatformsMetaGoogleTikTokLinkedInPinterestX
DELETE
/v1/ads/rules/{ruleId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

ruleId*string

Response Body

application/json

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.adrules.deleteAdRule();console.log(data);
{  "success": true}
Was this page helpful?

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.

Preview an ad rule

Evaluates a rule against current metrics and returns what it would match right now, without acting on anything, sending a webhook or starting a cooldown. Works on disabled rules.