{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"You can update the details of a single audience by making a PUT request to `https://api.intercom.io/audiences/{id}`.\n\nYou can also send this request with `PATCH`; it behaves the same as `PUT`.\n\nRequires the `read_write_audiences` OAuth scope.\n","properties":{"headers":{"type":"object","properties":{"Intercom-Version":{"$ref":"#/definitions/intercom_version","enum":["2.17"]}},"required":[],"additionalProperties":false},"path":{"type":"object","properties":{"id":{"type":"string","examples":["123"],"description":"The unique identifier for the audience."}},"required":["id"],"additionalProperties":false},"body":{"$ref":"#/definitions/update_audience_request","examples":[{"name":"Enterprise Accounts","predicates":[{"attribute":"custom_attributes.plan","type":"string","comparison":"eq","value":"enterprise"}]}]}},"required":["path"],"additionalProperties":false,"definitions":{"intercom_version":{"description":"Intercom API version.</br>If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.","type":"string","enum":["1.0","1.1","1.2","1.3","1.4","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17"],"examples":["2.17"]},"update_audience_request":{"title":"Update Audience Request","type":"object","description":"The request payload for updating an audience. All fields are optional — only provided fields will be updated.","properties":{"name":{"type":"string","description":"The name of the audience.","examples":["Enterprise Accounts"]},"predicates":{"type":"array","description":"The predicates that define which contacts belong to the audience.","items":{"$ref":"#/definitions/predicate"},"examples":[[{"attribute":"custom_attributes.plan","type":"string","comparison":"eq","value":"enterprise"}]]},"role_predicates":{"type":"array","description":"Role-based predicates that further filter audience membership by contact role.","items":{"$ref":"#/definitions/predicate"},"examples":[[{"attribute":"role","type":"role","comparison":"in","value":["user_role","contact_role","visitor_role"]}]]}}},"predicate":{"title":"Predicate","type":"object","description":"A condition used to filter contacts in an audience. An attribute predicate compares one attribute. A logical predicate has a `type` of `and`, `or` or `not` and groups other predicates instead.","properties":{"attribute":{"type":"string","description":"The attribute to filter on. Required on an attribute predicate.","examples":["company.name"]},"type":{"type":"string","description":"The type of the attribute, or `and`, `or` or `not` on a logical predicate.","examples":["string"]},"comparison":{"type":"string","description":"The comparison operator. Required on an attribute predicate.","examples":["contains"]},"value":{"description":"The value to compare against. The accepted value depends on the attribute and the comparison, and can be a string, a number, a boolean, an array or `null`.","examples":["Acme"]},"predicates":{"type":"array","description":"The predicates grouped by a logical predicate. Only used when `type` is `and`, `or` or `not`.","items":{"$ref":"#/definitions/predicate"}}}}}},"name":"Update an audience","id":"intercom.updateaudience","example":{"path":{"id":"123"}},"maxRequests":1,"summary":false}}