Zernio
Zernio
API Reference

Accounts & Ops

Accounts

List ad accountsGETCreate Meta ad accountPOSTUpdate ad account settingsPATCHAd account financesGET

Activity

Ad account change / audit logGETList comments on an adGETReply to an ad commentPOSTHide or unhide an ad commentPOSTDelete an ad commentDELETE

Business Assets

Businesses listGETList TikTok Business CentersGETAd labelsGETA/B tests and lift studiesGETList Instagram ad identitiesGETList advertisable appsGETGet iOS 14 campaign limitsGETList TikTok ad pixelsGET

Extension Assets

List account calloutsGETAdd account calloutsPOSTUpdate account calloutsPUTRemove account calloutDELETEList account sitelinksGETAdd account sitelinksPOSTUpdate account sitelinksPUTRemove account sitelinkDELETEList account snippetsGETAdd account snippetsPOSTUpdate account snippetsPUTRemove account snippetDELETE

Negative Keyword Lists

List negative keyword listsGETCreate a negative keyword listPOSTGet a negative keyword listGETRename a negative keyword listPUTDelete a negative keyword listDELETEReplace negative list keywordsPUT

Custom Conversions

List custom conversionsGETCreate custom conversionPOST

Value Rules

List value rule setsGETCreate a value rule setPOSTRead a value rule setGETReplace a value rule setPUTDelete a value rule setDELETE

Budget Scheduling

List high-demand periodsGETSchedule a budget increasePOST

DSA Compliance

Get ad account DSA defaultsGETGet DSA recommendationsGET

Other

List Instagram posts to boostGET
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Accounts & Ops

Replace a value rule set

THIS IS A FULL REPLACE, NOT A PATCH. Meta's update is declarative: the body you send becomes the rule set.

  • GET /v1/ads/value-rule-sets/{valueRuleSetId} FIRST.
  • Keep a rule or criterion by echoing its id.
  • Create one by including the object WITHOUT an id.
  • Delete one by OMITTING it from the array. There is no warning and no undo.

name and rules are both required for exactly this reason: a partial body would silently destroy every rule left out.

Rule order is semantic: the array order you send is the evaluation order, and only the first matching rule adjusts the bid for an overlapping audience.

Existing rule sets created elsewhere may contain LOCATION_DMA criteria. Those went inert on 2026-06-22 and are rejected here; migrate them to LOCATION_COMSCORE_MARKET.


PlatformsMeta
PUT
/v1/ads/value-rule-sets/{valueRuleSetId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

valueRuleSetId*string

Platform value rule set id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

{  "valueRuleSetId": "string",  "name": "string",  "rules": [    {      "id": "string",      "name": "string",      "adjustSign": "INCREASE",      "adjustValue": 1,      "status": "string",      "criteria": [        {          "id": "string",          "criteriaType": "AGE",          "operator": "CONTAINS",          "criteriaValues": [            "string"          ],          "criteriaValueTypes": [            "string"          ]        }      ]    }  ],  "message": "string"}
Was this page helpful?

Read a value rule set

Reads one value rule set including every nested rule id and criterion id. This is step one of any edit: `PUT` is a full replace, so you need the ids before you can keep the objects you are not changing. Meta's own read returns `GENDER` values lowercase (`"male"`) while writes require `"MALE"`. Values are passed through untouched, so never case-compare a stored rule against a fetched one.

Delete a value rule set

Deletes the rule set (Meta's `POST /{value-rule-set-id}/delete_rule_set`, a custom action edge rather than an HTTP DELETE on its side). Ad sets pointing at it are not modified here; detach them first with `valueRulesApplied: false` on `PUT /v1/ads/ad-sets/{adSetId}`.

accountId*string

Zernio SocialAccount id (posting or ads variant); its platform decides where the campaign is created.

name*string

Required: the update replaces the whole set.

Length1 <= length <= 255
rules*array<>

The COMPLETE rule list. Omitting a rule deletes it on Meta.

Items1 <= items <= 10