Schedule a budget increase
Pre-schedule a temporary budget increase (Black Friday, a launch, a sale) instead of
editing the budget by hand on the day. Same target rule as the GET: exactly one of
campaignId / adSetId.
Two Meta constraints worth knowing before you call it. timeStart / timeEnd must
fall on a 15-minute boundary, and a campaign cannot mix ABSOLUTE and MULTIPLIER
across its schedules — the second type is rejected with "Can't mix your budget scaling
selection". Window rules (must sit inside the campaign's run dates, minimum lead time,
no overlap) are Meta's and its message is forwarded verbatim.
API key authentication - use your Zernio API key as a Bearer token
In: header
Zernio SocialAccount id used to resolve the Meta token.
Platform campaign id. Exactly one of campaignId / adSetId.
Platform ad set id. Exactly one of campaignId / adSetId.
With ABSOLUTE, a budget in the ad account's currency in WHOLE units (50 = $50.00). With MULTIPLIER, a factor of the existing budget (2 = double it) and NOT a currency amount.
"ABSOLUTE" | "MULTIPLIER"Unix seconds, on a 15-minute boundary (:00, :15, :30, :45).
Unix seconds, on a 15-minute boundary and after timeStart.
"ONE_TIME" | "WEEKLY" | "MONTHLY"Ad account currency, for the ABSOLUTE minor-unit conversion. Ignored for MULTIPLIER.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adaccounts.createHighDemandPeriod({ body: { accountId: 'account_abc123', budgetValue: 0, budgetValueType: 'ABSOLUTE', timeStart: 0, timeEnd: 0, },});console.log(data);{
"objectId": "string",
"id": "string"
}{
"error": "Unauthorized"
}Create or reuse a custom conversion POST
Provision the Meta custom conversion an ads flow optimises toward, and hand back the `customConversionId` for `promotedObject.customConversionId` on POST /v1/ads/create. Removes the manual "create it in Ads Manager first" step. **Reuse is ours, not Meta's.** Meta's create is not idempotent, so a retried request would otherwise mint a duplicate carrying none of the original's optimisation history. A non-archived conversion with the same `name` on the same `pixelId` is returned instead of created, with `reused: true` and a 200 rather than a 201. `rule` is forwarded verbatim in Meta's own grammar (e.g. `{"url": {"i_contains": "thank-you"}}`); Meta validates it and rejects a malformed one with "A conversion rule is required at creation time".
Create a value rule set POST
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}`. **Rule order is semantic**: rules are evaluated in array order and only the first matching rule adjusts the bid for an overlapping audience. `adjustValue` is an unsigned magnitude in percent; the direction lives in `adjustSign`. `INCREASE` accepts 1-1000, `DECREASE` accepts 1-90. There is no signed field and 0 is out of range. `criteriaValueTypes` is positionally paired with `criteriaValues` (same length, same order). Every type is the literal `"NONE"` except on `LOCATION`, which 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. Ads Manager turns a rule set read-only (this API stays editable) when a rule uses more than 2 criteria, a custom age range, or the placements `FB_MARKETPLACE`, `FB_SEARCH`, `FB_VIDEO` or `IG_EXPLORE`. Limits: 6 rule sets per ad account, 10 rules per set, 4 criteria per rule. The per-account cap is enforced by Meta, not here.