Skip to main content
PATCH
Rename an audience or change who it selects

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.

Path Parameters

audience_id
string
required

The audience's id, from GET /v1/campaigns/audiences

Body

application/json
conditions
Conditions · object | null

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. Left out: kept

name
string | null

A new name. Left out: kept

Required string length: 1 - 255

Response

200 - 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