Audiences API
Audiences represent groups of consumers that can be targeted for specific experiences. Audiences can be static lists, dynamic rule-based segments, or synced from external sources like Klaviyo.Create Audience
Create a new audience.POST /api/v1/audiences
Authentication
- Secret key required
Request Body
Response
Example
List Audiences
List all audiences in your organization.GET /api/v1/audiences
Authentication
- Secret key required
Query Parameters
| Parameter | Type | Description |
|---|---|---|
include | string | Relations to include (rules, imports, primarySyncSource) |
Example
Get Audience
Get a single audience by ID.GET /api/v1/audiences/:audienceId
Authentication
- Secret key required
Path Parameters
| Parameter | Type | Description |
|---|---|---|
audienceId | string | The audience ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
include | string | Relations to include (default: rules,imports) |
Example
Error Responses
| Status | Error | Description |
|---|---|---|
| 404 | Audience not found | Audience ID does not exist |
Update Audience
Update an existing audience.PUT /api/v1/audiences/:audienceId
Authentication
- Secret key required
Path Parameters
| Parameter | Type | Description |
|---|---|---|
audienceId | string | The audience ID |
Request Body
Example
Delete Audience
Delete (archive) an audience.DELETE /api/v1/audiences/:audienceId
Authentication
- Secret key required
Path Parameters
| Parameter | Type | Description |
|---|---|---|
audienceId | string | The audience ID |
Example
Get Audience Members
Get paginated members (consumers) of an audience.GET /api/v1/audiences/:audienceId/members
Authentication
- Secret key required
Path Parameters
| Parameter | Type | Description |
|---|---|---|
audienceId | string | The audience ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
first | number | 20 | Number of items per page (max 100) |
after | string | - | Cursor for forward pagination |
search | string | - | Search by email, phone, or name |
include | string | - | Relations to include |
Response
Example
Get Audience Status
Get the materialization status of an audience.GET /api/v1/audiences/:audienceId/status
Authentication
- Secret key required
Response
Example
Get Audience Count
Get the current member count for an audience.GET /api/v1/audiences/:audienceId/count
Authentication
- Secret key required
Response
Example
Create Audience Import
Create a new audience import to upload members via CSV.POST /api/v1/audiences/:audienceId/import
Authentication
- Secret key required
Response
Example
Re-sync Audience
Trigger a re-sync for a synced list audience from its external source.POST /api/v1/audiences/:audienceId/sync
Authentication
- Secret key required
Response
Example
Error Responses
| Status | Error | Description |
|---|---|---|
| 400 | Audience is not a synced list | Only synced lists can be synced |
| 400 | Audience has no sync source | No external source configured |
| 409 | Sync already in progress | Wait for current sync to finish |
Audience Groups
Get Audiences in Group
Get all audiences in a loyalty tier or segment group.GET /api/v1/audiences/groups/:groupId
Example
Get Group Members
Get paginated members across all audiences in a group.GET /api/v1/audiences/groups/:groupId/members
Query Parameters
| Parameter | Type | Description |
|---|---|---|
first | number | Page size |
after | string | Pagination cursor |
search | string | Search term |
audienceId | string | Filter to specific audience in group |
Delete Group
Delete all audiences in a group.DELETE /api/v1/audiences/groups/:groupId
Loyalty Tiers
Create segmented value audiences for loyalty programs.Create Loyalty Tiers
POST /api/v1/audiences/loyalty-tiers
Request Body
Example
Update Loyalty Tiers
PUT /api/v1/audiences/loyalty-tiers/:groupId
Updates an existing tier group. New tiers are created, existing tiers are updated, and removed tiers are deleted.
Klaviyo Import
Bulk import Klaviyo lists as synced audiences.POST /api/v1/audiences/import/klaviyo
Request Body
Response
Example
Audience Rules
Add Rules to Audience
POST /api/v1/audiences/:audienceId/rules
Request Body
Example
Available Rule Fields
| Field | Type | Description |
|---|---|---|
email | string | Consumer email address |
phone | string | Consumer phone number |
fullName | string | Consumer full name |
totalOrders | number | Lifetime order count |
totalOrderValue | currency | Lifetime order value |
lastOrderAt | datetime | Most recent order date |
createdAt | datetime | Consumer creation date |
externalId | string | External system ID |
metadata.* | any | Custom metadata fields |