Skip to main content
POST
Create an audience

Authorizations

Authorization
string
header
required

A project key (Developers → API keys). Keep it on your server, not in an app.

Headers

traceparent
string

W3C Trace Context; joins your trace to ours

Idempotency-Key
string
required

A retry with the same key and body returns the first response

Required string length: 1 - 255

Body

application/json
name
string
required

The audience's name, 1 to 80 characters

Required string length: 1 - 80
kind
enum<string>
required

A list: people you add by hand or over the API

Available options:
list
key
string

Lowercase words joined by dashes, starting with a letter, up to 64 characters. Defaults to a slug of the name. Must not be taken by another audience

Pattern: ^[a-z][a-z0-9-]{0,63}$
description
string

What the audience is for, up to 280 characters

Maximum string length: 280

Response

Create an audience

id
string
required

An audience ID, starting with aud_.

Pattern: ^aud_[0-7][0-9a-hjkmnp-tv-z]{25}$
key
string
required

The audience's key: lowercase words joined by dashes, starting with a letter, up to 64 characters. A rule or view can name the audience by it

Pattern: ^[a-z][a-z0-9-]{0,63}$
name
string
required

The audience's name

description
string | null
required

What the audience is for. Null when none was given

kind
enum<string>
required

list: people added by hand or over the API. condition: kept up to date by its conditions

Available options:
list,
condition
conditions
object[]
required

Empty for a list audience

summary
string
required

The conditions in words: Active on 2 or more days of the last 21, seen in the last 7 days

status
enum<string>
required

ok: nothing wrong. broken: a condition names something that is gone, so it can match nobody until it is fixed. not_synced: a chat condition's community has no state yet, so nobody can be in it yet (chat conditions are not available yet)

Available options:
ok,
broken,
not_synced
problems
object[]
required

What is wrong with a condition, if anything. Empty when status is ok

users
integer
required

Members now (a condition audience: as of its last refresh)

Required range: x >= 0
refreshed_at
string<date-time> | null
required

When a condition audience's members were last worked out; rules see it as it stood then. Null for a list, and before the first run

used_by
object[]
required

The rules that read it

created_at
string<date-time>
required

When it was created: UTC, ISO 8601

unknown
integer | null

People excluded by uncertain holding evidence at the last full refresh. Null before the first refresh of a holding audience

Required range: x >= 0