PUT/audiences/{id}

Update an audience

Replaces the supplied audience properties while leaving omitted properties unchanged. Send any combination of name, predicates, and role_predicates to update the audience identified by id.

2 parameters · 3 body fields
idstringrequired
The unique identifier of the audience to update.
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

Optional audience properties to update. Only fields included in the request are changed.

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.

4 status codes
200Returns the updated audience object, including its 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
404Returned when the audience is not found.

One documented failure

  • not_found

    Resource Not Found

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

One documented failure

  • validation_error

    Name must not be blank

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 404 is returned when the audience identified by the id path parameter is not found. A 422 is returned when the update request fails validation.