Skip to main content
POST
Create an audience

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.

Body

application/json
conditions
Conditions · object
required

Who the audience selects: a filter tree in the app's own format, as GET /v1/views/{view_id} shows an audience's conditions (read one, change it, send it back). A condition names a contact field (or a related account's) with an operator and a value; a group combines conditions with and/or; {} is every contact, as the app's All People audience is. It is checked before it is saved: a tree the app cannot read, a field the object doesn't have, or an empty group is a 422

name
string
required

Unique among your audiences

Required string length: 1 - 255

Response

201 - application/json

Successful Response

conditions
Conditions · object | null
required

Who it selects, in the app's own filter format

id
string
required
name
string
required
shared
boolean
required

Shared with the whole workspace (every audience the app makes is)

contacts
integer | null

How many contacts it selects now; null when it was not counted