Skip to main content
POST
Create custom audience

Request contract

  • Method and path: POST /apis/v1/ads/audiences
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/ads/audiences
  • connectionId: query; required
  • Runtime facts: fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09
Complete OpenAPI definition Effective request and pricing declaration (including authentication and referenced schemas):

Cost and request rules

A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

connectionId
string
required

The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.

Pattern: ^adc_[0-9A-Za-z]+$

Body

application/json

customer_list, website, lookalike or engagement audience (uploaded or derived from a source).

adAccountId
string
required

Platform ad account ID. Must start with act_ for Meta; bare platform id for others (Google customer id, X/TikTok/LinkedIn/Pinterest account id).

name
string
required
Maximum string length: 255
type
enum<string>
required
Available options:
customer_list,
company_list,
engagement,
meta_engagement,
tiktok_engagement,
pinterest_engagement,
website,
website_retargeting,
lookalike
adIds
string[]

pinterest_engagement: people who engaged with these ads. Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

Pattern: ^\d+$
campaignIds
string[]

pinterest_engagement: people who engaged with these campaigns' ads. Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

Pattern: ^\d+$
companies
object[]

Required for company_list audiences (LinkedIn only). Plain-text company rows for account targeting; each row needs at least one identifier. Not hashed: LinkedIn matches these against its own company graph.

Required array length: 1 - 300000 elements
country
string

2-letter code, required for lookalike audiences

customerFileSource
string

Data source declaration for GDPR compliance (customer_list only)

description
string
engagementDomains
string[]

pinterest_engagement: people who engaged with Pins from these domains. The domain must be claimed on the Pinterest account or Pinterest rejects it.

engagementSource
enum<string>

Required for meta_engagement audiences (Meta only): what people engaged with. page = a Facebook Page, instagram = an IG professional account, video = a video.

Available options:
page,
instagram,
video
engagementSources
string[]

Required for engagement audiences. Campaign URNs for the ad source types, organization URNs for pages and events. LinkedIn creates one rule per source, all sharing the same trigger and lookbackDays.

Required array length: 1 - 50 elements
engagementType
enum<string>

pinterest_engagement: limit to one engagement action.

Available options:
click,
save,
closeup,
comment,
like
engagerType
enum<integer>

pinterest_engagement: Pinterest's engager_type, passed through when set.

Available options:
1,
2
event
string

The event to match. Its meaning depends on the type: meta_engagement: the engagement event. Defaults per source (page → page_engaged, instagram → ig_business_profile_all, video → video_watched). Ignored when rule is provided.

Maximum string length: 100
identityAuthorizedBcId
string

tiktok_engagement: required when identityType is BC_AUTH_TT.

identityId
string

tiktok_engagement: the TikTok identity that owns the videos or business account. Required for organic_video, live_video and business_account.

identityType
enum<string>

tiktok_engagement: type of identityId.

Available options:
TT_USER,
BC_AUTH_TT
lookbackDays
enum<integer>

Required for engagement audiences. Rolling window.

Available options:
30,
60,
90,
180,
365
matchRules
object[]

Required for website_retargeting audiences (LinkedIn only). Each rule is a URL pattern; a member who visits any matching page enters the segment.

Required array length: 1 - 50 elements
pinIds
string[]

pinterest_engagement: people who engaged with these Pins. At least one of engagementDomains, campaignIds, adIds or pinIds is required.

Pattern: ^\d+$
pixelId
string

website: the Meta pixel, TikTok pixel, Pinterest tag or Reddit pixel id. Required on those four, rejected on Google.

ratio
number

lookalike on Meta (0.01-0.20) and Pinterest (0.01-0.10, whole percents). Rejected on TikTok and Google.

Required range: 0.01 <= x <= 0.2
retentionDays
integer

Required for website (Meta max 180, TikTok 7/14/30/60/90/180, Reddit max 90, Pinterest and Google max 540), meta_engagement (max 365) and tiktok_engagement (7/14/30/60/90/180; organic and live video and most business-account events only…

Required range: 1 <= x <= 540
rule
object

Meta only (a 400 elsewhere). Optional raw Meta rule, replacing the one we build. Omit it for all visitors of pixelId, or use urlContains for the common page-match case.

size
enum<string>

lookalike on TikTok and Google: audience breadth. Rejected on Meta and Pinterest.

Available options:
narrow,
balanced,
broad
source
enum<string>

Required for tiktok_engagement: what people engaged with.

Available options:
ads,
organic_video,
live_video,
business_account
sourceAudienceId
string

Required for lookalike audiences Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

sourceId
string

Required for meta_engagement: the Page / IG account / video id.

sourceIds
string[]

tiktok_engagement: ad group / campaign ids for ads, video ids for organic_video and live_video (max 10). Required except for business_account.

Required array length: 1 - 50 elements
sourceType
enum<string>

Required for engagement audiences (LinkedIn only): what members engaged with: a video/leadgen/single-image ad campaign, a Company Page or an Event page.

Available options:
VIDEO_ADS,
LEAD_GEN_FORMS,
ORGANIZATION_PAGES,
EVENT_PAGES,
SINGLE_IMAGE_ADS
trigger
string

Required for engagement audiences. The action, validated by LinkedIn against sourceType.

urlContains
string

website on Meta, TikTok and Google. Narrows the audience from all visitors to visitors of URLs containing this substring. Ignored when rule is supplied. A 400 on Pinterest, which only matches exact URLs.

connectionId
string

The ads connection (adc_...), when not sent as the connectionId query parameter.

Pattern: ^adc_[0-9A-Za-z]+$
spec
object

The targeting spec to store.

Response

Audience created

audience
object
message
string