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
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Accounts & Ops

Create custom conversion

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".


PlatformsMeta
POST
/v1/accounts/{accountId}/custom-conversions

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

accountId*string

Meta ads SocialAccount id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

{  "adAccountId": "string",  "customConversionId": "string",  "reused": true,  "customConversion": {    "id": "string",    "name": "string",    "rule": {},    "customEventType": "string",    "pixelId": "string",    "isArchived": true  }}
Was this page helpful?

List custom conversions

The ad account's Meta custom conversions, including archived ones (`isArchived`).

List value rule sets

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.

adAccountId*string

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

name*string

Also the reuse key, together with pixelId.

Lengthlength <= 255
pixelId*string

Meta pixel id (event_source_id). From GET /v1/accounts/{accountId}/tracking-tags.

customEventType*string

Meta custom_event_type, e.g. LEAD, PURCHASE, OTHER.

rule*

Meta conversion rule, forwarded verbatim.