POST/audiences

Create an audience

Creates an audience that groups contacts for targeting by Fin. Supply a name and optionally define membership with predicates and role-based filters with role_predicates. A 201 response returns the created audience and its generated identifier.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
Intercom-Versionstringoptional
The Intercom API version to use. Defaults to 2.17 when omitted.
Allowed:1.01.11.21.31.42.02.12.22.32.42.52.6Default:2.17

Audience details, including the required name and optional contact and role-based predicates.

namestringrequired
The name of the audience.
predicatesarray<Predicate>optional
The predicates that define which contacts belong to the audience.
role_predicatesarray<Predicate>optional
Role-based predicates that further filter audience membership by contact role.

3 status codes
201Returns the created audience object, including its generated identifier, name, predicates, role predicates, and creation and update timestamps.
typestringoptional
The type of object.
Allowed:audience
idstringoptional
The unique identifier representing the audience.
namestringoptional
The name of the audience.
predicatesarray<Predicate>optional
The predicates that define which contacts belong to the audience.
role_predicatesarray<Predicate>optional
Role-based predicates that further filter audience membership by contact role.
created_atintegeroptional
The time the audience was created as a Unix timestamp.
updated_atintegeroptional
The time the audience was last updated as a Unix timestamp.
401Returned when the request is unauthorized.

One documented failure

  • unauthorized

    Access Token Invalid

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
422Returned when the audience request fails validation.

One documented failure

  • validation_error

    Name is required

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects

Error handling

A 401 is returned when the request is unauthorized. A 422 is returned when the audience request fails validation. The name field is required; each predicate can specify an attribute, type, comparison, and value.