POST /{environment}/targeting/audiences/requests Description Request an audience for a promotion. Parameters Type Name Description Schema Path environment required The environment for which a request is made. string Body body required AudienceTargetingRequest Responses HTTP Code Description Schema 200 An AudienceTargetingResponse object. AudienceTargetingResponse 400 The AudienceTargetingRequest was invalid. ErrorBody 401 You are not authorized to make an AudienceTargetingRequest. ErrorBody Consumes application/json Produces application/json Tags targeting Example HTTP request Request body { "audience" : { "audience_name" : "Don't miss this!", "audience_size" : 100, "integration_type" : "push_notification_app", "limit" : 3, "promotion" : [ { "id" : "item_1\"", "item_type" : "article" }, { "id" : "item_2\"", "item_type" : "article" } ] } } Example HTTP response Response 200 { "audience" : { "audience_id" : "dhoghesjwgotuy39", "audience_name" : "Don't miss this!", "audience_size" : 100, "integration_type" : "push_notification_app", "limit" : 3, "users" : [ { "id" : "user_1", "user_type" : "login" }, { "id" : "user_2", "user_type" : "login" }, { "id" : "user_3", "user_type" : "login" } ] } } AudienceTargetingRequest Request an audience for a promotion. Name Description Schema audience optional Audience object in request. audience audience Name Description Schema audience_id optional A unique identifier for the audience request which is to be supplied with each logged event. string audience_name required Name of the audience, to be passed in tracking events later. string audience_size required Total size of the audience requested. Use limit for pagination. integer integration_type required Name of the type of integration. string limit optional Number of Users to be returned integer promotion required Promotion AudienceTargetingResponse Response containing an audience for a promotion. Name Description Schema audience optional Audience object in response. audience audience Name Description Schema audience_id required A unique identifier for the audience request which is to be supplied with each logged event. string audience_name required Name of the audience, to be passed in tracking events later. string audience_size required Total size of the audience requested. Use limit for pagination. integer integration_type required Name of the type of integration. string limit required Number of Users to be returned integer users required List containing User-objects. < User > array Promotion A collection of items we wish to promote to an audience. Type : < Item > array Item An Item object. Name Description Schema id required Unique identifier of the item. string item_type optional Optional. Item-type is only required when multiple item-types are used. string User A User object. Name Description Schema id required Unique identifier of the user. string user_type required Type of user identifier. Currently one of user_id or device_id. string ErrorBody Error message. Name Description Schema detail optional Detailed description of the error. string status optional Status-code for the error. integer title optional Name of the error. string type optional Type of the exception thrown. string