POST
/audiencesCreate 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.
Intercom-Versionstringoptional
The Intercom API version to use. Defaults to 2.17 when omitted.
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.
201Returns the created audience object, including its generated identifier, name, predicates, role predicates, and creation and update timestamps.
typestringoptional
The type of object.
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
unauthorizedAccess 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_errorName 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.