OverviewProductsPlatformsAPI ReferenceResources
Accounts & Ops

Create a value rule set

POSThttps://zernio.com/api/v1/ads/value-rule-sets

Creates a Meta value rule set that raises or lowers bids for chosen audience segments, ready to attach to ad sets.

Creates a value rule set on the ad account (Meta's POST /act_X/value_rule_set). Attach the returned id to an ad set with valueRuleSetId on POST /v1/ads/create or PUT /v1/ads/ad-sets/{adSetId}.

PlatformsMeta

Authentication

AuthorizationBearer tokenRequired

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

Body

application/json

What every request needs

accountIdstringRequired

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

adAccountIdstringRequired

Platform ad account id (Meta act_, Google customer id, LinkedIn account id, ...).

namestring, max 255Required
rulesarray of ValueRuleRequired

Evaluated in order; the first matching rule wins.

namestring, max 255Required
adjustSignstringRequiredOne of INCREASE | DECREASE

Direction of the adjustment. There is no signed value field.

adjustValueintegerRequired

Unsigned percentage magnitude. INCREASE accepts 1-1000, DECREASE accepts 1-90. 0 is out of range on both.

criteriaarray of ValueRuleCriterionRequired

All criteria on a rule must match for the rule to fire.

Optional parameters2 fields
rules[].idstring

Platform rule id. Echo it on PUT to KEEP this rule, omit it to CREATE a new one. A rule left out of the array entirely is DELETED.

rules[].statusstring

Meta returns ACTIVE here but documents no enum for the field. Treat it as a passthrough: echo whatever the GET returned, and do not synthesize values.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Rule order is semantic

Rules are evaluated in array order and only the first matching rule adjusts the bid for an overlapping audience.

Adjustment

adjustValue is an unsigned magnitude in percent; the direction lives in adjustSign. There is no signed field and 0 is out of range.

  • INCREASE accepts 1-1000.
  • DECREASE accepts 1-90.

Criteria

criteriaValueTypes is positionally paired with criteriaValues (same length, same order). Every type is the literal "NONE" except on LOCATION.

LOCATION uses LOCATION_COUNTRY / LOCATION_REGION / LOCATION_CITY / LOCATION_COMSCORE_MARKET and may mix them within one criterion. Location values are Targeting-Search keys: a two-letter country code for LOCATION_COUNTRY, a numeric key for the rest.

LOCATION_DMA was replaced by LOCATION_COMSCORE_MARKET on 2026-06-22 and rules using DMAs are no longer active, so this API rejects it.

AUDIENCE_LABEL values (e.g. HIGH_VALUE) are applied to a Custom Audience in Ads Manager. There is no API to provision them, so label strings are passed through unvalidated and a typo produces a rule that never fires.

Read-only in Ads Manager

Ads Manager turns a rule set read-only (this API stays editable) when a rule uses:

  • more than 2 criteria
  • a custom age range
  • the placements FB_MARKETPLACE, FB_SEARCH, FB_VIDEO or IG_EXPLORE

Limits

  • 6 rule sets per ad account (enforced by Meta, not here)
  • 10 rules per set
  • 4 criteria per rule

List value rule sets

Lists a Meta ad account's value rule sets, which raise or lower bids for audience segments you value differently. Lists the ad account's value rule sets (Meta's `/act_X/value_rule_set`). A value rule set adjusts the auction bid up or down for audience segments you value differently; attach one to an ad set with `valueRuleSetId` on `POST /v1/ads/create` or `PUT /v1/ads/ad-sets/{adSetId}`. Rows are returned in the same camelCase shape the `PUT` body takes, ids included, so a set round-trips 1:1: **the update is a full replace, not a patch**, so you GET, mutate and send the whole thing back. Limits: 6 rule sets per ad account, 10 rules per set, 4 criteria per rule. **Rule order is semantic.** Rules are evaluated in array order and only the FIRST matching rule adjusts the bid for an overlapping audience. The order you send is the order that is stored and returned. Eligibility: value rule sets apply only to ad sets on the `LOWEST_COST_WITHOUT_CAP` (auto-bid) or `COST_CAP` bid strategies. Meta rejects the rest server-side.

Read a value rule set

Shows one Meta value rule set with all its rules and criteria, the first step before editing it. 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.

POST/v1/ads/value-rule-sets
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adaccounts.createValueRuleSet({  body: {    accountId: 'account_abc123',    adAccountId: 'adaccount_abc123',    name: 'Example',    rules: [      {        name: 'Example',        adjustSign: 'INCREASE',        adjustValue: 1,        criteria: [          {            criteriaType: 'AGE',            operator: 'CONTAINS',            criteriaValues: [              'string',            ],            criteriaValueTypes: [              'string',            ],          },        ],      },    ],  },});console.log(data);
{  "adAccountId": "string",  "valueRuleSetId": "string"}
OpenAPI specification
Was this page helpful?