{"swagger":"2.0","host":false,"tags":[{"name":"Audience","description":"Audience"},{"name":"AudienceSystem","description":"Audience"}],"info":{"title":"Audiences","version":"1.0","description":""},"paths":{"/audiences/v1/audience/importer_fields":{"get":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/importer_fields","parameters":[],"summary":"Returns list of mappable fields for the data importer","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceGetImporterFieldsResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Invalid entity type","1002":"The course doesn't exist","1003":"Do not have the needed permissions"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience":{"post":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience","parameters":[{"in":"body","name":"body","description":"Raw Body","required":false,"schema":{"$ref":"#/definitions/AudiencesAudienceCreateAudienceSchema"}}],"summary":"Create audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceCreateAudienceResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Duplicate entry","1002":"Parameter invalid","1003":"Audience with more than 50 sets are not supported","1004":"Sets with more than 10 conditions are not supported","1005":"The only supported operator are the logic AND and OR","1006":"Rule not supported","1007":"Rule requires parameters to be set","1008":"Duplicate group name","1009":"Additional field not found with delivered id","1010":"Invalid payload reference"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}},"get":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience","parameters":[{"in":"query","enum":["name","description","slug"],"name":"sort_attr","type":"string","required":false,"description":"Sort by this field, default value - name."},{"in":"query","enum":["asc","desc"],"name":"sort_dir","type":"string","required":false,"description":"Sorting Direction. Default - asc"},{"in":"query","name":"page","type":"integer","required":false,"description":"Page to return, default 1"},{"in":"query","name":"page_size","type":"integer","required":false,"description":"Maximum number of results per page. The default size is defined in Advanced Settings page (Set the amount of elements you want to display in each page)"},{"in":"query","name":"search_text","type":"string","required":false,"description":"Search text (searches on name and description)"}],"summary":"Get all audiences","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceListAudienceResponse"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{uuid}":{"delete":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}","parameters":[{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the resource to be deleted"}],"summary":"Delete an audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceDeleteAudienceResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Required parameter \"uuid\" missing"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}},"put":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}","parameters":[{"in":"body","name":"body","description":"Raw Body","required":false,"schema":{"$ref":"#/definitions/AudiencesAudienceUpdateAudienceSchema"}},{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the resource to be updated"}],"summary":"Update an audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceUpdateAudienceResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Required parameter \"id\" missing","1002":"Invalid audience name","1003":"Audience with more than 50 sets are not supported","1004":"Sets with more than 10 conditions are not supported","1005":"The only supported operator are the logic AND and OR","1006":"Rule not supported","1007":"Rule requires parameters to be set","1008":"Duplicate group name","1009":"Additional field not found with delivered id","1010":"Invalid payload reference","1011":"Payload must be a valid object","1012":"Payload must have 'sets' and 'operator' fields","1013":"'operator' field in audience definition must be a valid string - AND | OR","1014":"'sets' field in audience definition field must be a valid array","1015":"The ruleset must be a valid object","1016":"Set missing mandatory fields 'rules_operator' or 'rules' fields","1017":"'rules_operator' field in ruleset definition must be a valid string - AND | OR","1018":"'rules' field in ruleset definition must be a valid array","1021":"'payload' field in rule definition must be a valid array","1022":"'type' field in rule definition must be a valid string - AND | OR","1023":"'field' field in rule definition must be a valid string","1024":"'predicate' field in rule definition must be a valid array","1025":"The field used in rule definition does not exist","1026":"'operator' field in predicate definition must be a valid string","1027":"'text' field in predicate definition must be a valid string, not empty","1028":"'selected' field in predicate definition must be a valid array, not empty","1029":"'text' field in predicate definition must be a valid array, not empty","1030":"'selected' field in predicate definition must be a valid array, id not valid","1031":"with 'contain' operator 'text' field array in predicate definition must contain only one string","1032":"'type' field in rule definition must be a valid array","1033":"'operator' field in rule definition must be a valid string","1041":"Invalid parameter: active","1042":"HttpForbiddenException"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}},"get":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}","parameters":[{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the resource to be retrieved"}],"summary":"Get an audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceViewAudienceResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Required parameter \"uuid\" missing"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{uuid}/users":{"put":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/users","parameters":[{"in":"body","name":"body","description":"Raw Body","required":false,"schema":{"$ref":"#/definitions/AudiencesAudienceAddUserSchema"}},{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the audience resource"}],"summary":"Add user to audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceAddUserResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Cannot add users to non manual audience","1002":"Cannot process multiple inputs"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}},"delete":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/users","parameters":[{"in":"body","name":"body","description":"Raw Body","required":false,"schema":{"$ref":"#/definitions/AudiencesAudienceDeleteUserSchema"}},{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the audience resource"}],"summary":"Delete users from audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceDeleteUserResponse"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}},"get":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/users","parameters":[{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the audience resource"},{"in":"query","enum":["idst","userid","firstname","lastname","email"],"name":"sort_attr","type":"string","required":false,"description":"Sort by this field, default value - idst."},{"in":"query","enum":["asc","desc"],"name":"sort_dir","type":"string","required":false,"description":"Sorting Direction. Default - asc"},{"in":"query","name":"page","type":"integer","required":false,"description":"Page to return, default 1"},{"in":"query","name":"page_size","type":"integer","required":false,"description":"Maximum number of results per page. The default size is defined in Advanced Settings page (Set the amount of elements you want to display in each page)"},{"in":"query","name":"search_text","type":"string","required":false,"description":"Search text (searches on first name, last name, email and username)"},{"in":"query","name":"relation_type","type":"string","required":false,"description":"Relation type to filter. Accepted values are: &quot;automatic&quot; or &quot;manual&quot;"}],"summary":"Get users from audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceGetUsersResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Invalid relation type requested, valid ones are automatic or manual"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{uuid}/assign_users":{"put":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/assign_users","parameters":[{"in":"body","name":"body","description":"Raw Body","required":false,"schema":{"$ref":"#/definitions/AudiencesAudiencePutAssignUsersSchema"}},{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the audience resource"}],"summary":"Assign manual users to audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudiencePutAssignUsersResponse"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{uuid}/assign_users/batch":{"put":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/assign_users/batch","parameters":[{"in":"body","name":"body","description":"Raw Body","required":false,"schema":{"$ref":"#/definitions/AudiencesAudiencePutBatchAssignUsersSchema"}},{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the audience resource"}],"summary":"Batch assign manual users to audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudiencePutBatchAssignUsersResponse"}},"400":{"description":"General Error","error_codes":{"1002":"Invalid or missing parameter"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{uuid}/export-users":{"get":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/export-users","parameters":[{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the audience resource"},{"in":"query","name":"userid","type":"boolean","required":false,"description":"If user ID must be included in export - Default: false"},{"in":"query","name":"firstname","type":"boolean","required":false,"description":"If user first name must be included in export - Default: false"},{"in":"query","name":"lastname","type":"boolean","required":false,"description":"If user last name must be included in export - Default: false"},{"in":"query","name":"email","type":"boolean","required":false,"description":"If user email must be included in export - Default: false"},{"in":"query","name":"relation_type","type":"boolean","required":false,"description":"If user relation_type must be included in export - Default: false"},{"in":"query","name":"include_header","type":"boolean","required":false,"description":"Include or NOT naming of columns in csv file - Default: false"},{"in":"query","name":"delimiter","type":"string","required":false,"description":"Delimiter for exported csv file - Default: &quot;,&quot;"}],"summary":"Export users belonging to audience","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceExportUsersResponse"}},"400":{"description":"General Error","error_codes":{"1001":"You have to choose at least one column"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{uuid}/audience_to_group":{"get":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/audience_to_group","parameters":[{"in":"path","name":"uuid","type":"string","required":true,"description":"The uuid of the audience resource from which retrieve the group id"}],"summary":"Get a group id from an audience id","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceGetAudienceToGroupIdResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Required parameter \"uuid\" missing"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{id}/group_to_audience":{"get":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{id}/group_to_audience","parameters":[{"in":"path","name":"id","type":"integer","required":true,"description":"The id of the group resource from which retrieve the audience id"}],"summary":"Get an audience id from group id","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceGetGroupToAudienceIdResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Required parameter \"id\" missing"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}},"/audiences/v1/audience/{uuid}/active-status":{"patch":{"tags":["Audience"],"operationId":"Audience./audiences/v1/audience/{uuid}/active-status","parameters":[{"in":"body","name":"body","description":"Raw Body","required":false,"schema":{"$ref":"#/definitions/AudiencesAudienceChangeActiveStatusAudienceSchema"}},{"in":"path","name":"uuid","type":"string","required":true,"description":"The id of the resource to be updated"}],"summary":"Changes the audience active status","last_modified_date":"","description":"","responses":{"200":{"description":"Operation Successful","schema":{"$ref":"#/definitions/AudiencesAudienceChangeActiveStatusAudienceResponse"}},"400":{"description":"General Error","error_codes":{"1001":"Required parameter \"uuid\" missing","1002":"Missing required parameter: {X}","1003":"Invalid parameter {p}"}},"500":{"description":"Internal server error"},"401":{"description":"Your request was made with invalid credentials."},"403":{"description":"Permission denied"}}}}},"securityDefinitions":{"docebo_oauth":{"type":"oauth2","flow":"implicit","tokenUrl":"/oauth2/token","authorizationUrl":"/oauth2/authorize","scopes":{"api":"Common scope, used by the whole API"}}},"security":[{"docebo_oauth":["api"]}],"definitions":{"localizable":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the localizable object. This controls whether or not the value or values property below will be populated.","collectionFormat":"brackets","enum":["single_value","multi_lang"]},"value":{"type":"string","description":"The scalar value of this localizable object, used for all languages. Only populated when \"type=single_value\"."},"values":{"type":"object","description":"A lang_code=>value structured object with the different localized names of the item, in each language, available within the platform."}}},"AudiencesAudienceGetImporterFieldsResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceGetImporterFieldsData","description":"Response success or failure to find fields"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceGetImporterFieldsData":{"properties":{"fields":{"type":"array","description":"Associative array containing column names and translations","items":{"$ref":"#/definitions/AudiencesAudienceGetImporterFieldsFields"}}}},"AudiencesAudienceGetImporterFieldsFields":{},"AudiencesAudienceCreateAudienceSchema":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"The description of the audience"},"type":{"description":"The type of the audience","enum":["manual","automatic"],"type":"string"},"exclude_deactivated_users":{"type":"boolean","description":"If true deactivated user won&#039;t be included in the audience (automatic only)"},"ruleset":{"$ref":"#/definitions/AudiencesAudienceCreateAudienceRuleset","description":"The ruleset definition (required for automatic audiences)"}}},"AudiencesAudienceCreateAudienceRuleset":{"required":["operator","sets"],"properties":{"operator":{"description":"The operator for the ruleset","enum":["AND","OR"],"type":"string"},"sets":{"type":"array","description":"The sets of rules","items":{"$ref":"#/definitions/AudiencesAudienceCreateAudienceSets"}}}},"AudiencesAudienceCreateAudienceSets":{"required":["rules_operator","rules"],"properties":{"rules_operator":{"description":"The operator for the rules","enum":["AND","OR"],"type":"string"},"rules":{"type":"array","description":"The rules of the set","items":{"$ref":"#/definitions/AudiencesAudienceCreateAudienceRules"}}}},"AudiencesAudienceCreateAudienceRules":{"required":["type","payload"],"properties":{"type":{"type":"string","description":"The type of rule"},"payload":{"$ref":"#/definitions/AudiencesAudienceCreateAudiencePayload","description":"The payload of the rule"}}},"AudiencesAudienceCreateAudiencePayload":{},"AudiencesAudienceCreateAudienceResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceCreateAudienceData","description":"Audience"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceCreateAudienceData":{"required":["uuid"],"properties":{"uuid":{"type":"string","description":"The status of the operation"}}},"AudiencesAudienceDeleteAudienceResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceDeleteAudienceData","description":"Audience"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceDeleteAudienceData":{"required":["success"],"properties":{"success":{"type":"string","description":"The status of the operation"}}},"AudiencesAudienceUpdateAudienceSchema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"The description of the audience"},"exclude_deactivated_users":{"type":"boolean","description":"If true deactivated user won&#039;t be included in the audience (automatic only)"},"ruleset":{"$ref":"#/definitions/AudiencesAudienceUpdateAudienceRuleset","description":"The ruleset definition (required for automatic audiences)"},"active":{"type":"boolean","description":"The active status of the group. Only for SA or PU if he is the owner of the group."}}},"AudiencesAudienceUpdateAudienceRuleset":{"required":["operator","sets"],"properties":{"operator":{"description":"The operator for the ruleset","enum":["AND","OR"],"type":"string"},"sets":{"type":"array","description":"The sets of rules","items":{"$ref":"#/definitions/AudiencesAudienceUpdateAudienceSets"}}}},"AudiencesAudienceUpdateAudienceSets":{"properties":{"id":{"type":"string","description":"The identifier of the set"},"rules_operator":{"description":"The operator for the rules","enum":["AND","OR"],"type":"string"},"rules":{"type":"array","description":"The rules of the set","items":{"$ref":"#/definitions/AudiencesAudienceUpdateAudienceRules"}}},"required":["rules_operator","rules"]},"AudiencesAudienceUpdateAudienceRules":{"properties":{"id":{"type":"string","description":"The identifier of the rule"},"type":{"type":"string","description":"The type of rule"},"payload":{"$ref":"#/definitions/AudiencesAudienceUpdateAudiencePayload","description":"The payload of the rule"}},"required":["type","payload"]},"AudiencesAudienceUpdateAudiencePayload":{},"AudiencesAudienceUpdateAudienceResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceUpdateAudienceData","description":"Audience"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceUpdateAudienceData":{"required":["uuid"],"properties":{"uuid":{"type":"string","description":"The id of the audience updated"}}},"AudiencesAudienceListAudienceResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceListAudienceData","description":"Audience"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceListAudienceData":{"required":["items","count","has_more_data","cursor","current_page","current_page_size"],"properties":{"items":{"type":"array","description":"The list of audiences","items":{"$ref":"#/definitions/AudiencesAudienceListAudienceItems"}},"count":{"type":"integer","description":"Total number of items returned"},"has_more_data":{"type":"boolean","description":"True if the current page is not the last page"},"cursor":{"type":"string","description":"Unique ID used to temporarily store search parameters"},"current_page":{"type":"integer","description":"Page number of the current page"},"current_page_size":{"type":"integer","description":"Number of items per page"},"total_page_count":{"type":"integer","description":"Total number of pages returned"},"total_count":{"type":"integer","description":"Total number of Items"},"sort":{"type":"array","description":"Array of applied sorting fields","items":{"$ref":"#/definitions/AudiencesAudienceListAudienceSort"}}}},"AudiencesAudienceListAudienceItems":{"required":["name","description","uuid","labels","type","updated_by","updated_at","created_by"],"properties":{"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"The description of the audience"},"uuid":{"type":"string","description":"The unique ID of the audience"},"labels":{"type":"array","description":"The labels of the audience","items":{"type":"string"}},"type":{"description":"The type of the audience","enum":["manual","automatic"],"type":"string"},"updated_by":{"$ref":"#/definitions/AudiencesAudienceListAudienceUpdatedBy","description":"The user of last update of the audience"},"updated_at":{"type":"string","description":"The time of last update of the audience"},"created_by":{"$ref":"#/definitions/AudiencesAudienceListAudienceCreatedBy","description":"The user of creation of the audience"},"owner":{"$ref":"#/definitions/AudiencesAudienceListAudienceOwner","description":"The name of the group owner. Returns null for power users. Only present when the PU automatic groups toggle is enabled."},"can_manage_rules":{"type":"boolean","description":"If the current user can manage the rules. Always true for super admin, it is true for power user only when he is the group owner. Only present when the PU automatic groups toggle is enabled."},"can_view_history":{"type":"boolean","description":"If the current user can view history. Always true for super admin, it is true for power user only when he is the group owner. Only present when the PU automatic groups toggle is enabled."},"can_view_rules":{"type":"boolean","description":"If the current user can view the rules. Always true for super admin, it is true for power user only when he is the group owner, and has view permission only. Only present when the PU automatic groups toggle is enabled."},"can_duplicate":{"type":"boolean","description":"If the current user can duplicate the audience. Always true for super admin, it is true for power user only when he is the group owner, and has at least the create permission or the audience is manual. Only present when the PU automatic groups toggle is enabled."},"active":{"type":"boolean","description":"The active status of the group. Only present when the active/inactive status groups toggle is enabled."},"can_change_active_status":{"type":"boolean","description":"If the current user can change the active status. Always true for super admin, it is true for power user only when he is the group owner. Only present when the active/inactive status groups toggle is enabled."},"can_view_users_list":{"type":"boolean","description":"If the current user can view the user list. Always true for super admin, it is true for power user only when he is the group owner or the group is active. Only present when the active/inactive status groups toggle is enabled."},"total_members":{"type":"integer","description":"The total number of members in the audience. Returns 0 if the group is inactive. Only present when the active/inactive status groups toggle is enabled and the total_members value is not null."},"exclude_deactivated_users":{"type":"boolean","description":"If true, deactivated users won&#039;t be included in the audience. Only present for automatic audiences."},"ruleset":{"$ref":"#/definitions/AudiencesAudienceListAudienceRuleset","description":"The ruleset definition. Only present for automatic audiences."}}},"AudiencesAudienceListAudienceUpdatedBy":{"required":["idst","name","firstname","lastname","email","userid","avatar"],"properties":{"idst":{"type":"integer","description":"The idst of the user of last update of the audience"},"name":{"type":"string","description":"The name of the user of last update of the audience"},"firstname":{"type":"string","description":"The first name of the user of last update of the audience"},"lastname":{"type":"string","description":"The last name of the user of last update of the audience"},"email":{"type":"string","description":"The email of the user of last update of the audience"},"userid":{"type":"string","description":"The userid of the user of last update of the audience"},"avatar":{"type":"string","description":"The avatar url of the user of last update of the audience"}}},"AudiencesAudienceListAudienceCreatedBy":{"required":["idst","name","firstname","lastname","email","userid","avatar"],"properties":{"idst":{"type":"integer","description":"The idst of the user of creation of the audience"},"name":{"type":"string","description":"The name of the user of creation of the audience"},"firstname":{"type":"string","description":"The first name of the user of creation of the audience"},"lastname":{"type":"string","description":"The last name of the user of creation of the audience"},"email":{"type":"string","description":"The email of the user of creation of the audience"},"userid":{"type":"string","description":"The userid of the user of creation of the audience"},"avatar":{"type":"string","description":"The avatar url of the user of creation of the audience"}}},"AudiencesAudienceListAudienceOwner":{"required":["name","idst"],"properties":{"name":{"type":"string","description":"The first and last name of the group owner. If the name is not set, it returns the username."},"idst":{"type":"integer","description":"The idst of the power user group owner."}}},"AudiencesAudienceListAudienceRuleset":{"required":["status","operator","sets"],"properties":{"status":{"type":"string","description":"The status of the ruleset"},"operator":{"description":"The operator for the ruleset","enum":["AND","OR"],"type":"string"},"sets":{"type":"array","description":"The sets of rules","items":{"$ref":"#/definitions/AudiencesAudienceListAudienceSets"}}}},"AudiencesAudienceListAudienceSets":{"required":["id","rules_operator","rules"],"properties":{"id":{"type":"string","description":"The identifier of the set"},"rules_operator":{"description":"The operator for the rules","enum":["AND","OR"],"type":"string"},"rules":{"type":"array","description":"The rules of the set","items":{"$ref":"#/definitions/AudiencesAudienceListAudienceRules"}}}},"AudiencesAudienceListAudienceRules":{"required":["id","type","payload"],"properties":{"id":{"type":"string","description":"The identifier of the rule"},"type":{"type":"string","description":"The type of rule"},"payload":{"$ref":"#/definitions/AudiencesAudienceListAudiencePayload","description":"The payload of the rule"}}},"AudiencesAudienceListAudiencePayload":{},"AudiencesAudienceListAudienceSort":{"required":["sort_attr","sort_dir"],"properties":{"sort_attr":{"type":"string","description":"Sorting field name"},"sort_dir":{"type":"string","description":"Sorting direction: asc = ascending, desc = descending"}}},"AudiencesAudienceViewAudienceResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceViewAudienceData","description":"Audience"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceViewAudienceData":{"required":["audience"],"properties":{"audience":{"$ref":"#/definitions/AudiencesAudienceViewAudienceAudience","description":""}}},"AudiencesAudienceViewAudienceAudience":{"required":["name","description","uuid","labels","type","updated_by","updated_at","created_by"],"properties":{"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"The description of the audience"},"uuid":{"type":"string","description":"The unique ID of the audience"},"labels":{"type":"array","description":"The labels of the audience","items":{"type":"string"}},"type":{"description":"The type of the audience","enum":["manual","automatic"],"type":"string"},"updated_by":{"$ref":"#/definitions/AudiencesAudienceViewAudienceUpdatedBy","description":"The user of last update of the audience"},"updated_at":{"type":"string","description":"The time of last update of the audience"},"created_by":{"$ref":"#/definitions/AudiencesAudienceViewAudienceCreatedBy","description":"The user of creation of the audience"},"owner":{"$ref":"#/definitions/AudiencesAudienceViewAudienceOwner","description":"The name of the group owner. Returns null for power users. Only present when the PU automatic groups toggle is enabled."},"can_manage_rules":{"type":"boolean","description":"If the current user can manage the rules. Always true for super admin, it is true for power user only when he is the group owner. Only present when the PU automatic groups toggle is enabled."},"can_view_history":{"type":"boolean","description":"If the current user can view history. Always true for super admin, it is true for power user only when he is the group owner. Only present when the PU automatic groups toggle is enabled."},"can_view_rules":{"type":"boolean","description":"If the current user can view the rules. Always true for super admin, it is true for power user only when he is the group owner, and has view permission only. Only present when the PU automatic groups toggle is enabled."},"can_duplicate":{"type":"boolean","description":"If the current user can duplicate the audience. Always true for super admin, it is true for power user only when he is the group owner, and has at least the create permission or the audience is manual. Only present when the PU automatic groups toggle is enabled."},"active":{"type":"boolean","description":"The active status of the group. Only present when the active/inactive status groups toggle is enabled."},"can_change_active_status":{"type":"boolean","description":"If the current user can change the active status. Always true for super admin, it is true for power user only when he is the group owner. Only present when the active/inactive status groups toggle is enabled."},"can_view_users_list":{"type":"boolean","description":"If the current user can view the user list. Always true for super admin, it is true for power user only when he is the group owner or the group is active. Only present when the active/inactive status groups toggle is enabled."},"total_members":{"type":"integer","description":"The total number of members in the audience. Returns 0 if the group is inactive. Only present when the active/inactive status groups toggle is enabled and the total_members value is not null."},"exclude_deactivated_users":{"type":"boolean","description":"If true, deactivated users won&#039;t be included in the audience. Only present for automatic audiences."},"ruleset":{"$ref":"#/definitions/AudiencesAudienceViewAudienceRuleset","description":"The ruleset definition. Only present for automatic audiences."}}},"AudiencesAudienceViewAudienceUpdatedBy":{"required":["idst","name","firstname","lastname","email","userid","avatar"],"properties":{"idst":{"type":"integer","description":"The idst of the user of last update of the audience"},"name":{"type":"string","description":"The name of the user of last update of the audience"},"firstname":{"type":"string","description":"The first name of the user of last update of the audience"},"lastname":{"type":"string","description":"The last name of the user of last update of the audience"},"email":{"type":"string","description":"The email of the user of last update of the audience"},"userid":{"type":"string","description":"The userid of the user of last update of the audience"},"avatar":{"type":"string","description":"The avatar url of the user of last update of the audience"}}},"AudiencesAudienceViewAudienceCreatedBy":{"required":["idst","name","firstname","lastname","email","userid","avatar"],"properties":{"idst":{"type":"integer","description":"The idst of the user of creation of the audience"},"name":{"type":"string","description":"The name of the user of creation of the audience"},"firstname":{"type":"string","description":"The first name of the user of creation of the audience"},"lastname":{"type":"string","description":"The last name of the user of creation of the audience"},"email":{"type":"string","description":"The email of the user of creation of the audience"},"userid":{"type":"string","description":"The userid of the user of creation of the audience"},"avatar":{"type":"string","description":"The avatar url of the user of creation of the audience"}}},"AudiencesAudienceViewAudienceOwner":{"required":["name","idst"],"properties":{"name":{"type":"string","description":"The first and last name of the group owner. If the name is not set, it returns the username."},"idst":{"type":"integer","description":"The idst of the power user group owner."}}},"AudiencesAudienceViewAudienceRuleset":{"required":["status","operator","sets"],"properties":{"status":{"type":"string","description":"The status of the ruleset"},"operator":{"description":"The operator for the ruleset","enum":["AND","OR"],"type":"string"},"sets":{"type":"array","description":"The sets of rules","items":{"$ref":"#/definitions/AudiencesAudienceViewAudienceSets"}}}},"AudiencesAudienceViewAudienceSets":{"required":["id","rules_operator","rules"],"properties":{"id":{"type":"string","description":"The identifier of the set"},"rules_operator":{"description":"The operator for the rules","enum":["AND","OR"],"type":"string"},"rules":{"type":"array","description":"The rules of the set","items":{"$ref":"#/definitions/AudiencesAudienceViewAudienceRules"}}}},"AudiencesAudienceViewAudienceRules":{"required":["id","type","payload"],"properties":{"id":{"type":"string","description":"The identifier of the rule"},"type":{"type":"string","description":"The type of rule"},"payload":{"$ref":"#/definitions/AudiencesAudienceViewAudiencePayload","description":"The payload of the rule"}}},"AudiencesAudienceViewAudiencePayload":{},"AudiencesAudienceAddUserSchema":{"type":"object","properties":{"user_ids":{"type":"array","description":"The users to add to the audience (Only one between groups, branches and users can be not empty)","items":{"type":"integer"}},"branch_ids":{"type":"array","description":"The branches to add to the audience (Only one between groups, branches and users can be not empty)","items":{"type":"integer"}},"group_ids":{"type":"array","description":"The groups to add to the audience (Only one between groups, branches and users can be not empty)","items":{"type":"integer"}}}},"AudiencesAudienceAddUserResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceAddUserData","description":""},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceAddUserData":{"required":["added_users","success","not_processed_records"],"properties":{"added_users":{"type":"integer","description":"The count of added users"},"success":{"type":"boolean","description":"The success"},"not_processed_records":{"$ref":"#/definitions/AudiencesAudienceAddUserNotProcessedRecords","description":"The not processed records"}}},"AudiencesAudienceAddUserNotProcessedRecords":{"properties":{"user_ids":{"type":"array","description":"The user ids not processed","items":{"type":"integer"}},"branch_ids":{"type":"array","description":"The branches ids not processed","items":{"type":"integer"}},"group_ids":{"type":"array","description":"The groups ids not processed","items":{"type":"integer"}}}},"AudiencesAudiencePutAssignUsersSchema":{"type":"object","properties":{"user_ids":{"type":"array","description":"The users to assign manually to the audience, users must exist, if not an error will be returned","items":{"type":"integer"}},"user_all":{"type":"boolean","description":"Assign all users manually to the audience (audience current users), if true is passed the callback will ignore user_ids"},"user_filters":{"$ref":"#/definitions/AudiencesAudiencePutAssignUsersUserFilters","description":"Assign all users to the audience that meets the passed criteria ( &quot;search&quot; =&gt; &quot;test&quot; ). This field will be considered if user_all is true"}}},"AudiencesAudiencePutAssignUsersUserFilters":{"properties":{"search":{"type":"string","description":"The string that will be used to select the subset of users (from all the users of the audience) to assign"}}},"AudiencesAudiencePutAssignUsersResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudiencePutAssignUsersData","description":""},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudiencePutAssignUsersData":{"required":["success","background_job"],"properties":{"success":{"type":"boolean","description":"Whether or not the operation was successful"},"background_job":{"type":"boolean","description":"Whether or not the operation has generated a background job"}}},"AudiencesAudiencePutBatchAssignUsersSchema":{"type":"object","required":["items","items","options"],"properties":{"items":{"$ref":"#/definitions/AudiencesAudiencePutBatchAssignUsersItems","description":"(option 2) The users to assign manually to the audience"},"options":{"$ref":"#/definitions/AudiencesAudiencePutBatchAssignUsersOptions","description":"Object containing additional options."}}},"AudiencesAudiencePutBatchAssignUsersItems":{},"AudiencesAudiencePutBatchAssignUsersOptions":{"properties":{"items_type":{"type":"string","description":"idst = items will contain an array of user idst | object = items will contain an array of user object"}}},"AudiencesAudiencePutBatchAssignUsersResponse":{"required":["data","version"],"properties":{"data":{"type":"array","description":"Response array","items":{"$ref":"#/definitions/AudiencesAudiencePutBatchAssignUsersData"}},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudiencePutBatchAssignUsersData":{"required":["row_index","success"],"properties":{"row_index":{"type":"integer","description":"Assigned row index"},"success":{"type":"boolean","description":"The user has been correctly assigned"},"message":{"type":"string","description":"Optional message if success is false"}}},"AudiencesAudienceDeleteUserSchema":{"type":"object","properties":{"user_ids":{"type":"array","description":"The users to remove from the audience","items":{"type":"integer"}},"user_all":{"type":"boolean","description":"Remove all users from audience, if true is passed the callback will ignore user_ids"},"user_filters":{"$ref":"#/definitions/AudiencesAudienceDeleteUserUserFilters","description":"Remove all users from audience that meets the passed criteria ( &quot;search&quot; =&gt; &quot;test&quot; ). This field will be considered if user_all is true"}}},"AudiencesAudienceDeleteUserUserFilters":{"properties":{"search":{"type":"string","description":"The string that will be used to select the subset of users (from all the users of the audience) to delete"}}},"AudiencesAudienceDeleteUserResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceDeleteUserData","description":""},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceDeleteUserData":{"required":["success"],"properties":{"success":{"type":"boolean","description":"Whether or not the operation was successful"}}},"AudiencesAudienceGetUsersResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceGetUsersData","description":""},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceGetUsersData":{"required":["items","count","has_more_data","cursor","current_page","current_page_size"],"properties":{"items":{"type":"array","description":"The users of the audience","items":{"$ref":"#/definitions/AudiencesAudienceGetUsersItems"}},"count":{"type":"integer","description":"Total number of items returned"},"has_more_data":{"type":"boolean","description":"True if the current page is not the last page"},"cursor":{"type":"string","description":"Unique ID used to temporarily store search parameters"},"current_page":{"type":"integer","description":"Page number of the current page"},"current_page_size":{"type":"integer","description":"Number of items per page"},"total_page_count":{"type":"integer","description":"Total number of pages returned"},"total_count":{"type":"integer","description":"Total number of Items"},"sort":{"type":"array","description":"Array of applied sorting fields","items":{"$ref":"#/definitions/AudiencesAudienceGetUsersSort"}}}},"AudiencesAudienceGetUsersItems":{"required":["idst","firstname","lastname","userid","email","relation_type"],"properties":{"idst":{"type":"string","description":"The idst of the user"},"firstname":{"type":"string","description":"The first name of the user"},"lastname":{"type":"string","description":"The last name of the user"},"userid":{"type":"string","description":"The userid of the user"},"email":{"type":"string","description":"The email of the user"},"relation_type":{"type":"string","description":"Relation type for the user with the audience [automatic,manual]"}}},"AudiencesAudienceGetUsersSort":{"required":["sort_attr","sort_dir"],"properties":{"sort_attr":{"type":"string","description":"Sorting field name"},"sort_dir":{"type":"string","description":"Sorting direction: asc = ascending, desc = descending"}}},"AudiencesAudienceGetAudienceToGroupIdResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceGetAudienceToGroupIdData","description":"Audience"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceGetAudienceToGroupIdData":{"required":["group_id"],"properties":{"group_id":{"type":"integer","description":"The unique ID of the group related to the audience"}}},"AudiencesAudienceGetGroupToAudienceIdResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceGetGroupToAudienceIdData","description":"Audience"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceGetGroupToAudienceIdData":{"required":["id"],"properties":{"id":{"type":"string","description":"The unique ID of the audience related to the group"}}},"AudiencesAudienceChangeActiveStatusAudienceSchema":{"type":"object","required":["active"],"properties":{"active":{"type":"boolean","description":"The active status of the audience: Set false to deactivate the audience status. Set to true to activate the audience status."}}},"AudiencesAudienceChangeActiveStatusAudienceResponse":{"required":["data","version"],"properties":{"data":{"$ref":"#/definitions/AudiencesAudienceChangeActiveStatusAudienceData","description":"Response data"},"version":{"type":"string","required":"required","description":"Current API version"}}},"AudiencesAudienceChangeActiveStatusAudienceData":{"required":["success"],"properties":{"success":{"type":"string","description":"The status of the operation"}}}}}