OverviewPlatformsAPI ReferenceResources
Conversions API

Send conversion events

POSThttps://zernio.com/api/v1/ads/conversions

Sends conversion events, such as purchases or leads, from your server to an ad platform so it can attribute and optimize ads.

Relays one or more events to the target ad platform's native Conversions API. The platform is inferred from the provided accountId. Requires the Ads add-on.

PlatformsMetaGoogleTikTokLinkedInPinterestReddit

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

SocialAccount ID (metaads, googleads, linkedinads, tiktokads, openaiads, pinterestads, or redditads).

destinationIdstringRequired

Platform destination identifier. For Meta, the pixel/dataset ID. For Google, the conversion action resource name. For LinkedIn, the conversion rule ID or full urn:lla:llaPartnerConversion:{id} URN. For OpenAI Ads, the pixel wire id. For Pinterest, the numeric ad account id. For Reddit, the pixel id (a2_...).

eventsarray of ConversionEventRequired
eventNamestringRequired

Standard event name (Purchase, Lead, CompleteRegistration, AddToCart, InitiateCheckout, AddPaymentInfo, Subscribe, StartTrial, ViewContent, Search, Contact, SubmitApplication, Schedule) or a custom string. Custom strings work only on platforms that accept custom events: Meta, OpenAI Ads and Reddit.

Per-platform behavior:

  • Meta: free-form; standard names match Meta's built-ins.
  • Google: ignored. The conversion action's category determines the type.
  • LinkedIn: ignored. The conversion rule's type is locked to the destination.
  • OpenAI Ads: a fixed subset (Purchase, Lead, AddToCart, ViewContent, InitiateCheckout, CompleteRegistration, Subscribe, StartTrial, Schedule) maps 1:1 onto OpenAI's own event-type enum. Anything else is sent as a custom event with the name preserved.
  • Reddit: Purchase, Lead, CompleteRegistration (SIGN_UP), AddToCart, AddToWishlist, ViewContent, Search and PageView (PAGE_VISIT) map onto Reddit's tracking types. Anything else is sent as a CUSTOM event with the name preserved.
eventTimeintegerRequired

When the conversion happened, in unix seconds.

eventIdstringRequired

