audiences

Create or replace an audience

Create an audience by slug, or replace its definition. A fixed audience lists identity ids; a rule audience matches identities by their traits.

put/api/v1/audiences/{slug}

Request

  • Base URL: https://api.past.dev
  • URL: https://api.past.dev/api/v1/audiences/{slug}
  • Auth: HTTP bearer

Path parameters

slugstring required

The slug: 2 to 40 lowercase letters, digits and dashes, with a letter or digit at each end.

Request body

kind'fixed' | 'rule' required
namestring

Defaults to the slug on create.

identitiesstring[]

Required for a fixed audience. An empty list reaches nobody. An id with no record is created.

Response

The audience was replaced.

slugstring required
namestring required
kind'fixed' | 'rule' | 'default' required
memberCountinteger required

The identities the audience reaches now.

memoryCountinteger required

The memories scoped to this audience.

reachesNobodyboolean required

True for a rule audience that matches no identity.

recomputedAtstring date-time nullable required
createdAtstring date-time required
identitiesstring[] nullable required

The ids of a fixed audience, sorted. Null for the other kinds.

Changes

No recorded changes to this operation across all 1 revision of this API.