Audience API

Overview

The Audience API enables uploading customer segments (audiences) to advertising and marketing platforms through EdgeTag. Instead of connecting each platform individually, a single API call distributes audience data to all configured providers simultaneously.

This is typically used for:

Custom Audiences — Uploading user lists to ad platforms (e.g., Facebook Custom Audiences, TikTok Audiences) for targeted advertising

Primary Audiences — Syncing your primary customer database to providers for lookalike modeling or suppression

Segment Sync — Keeping marketing platform segments in sync with your customer data

circle-info

Key Benefit: One API call pushes audience data to Facebook, TikTok, Klaviyo,and any other configured provider. Each provider handles its own data formatting,hashing, and API communication internally.

Endpoint Details

Property

Value

Method

POST

Path

/audience

Content Type

multipart/form-data

Authentication

Handled via EdgeTag deployment (environment variables)

Request Payload

The request body must be sent as multipart/form-data with the following fields :

Field

Type

Required

Description

name

string

Required

The name of the audience/segment. This is the label used in the destination platform (e.g., "High-Value Customers Q1").

type

string

Optional

Audience type. One of:

"custom" (default) — A named segment of users

"primary" — Your primary customer list

batch

JSON

string

Required

Batch metadata for handling large audiences (see Batch Object below).

users

JSON

string

Required

Array of user objects to include in the audience (see User Object below). Must contain at least one user.

Batch Object

The batch field is a JSON string representing metadata for splitting large audiences across multiple requests:

Field

Type

Description

sessionId

number

Unique identifier tying all batches of the same upload together.

sequence

number

The index of this batch in the series (starting from 0 or 1).

totalBatches

number

Total number of batches in this upload session.

totalUsers

number

Total number of users across all batches.

pullDate

string

Optional Date the data was pulled, in YYYY-MM-DD format.

User Object

Each element in the user array represents a customer with the following fields:

Field

Type

Description

edgeTagId

string

The EdgeTag identifier for this user (first-party ID).

email

string

User's email address. Used as a primary match key by most providers.

phone

string

User's phone number. Used as a secondary match key.

firstName

string

User's first name.

lastName

string

User's last name.

country

string

User's country.

postalCode

string

User's postal/zip code.

purchase

object

Optional Purchase data for value-based audiences:

  • currency (string) — Currency code (e.g., "USD")

  • profit (number) — Profit from this customer

  • total7Days (number) — Total spend in last 7 days

Query Parameters

Parameter

Type

Default

Description

disablePrefix

boolean

false

When true , prevents providers from adding the default blotout_ prefix to the segment name. Useful when you want the exact name you specified.

sync

boolean

false

When true , the API waits for all providers to finish before responding. When false (default), work is dispatched in the background and the API responds immediately.

circle-exclamation

Last updated

Was this helpful?