v4

latestOpenAPI 3.0.02026-08-04109113304.5 KB
Audiences

List Audiences

List Audiences for a Project

get/audiences

Query parameters

per_pageinteger

Optional pagination argument that specifies the maximum number of objects to return per request

pageinteger

Optional pagination argument that specifies the page to return. If you have 140 objects and you choose to return 100 objects per page you will be able to access the last 40 objects on page 2. The default value is 1.

project_idinteger required

The Project ID of the Project you would like to list all Audiences for

for_journeyboolean

Filter audiences by journey status

archivedboolean

Filter audiences by archived status

Response

Return all Audiences

archivedboolean

Whether the Audience has been archived

conditionsstring

A string defining the targeting rules for an Audience

createdstring date-time

The time the Audience was initially created

descriptionstring

A short description of the Audience

experiment_countinteger

Number of experiments by audience_id

for_journeyboolean

Whether the Audience has been part of journey or not

idinteger

The unique identifier for the Audience

is_classicboolean

Whether or not Audience is a classic Audience. If true, the Audience is only compatible with classic Experiments. Otherwise, the Audience may be used in Optimizely X Campaigns.

last_modifiedstring date-time

The last time the Audience was modified

namestring

The name of the Audience

project_idinteger required

The ID of the Project the Audience was created in

segmentationboolean

True if the Audience is available for segmentation on the results page (Audiences can only be used for segmentation in Optimizely Classic). Set to False if you intend to use this Audience only in Optimizely X. Note that a maximum of 10 Audiences can have segmentation set to True in any given Optimizely Classic project.

Example response

[
  {
    "conditions": "[\"and\", {\"type\": \"language\", \"value\": \"es\"}, {\"type\": \"location\", \"value\": \"US-CA-SANFRANCISCO\"}]",
    "description": "People that speak spanish and are in San Francisco",
    "experiment_count": 123,
    "id": 5000,
    "name": "Spanish speaking San Franciscans",
    "project_id": 1000
  }
]