Create custom audience
Create a custom audience. customer_list is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest;
website and lookalike are Meta-only. saved_targeting stores a reusable TargetingSpec (no member upload,
no adAccountId) that you reference later via savedTargetingId on POST /v1/ads/create. Upload-backed audiences
are created empty, add members via POST /v1/ads/audiences/{audienceId}/users. On TikTok and Pinterest the
audience is provisioned lazily on the first member upload (until then its status is pending). Create is not
idempotent, never auto-retry.
API key authentication - use your Zernio API key as a Bearer token
In: header
Platform ad account ID. Must start with act_ for Meta; bare platform id for others (Google customer id, X/TikTok/LinkedIn/Pinterest account id).
length <= 255"customer_list" | "website" | "lookalike"Required for website audiences
Required for website audiences
1 <= value <= 180Required for lookalike audiences
2-letter code, required for lookalike audiences
Required for lookalike audiences
0.01 <= value <= 0.2Pixel event rule for website audiences (optional)
Data source declaration for GDPR compliance (customer_list only)
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.adaudiences.createAdAudience({ body: { accountId: 'account_abc123', adAccountId: 'adaccount_abc123', name: 'Example', type: 'customer_list', },});console.log(data);{
"audience": {},
"message": "string"
}{
"error": "Unauthorized"
}