Create custom audience
Creates a custom audience from a customer list, website visitors, a lookalike, or people who engaged with your content.
customer_list is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest.
website (pixel/tag visitors) and lookalike are supported on Meta, TikTok, Pinterest and Google.
meta_engagement is Meta-only, tiktok_engagement TikTok-only, pinterest_engagement Pinterest-only;
company_list, engagement and website_retargeting are LinkedIn-only. A type sent to a platform
that does not support it is a 422 FEATURE_NOT_AVAILABLE.
Per-platform rules for website:
- Meta:
pixelIdrequired,retentionDays1-180, optionalurlContainsor rawrule.eventis not accepted. - TikTok:
pixelIdrequired,retentionDaysone of 7, 14, 30, 60, 90, 180.eventis a TikTok pixel event (defaultPAGE BROWSE; alsoCLICK BUTTON,PIXEL SUBMIT FORM,CONTACT,DOWNLOAD,PIXEL ADD PAYMENT INFO,COMPLETE PAYMENT,INITIATE CHECKOUT,COMPLETE REGISTRATION,PRODUCT DETAIL PAGE BROWSE,PIXEL SEARCH,PIXEL ADD TO CART,PLACE AN ORDER,PIXEL ADD TO WISHLIST,PIXEL SUBSCRIBE), optionalurlContains. - Pinterest:
pixelIdis the Pinterest tag id,retentionDays1-540, optionalevent(e.g.checkout,addtocart). Pinterest matches URLs exactly, sourlContainsis a 400 there. - Google: no
pixelId(the account's Google tag is used),retentionDays1-540,urlContainsdefaults to/(all visitors). Built as a rule-based user list with prepopulation requested.
Per-platform rules for lookalike: Meta takes ratio (0.01-0.20); Pinterest takes ratio in whole
percents (0.01-0.10) and country US, CA or GB; TikTok and Google take size (narrow, balanced, broad)
instead of ratio. TikTok needs a seed with at least 1,000 matched people.
saved_targeting stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via
savedTargetingId on POST /v1/ads/create.
How the audience gets filled depends on the type:
customer_listis created empty. Add members withPOST /v1/ads/audiences/{audienceId}/users. On TikTok and Pinterest the audience is provisioned lazily on that first upload (until then its status ispending).company_listis filled AT CREATION from thecompaniesarray below, which is required. To change the list afterwards send the new full list toPOST /v1/ads/audiences/{audienceId}/companies(a replace, not a merge). The/usersendpoint rejects these audiences with a 422.website,website_retargeting,engagement,meta_engagement,tiktok_engagement,pinterest_engagementandlookalikefill themselves from the pixel, engagement source or seed audience you point them at. They take no member upload at all.
Create is not idempotent, never auto-retry.
Authorization
bearerAuth 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.
customer_list, website, lookalike or engagement audience (uploaded or derived from a source).
Response Body
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.adaudiences.createAdAudience({ body: { accountId: 'account_abc123', adAccountId: 'adaccount_abc123', name: 'Example', type: 'customer_list', },});console.log(data);{ "audience": {}, "message": "string"}List custom audiences
Lists the custom audiences in an ad account so you can reuse them for targeting. Supports Meta, Google, TikTok, Pinterest, LinkedIn, and X.
Get audience details
Shows a custom audience's details, including its latest data from the ad platform when available. Returns the local audience record and fresh data from Meta (if available).