Unique dedup key. Use the same eventId on pixel + CAPI to prevent double-counting. Mapped to:

  • Meta: event_id.
  • Google: transactionId.
  • LinkedIn: eventId. LinkedIn deduplicates against Insight Tag events with the same eventId; the Insight Tag event wins when both arrive.
  • Reddit: metadata.conversion_id (Reddit's dedup key against Reddit Pixel events).
userobjectRequired

User identity fields. More signals mean higher match rates.

Optional parameters10 fields
testCodestring

Test event code. Send it at the request root, never inside an event. A root-level test_event_code (Meta's own name) is accepted as an alias and must be a non-empty string; sending both with different values is a 400.

  • Meta: sent as test_event_code. Events show in Events Manager's Test Events tab for the pixel whose current test code matches (Meta rotates the code, so copy it again from that tab). Meta still processes them like any other event, so remove it in production.
  • Pinterest: any value sends the batch with test=true (validated, not recorded).
  • Reddit: sent as test_id, so the events show in the pixel's test view.
  • Google, LinkedIn and OpenAI Ads: ignored.
consentobject

Batch-level user consent. Required by Google for EEA/UK events under the Feb 2026 restrictions.

  • Meta: any DENIED flag enables Limited Data Use on every event in the batch (data_processing_options ["LDU"] with geolocation, country 0 / state 0). GRANTED or absent consent sends events with Meta's default processing.
  • Reddit: adUserData: DENIED drops every user field from the events.
  • LinkedIn: ignored.
events[].valuenumber

Conversion value in the specified currency.

events[].currencystring

ISO 4217 currency code.

events[].itemsarray of object

Item-level detail for ecommerce events.

events[].sourceUrlstring (uri)

URL where the conversion originated (used by Meta).

events[].campaignobject

The ad campaign behind the event, when you know it. Read only by POST /v1/events, which ties the event to the campaign named by campaign.id, then by the utm_campaign of sourceUrl, then by campaign.name. See its Storage notes for how the event then counts.

events[].actionSourcestringOne of web | app | offline | crm | phone_call | system_generated | business_messaging

Where the conversion happened. Used by Meta. Google also requires an event source internally; omitting this field sends OTHER to Google. Send an explicit value for accurate origin reporting. business_messaging (Meta) marks an event from a WhatsApp, Messenger or Instagram Direct conversation and needs messaging.

events[].messagingobject

Meta only, read when actionSource is business_messaging (Conversions API for Business Messaging).

  • channel is sent as the event's messaging_channel (instagram_direct goes out as instagram).
  • Each id lands in Meta's user_data unhashed. An id that does not belong to channel is ignored.

Meta accepts only its business messaging event names here: LeadSubmitted, QualifiedLead, Purchase, AddToCart, InitiateCheckout, ViewContent, OrderCreated, OrderShipped, OrderDelivered, OrderCanceled, OrderReturned, CartAbandoned, RatingProvided, ReviewProvided. eventName is forwarded unchanged.

events[].platformDataobject

Escape hatch for platform-specific fields we haven't normalized. On Meta, keys are shallow-merged into custom_data only: fields Zernio already builds (value, currency, contents, num_items) always win on collision, and user_data (hashed match keys) is never touched. Use first-class fields (e.g. user.leadId) for anything that must reach user_data.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Supported platforms

  • Meta (metaads) via Graph API
  • Google Ads (googleads) via Data Manager API ingestEvents
  • LinkedIn (linkedinads) via /rest/conversionEvents
  • TikTok (tiktokads) via the Offline Events API /offline/batch/ (OFFLINE conversions only)
  • OpenAI Ads (openaiads) via its Conversions API (a separate host, bzr.openai.com)
  • Pinterest (pinterestads) via POST /v5/ad_accounts/{id}/events
  • Reddit (redditads) via the Reddit Conversions API (POST /api/v3/pixels/{pixelId}/conversion_events)

destinationId per platform

  • Meta: pixel (dataset) ID, e.g. 123456789012345
  • Google: conversion action resource name, e.g. customers/1234567890/conversionActions/987654321
  • LinkedIn: conversion rule ID or URN, e.g. 104012 or urn:lla:llaPartnerConversion:104012
  • TikTok: Offline Event Set ID, e.g. 7057103914977558530
  • OpenAI Ads: pixel wire id (numeric pixel_id, distinct from the internal pixel id), as returned by GET /v1/accounts/{accountId}/conversion-destinations
  • Pinterest: numeric ad account id, e.g. 549755885175 (Pinterest attributes to the ad account, not to a tag)
  • Reddit: pixel id, e.g. a2_abc123, as returned by GET /v1/accounts/{accountId}/conversion-destinations (any other shape returns 400)

Callers can list valid destinations via GET /v1/accounts/{accountId}/conversion-destinations.

Pinterest notes

  • Each event needs an email, or ipAddress plus userAgent. Others are listed in failures with code INVALID_EVENT and the rest are still sent.
  • clickIds.epik (the _epik cookie) is sent as click_id.
  • actionSource web stays web, offline sources become offline, and app events need platformData.action_source app_android or app_ios.
  • Pinterest answers per event, so one bad event does not fail its chunk (failures carry code PINTEREST_EVENT_FAILED).
  • consent.adUserData: DENIED sets opt_out.
  • The connected user needs a Business Access role on the ad account (403 otherwise).

Reddit notes

  • Each event needs a match key: clickIds.rdt_cid, clickIds.rdt_uuid, email, phone, externalId, or ipAddress plus userAgent.
  • Reddit accepts events up to 7 days old. eventTime is unix SECONDS (a value more than an hour in the future is refused as milliseconds).
  • Events failing these checks are listed in failures with code INVALID_EVENT and the rest are still sent.
  • Email (lowercased, dots and +tags stripped from the local part), phone (E.164 with the leading +) and externalId are SHA-256 hashed. IP and user agent go plaintext.
  • consent.adUserData: DENIED sends no user fields.
  • actionSource maps to WEBSITE (web), APP (app) or OTHER, overridable with platformData.action_source. platformData.order_id is forwarded.
  • testCode is sent as Reddit's test_id.

Reddit errors:

  • 403 reconnect_required: the connection was authorized without the adsconversions permission (reconnect via GET /v1/connect/redditads/ads).
  • 403 insufficient_permissions: the Reddit user has no role on the ad account that owns the pixel.
  • REDDIT_REJECTED: Reddit throttling and other rejections, reported per chunk in failures.

TikTok notes

This path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel events. Each event must carry an email or phone (TikTok requires at least one).

The connected TikTok ads account must have granted the Offline Events permission; older grants must reconnect.

OpenAI Ads notes

Requires a tracking tag (pixel) to already exist on the account. Returns 422 with code TRACKING_TAG_REQUIRED if POST /v1/accounts/{accountId}/tracking-tags hasn't been called yet.

Hashing

All PII (email, phone, names, external IDs) is hashed with SHA-256 server-side per each platform's normalization spec, including Google's Gmail-specific dot/plus-suffix stripping. Send plaintext.

LinkedIn externalIds are passed through as plaintext per LinkedIn's spec; only emails and phones are hashed.

For LinkedIn, the connected account must have been authorized after the Conversions API rollout (the OAuth grant must include rw_conversions). Older accounts must reconnect.

Batching

Batching is handled automatically. Per-platform caps:

  • Meta: 1000 events per request; rejects the entire batch if any event is malformed.
  • Google: 2000.
  • LinkedIn: 5000, all-or-nothing per chunk.
  • OpenAI Ads: 1000 per request. Larger submissions are split into 1000-event chunks, each all-or-nothing (a malformed event fails every event in that chunk, not the whole request).
  • Reddit: works the same way as OpenAI Ads, in chunks of 1000.

Dedup

Pass a stable eventId on every event:

  • Meta and LinkedIn use it to dedupe against browser-side pixel/Insight Tag events.
  • Google maps it to transactionId.
  • Reddit receives it as conversion_id, its dedup key against Reddit Pixel events.

eventName per platform

  • Meta: free-form. Standard names (Purchase, Lead, ...) match Meta's built-in events; custom strings are accepted.
  • Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it.
  • LinkedIn: ignored. The conversion rule's type (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it.
  • OpenAI Ads: a fixed subset of standard names maps 1:1 onto OpenAI's own event-type enum: Purchase, Lead, AddToCart, ViewContent, InitiateCheckout, CompleteRegistration, Subscribe, StartTrial, Schedule. Any other standard name or custom string is sent as type: custom with the name preserved.
  • Pinterest: standard names map onto Pinterest's (see below). Any other string is sent as is, so it matches an advertiser defined event of that name.

Pinterest name mapping:

  • Purchase = checkout
  • AddToCart = add_to_cart
  • InitiateCheckout = initiate_checkout
  • AddPaymentInfo = add_payment_info
  • Lead = lead
  • CompleteRegistration = signup
  • Subscribe = subscribe
  • ViewContent = view_content
  • Search = search
  • PageView = page_visit

Remove a custom conversion goal

Deletes a Google Ads custom conversion goal; switch any campaigns using it to another goal first. Google refuses (400) while any campaign still uses it: switch those campaigns to another goal first.

Send events to every destination

Sends conversion events once and forwards them to every ad platform destination saved for the profile (see `POST /v1/events/destinations`), or to the `destinations` given in the request. Requires the Ads add-on. ### Forwarding - Each destination receives the events exactly as `POST /v1/ads/conversions` would send them, so the per-platform notes there (hashing, batching, `eventName` semantics, dedup on `eventId`) apply here too. - A destination saved with `eventNames` only receives events with those names. - One destination failing never blocks the others: each one reports its own result. ### Storage Zernio also stores each event for the profile's reporting. - Email, phone and `externalId` are stored only as SHA-256 hashes. - `sourceUrl` keeps only its origin, path and attribution parameters (`utm_*`, `gclid`, `fbclid`, `ttclid`, `li_fat_id`, `epik`, `rdt_cid`, `gbraid`, `wbraid`). - Events sent with `testCode` are forwarded but not stored. - Sending an event again with the same `eventId` replaces the stored one. - A stored `Purchase`, `Lead` or `QualifiedLead` tied to one of your campaigns (see `campaign` on each event) counts in `GET /v1/ads/campaign-results` and in ad rules as `sales` and `revenue`, `leads` or `qualified_leads`.

POST/v1/ads/conversions
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.conversions.sendConversions({  body: {    accountId: 'account_abc123',    destinationId: 'destination_abc123',    events: [      {        eventName: 'Purchase',        eventTime: 1744732800,        eventId: 'order_abc_123',        user: {          email: 'user@example.com',          phone: 'string',          firstName: 'Example',        },      },    ],  },});console.log(data);
{  "platform": "metaads",  "eventsReceived": 0,  "eventsFailed": 0,  "failures": [    {      "eventIndex": 0,      "eventId": "string",      "message": "string",      "code": "string",      "platformError": {}    }  ],  "traceId": "string",  "testCode": "string"}
OpenAPI specification
Was this page helpful?