Skip to content

Update an audience

Request

You can update the details of a single audience by making a PUT request to https://api.intercom.io/audiences/{id}.

You can also send this request with PATCH; it behaves the same as PUT.

Requires the read_write_audiences OAuth scope.

Security
bearerAuth
Path
idstringrequired

The unique identifier for the audience.

Example:123
Headers
Intercom-Versionstring(intercom_version)

Intercom API version.
If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.

Enum:"1.0""1.1""1.2""1.3""1.4""2.0""2.1""2.2""2.3""2.4"
Example:2.17
Bodyapplication/json
namestring

The name of the audience.

Example:"Enterprise Accounts"
predicatesArray of objects(Predicate)

The predicates that define which contacts belong to the audience.

Example:
[ { "attribute": "custom_attributes.plan", "type": "string", "comparison": "eq", "value": "enterprise" } ]
role_predicatesArray of objects(Predicate)

Role-based predicates that further filter audience membership by contact role.

Example:
[ { "attribute": "role", "type": "role", "comparison": "in", "value": [ … ] } ]
curl -i -X PUT \
  https://api.intercom.io/audiences/123 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Intercom-Version: 2.17' \
  -d '{
    "name": "Enterprise Accounts",
    "predicates": [
      {
        "attribute": "custom_attributes.plan",
        "type": "string",
        "comparison": "eq",
        "value": "enterprise"
      }
    ]
  }'

Responses

Audience updated

Bodyapplication/json
typestringread-only

The type of object.

Value:"audience"
Example:"audience"
idstringread-only

The unique identifier representing the audience.

Example:"123"
namestring

The name of the audience. Returned HTML-escaped, for example & as &amp;.

Example:"VIP Customers"
predicatesArray of objects(Predicate)

The predicates that define which contacts belong to the audience.

Example:
[ { "attribute": "company.name", "type": "string", "comparison": "contains", "value": "Acme" } ]
role_predicatesArray of objects(Predicate)

Role-based predicates that further filter audience membership by contact role.

Example:
[ { "attribute": "role", "type": "role", "comparison": "in", "value": [ … ] } ]
created_atintegerread-only

The time the audience was created as a Unix timestamp.

Example:1717200000
updated_atintegerread-only

The time the audience was last updated as a Unix timestamp.

Example:1717200000
Response
{ "type": "audience", "id": "123", "name": "Enterprise Accounts", "predicates": [ { … } ], "role_predicates": [ { … } ], "created_at": 1717200000, "updated_at": 1717200100 }