Zernio
Zernio
API Reference

Pixels & Tracking Tags

List accounts it is shared withGETList tracking tagsGETCreate a tracking tagPOSTGet ad tracking tagsGETGet aggregated event statsGETGet a tracking tagGETSet ad tracking tagsPATCHUpdate a tracking tagPATCHShare with an ad accountPOSTStop sharing with an accountDELETE
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Pixels & Tracking Tags

Create a tracking tag

Meta: creates a Meta Pixel on the given ad account (POST /act_{id}/adspixels, where name is the only input). Returns the created tag including its install code. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with ownerBusinessId: null and can't be shared with other ad accounts.

Creating a Meta pixel does NOT install it. Install the returned code snippet on the site, or send events server-side via POST /v1/ads/conversions. The check installed is derived from lastFiredTime.

OpenAI Ads: creates an OpenAI pixel AND provisions a Conversions API key for it in the same call (adAccountId is required by this endpoint but ignored: one API key maps to exactly one ad account, so there's nothing to select). Returns 422 (FEATURE_NOT_AVAILABLE) if the ad account isn't enabled for pixel management; contact your OpenAI partner representative to enable it. There is no delete API for OpenAI pixels. If the pixel is created but the Conversions API key provisioning then fails, the pixel is left live on OpenAI (it cannot be cleaned up) and the error message names the surviving pixel id and warns against retrying, since a retry would create a second, orphaned pixel.

NOT idempotent on either platform: each call creates a new pixel (and, for OpenAI, a new Conversions API key plus, with defaultEventType, a new conversion event setting). Do not retry blindly on timeout. Meta (platform metaads) and OpenAI Ads (platform openaiads); other platforms return 405.


PlatformsMeta
POST
/v1/accounts/{accountId}/tracking-tags

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

Ads SocialAccount id (platform metaads or openaiads).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

{  "platform": "metaads",  "tag": {    "id": "string",    "name": "string",    "platform": "metaads",    "kind": "pixel",    "status": "active",    "code": "string",    "lastFiredTime": 0,    "isUnavailable": true,    "installed": true,    "creationTime": 0,    "ownerBusinessId": "string",    "ownerAdAccountId": "string"  }}
Was this page helpful?

List tracking tags

Returns the tracking tags (Meta Pixels, or OpenAI Ads pixels) the connected ads account can see. Pass `?adAccountId=act_...` (Meta only) to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code`. Call `getTrackingTag` for the install snippet and full detail (Meta only; OpenAI Ads has no get-by-id endpoint). Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405. The `accountId` must be the ads SocialAccount created by the Ads add-on connect flow (Meta) or the OpenAI Ads connect flow, not a Facebook/Instagram posting account. Get your Meta `act_...` ids from `GET /v1/ads/accounts`; `adAccountId` is ignored for OpenAI Ads (one API key maps to exactly one ad account).

Get ad tracking tags

Unified read of the platform's native click-URL tracking params. - Meta (facebook/instagram): the creative's `url_tags` (and template_url_spec). - Google (googleads): the campaign's `trackingUrlTemplate` + `finalUrlSuffix`. Subject to the Google Ads API access-tier daily quota; bulk audits need Standard access. - LinkedIn (linkedinads): the campaign's Dynamic UTM `dynamicValueParameters` + `customValueParameters`. Returns 405 for platforms without a click-URL tracking surface (TikTok, X, Pinterest). **Not pixels.** Despite the shared path segment, this endpoint has nothing to do with measurement tags. For an ad account's pixels use `GET /v1/accounts/{accountId}/tracking-tags?adAccountId=act_...` (Meta Pixels, with `kind` and `ownerAdAccountId`) or `GET /v1/accounts/{accountId}/conversion-destinations`.

adAccountId*string

Meta ad account id, e.g. act_123456789. Required by this endpoint but ignored for OpenAI Ads.

name*string
Length1 <= length <= 200
defaultEventType?string

OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so goal: conversions ad creates on POST /v1/ads/create have an event to reference immediately.

Value in

  • "order_created"
  • "lead_created"
  • "items_added"
  • "contents_viewed"
  • "checkout_started"
  • "registration_completed"
  • "subscription_created"
  • "trial_started"
  • "appointment_scheduled"
  • "page_viewed"
  • "app_installed"
  • "app_opened"