Zernio
Zernio
API Reference

Conversions API

List account conversion goalsGETList conversion actionsGETList associated campaignsGETList conversion destinationsGETList custom conversion goalsGETCreate website conversion actionPOSTCreate a conversion destinationPOSTCreate a custom conversion goalPOSTGet a conversion destinationGETGet attribution metricsGETGet Event Match QualityGETUpdate account conversion goalsPATCHSet a conversion action primary or secondaryPATCHUpdate a conversion destinationPATCHUpdate a custom conversion goalPATCHDelete a conversion destinationDELETEAssociate campaignsPOSTAdjust uploaded conversionsPOSTRemove associated campaignsDELETERemove a custom conversion goalDELETESend conversion eventsPOST
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Conversions API

Create a custom conversion goal

Creates a custom conversion goal from conversion action ids. Point a campaign at it with PATCH /v1/ads/campaigns/{campaignId}/conversion-goals.


PlatformsGoogle
POST
/v1/ads/conversions/custom-goals

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

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

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.conversions.createCustomConversionGoal({  body: {    accountId: 'account_abc123',    name: 'Example',    conversionActionIds: [      'conversionaction_abc123',    ],  },});console.log(data);
{  "customerId": "string",  "id": "string",  "resourceName": "string"}
Was this page helpful?

Create a conversion destination

Create a new conversion destination on the platform. Supported for LinkedIn (conversion rule) and Google Ads (conversion action). Meta and OpenAI Ads pixels are created via their own tracking-tags flow instead (`POST /v1/accounts/{accountId}/tracking-tags`); this endpoint returns 405 for both. **LinkedIn:** creation is NOT idempotent. A retry creates a second destination. Deduplicate before retrying. **Google Ads:** calling with a name that already exists reuses the existing conversion action transparently (the response is identical to a fresh create). Calling with the same name but a different category returns a typed `IDEMPOTENCY_CONFLICT` (409) rather than silently returning the mismatched action. **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. **Google Ads:** the conversion action is created with `type=UPLOAD_CLICKS` (required for API-uploaded offline conversions, immutable after creation). The `type` field carries the Google `ConversionActionCategory` enum value, e.g. `PURCHASE`, `SUBSCRIBE_PAID`, `SIGNUP`, `IMPORTED_LEAD`, `BOOK_APPOINTMENT`. Unified standard event names (e.g. `Purchase`, `Subscribe`, `CompleteRegistration`, `Lead`, `Schedule`) are resolved to their Google category equivalents automatically. The action defaults to secondary (non-primary) to avoid immediately steering Smart Bidding; pass `primaryForGoal: true` to opt in.

Get a conversion destination

LinkedIn-only today. Returns the full destination record for one conversion rule. The `adAccountId` query parameter is required because LinkedIn rules are scoped to a sponsored ad account.

accountId*string

Zernio SocialAccount id (Google Ads)

adAccountId?string

Google customer id. Required when the connection has multiple customers.

Match^\d+$
customerId?string
Deprecated

Alias of adAccountId

Match^\d+$
name*string
Length1 <= length <= 255
conversionActionIds*array<>
Items1 <= items <= 100