{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"You can create a new audience by making a POST request to `https://api.intercom.io/audiences`.\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},"body":{"$ref":"#/definitions/create_audience_request","examples":[{"name":"VIP Customers","predicates":[{"attribute":"company.name","type":"string","comparison":"contains","value":"Acme"}],"role_predicates":[{"attribute":"role","type":"role","comparison":"in","value":["user_role","contact_role","visitor_role"]}]}]}},"required":["body"],"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"]},"create_audience_request":{"title":"Create Audience Request","type":"object","description":"The request payload for creating an audience.","required":["name"],"properties":{"name":{"type":"string","description":"The name of the audience.","examples":["VIP Customers"]},"predicates":{"type":"array","description":"The predicates that define which contacts belong to the audience.","items":{"$ref":"#/definitions/predicate"},"examples":[[{"attribute":"company.name","type":"string","comparison":"contains","value":"Acme"}]]},"role_predicates":{"type":"array","description":"Role-based predicates that further filter audience membership by contact role. Defaults to all three contact roles when omitted.","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":"Create an audience","id":"intercom.createaudience","example":{"body":{"name":"VIP Customers"}},"maxRequests":1,"summary":false}}