Create a conversion destination (LinkedIn)
Create a new conversion rule on the platform. LinkedIn-only today; other platforms manage destinations in their own UIs and return 405.
For LinkedIn, the rule is created with conversionMethod=CONVERSIONS_API
and (by default) auto-associated with all of the ad account's campaigns
via autoAssociationType=ALL_CAMPAIGNS. Pass autoAssociationType: NONE
to opt out and manage associations explicitly via the associations
endpoints below.
365-day attribution windows are only valid for SUBMIT_APPLICATION,
PURCHASE, ADD_TO_CART, QUALIFIED_LEAD, and LEAD rule types;
the API rejects other combinations locally.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
SocialAccount ID (linkedinads).
Sponsored ad account ID. Numeric (e.g. "5123456") or
full urn:li:sponsoredAccount:{id} URN.
length <= 255Either a unified standard event name (e.g. "Purchase", "Lead", "AddToCart") or a LinkedIn rule type enum value (e.g. "PURCHASE", "QUALIFIED_LEAD"). The API maps standard names to LinkedIn enum values automatically.
"LAST_TOUCH_BY_CAMPAIGN" | "LAST_TOUCH_BY_CONVERSION"Default 30. 365 only allowed for LEAD, PURCHASE, ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION rule types — the API rejects other combinations locally.
1 | 7 | 30 | 90 | 365Default 7. Same 365-day-window type restriction applies
as postClickAttributionWindowSize.
1 | 7 | 30 | 90 | 365DYNAMIC (default) uses the per-event value from
sendConversions. FIXED uses the rule's value field.
NO_VALUE drops monetary value entirely.
"DYNAMIC" | "FIXED" | "NO_VALUE"Static conversion value. Used when valueType=FIXED.
The currency should match the ad account's currency.
Controls campaign association at rule-creation time:
- ALL_CAMPAIGNS: associate the rule with every active, paused, and draft campaign in the ad account
- OBJECTIVE_BASED: associate only campaigns whose objective matches the rule's type
- NONE: don't auto-associate. Manage associations via
the
/associationsendpoints below. Note: auto-association runs once at create time; new campaigns added after the rule still need explicit association.
"ALL_CAMPAIGNS""ALL_CAMPAIGNS" | "OBJECTIVE_BASED" | "NONE"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.ads.createConversionDestination({ path: { accountId: 'account_abc123', }, body: { adAccountId: 'adaccount_abc123', name: 'Example', type: 'string', },});console.log(data);{
"platform": "linkedinads",
"destination": {
"id": "string",
"name": "string",
"type": "string",
"status": "active",
"adAccountId": "string"
}
}{
"error": "Unauthorized"
}Search targeting options GET
Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. For geo queries, `q` should contain only the locality name (e.g. `"Amsterdam"`, not `"Amsterdam, NL"`). Use `countryCode` to disambiguate.
Create Click-to-WhatsApp ad(s) POST
Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.