openapi: 3.1.0 info: title: Convert Accounts Audiences API description: 'Move your app forward with the Convert API. The Convert API allows you to manage your Convert Experiences projects using code. The REST API is an interface for managing and extending functionality of Convert. For example, instead of creating and maintaining projects using the Convert Experiences web dashboard you can create an experiment programmatically. Additionally, if you prefer to run custom analysis on experiment results you can leverage the API to pull data from Convert Experiences into your own workflow. If you do not have a Convert account already, sign up for a free developer account at https://www.convert.com/api/. *[Convert API V1](/doc/v1) is still available and documentation can be found [here](/doc/v1) but using it is highly discouraged as it will be phased out in the future* ' version: 2.0.0 servers: - url: https://api.convert.com/api/v2 description: Live API server - url: https://apidev.convert.com/api/v2 description: DEV API server - url: http://apidev.convert.com:5000/api/v2 description: DEV mocked API server tags: - name: Audiences description: Audiences let you segment your users in the ways that are important to your business. You can segment by event (e.g., session_start or level_up) and by user property (e.g., Browser/OS, Geo, Language), and combine events, parameters, and properties to include practically any subset of users. Read more information about Audiences. paths: /accounts/{account_id}/projects/{project_id}/audiences: post: operationId: getAudiencesList summary: List audiences within a project description: 'Retrieves a list of all audiences defined for a specific project. Audiences segment visitors based on criteria like behavior, demographics, traffic source, or custom data, to target experiences. Supports filtering by status, type, name, and pagination. The Knowledge Base article "Define Audiences for your Experience" explains: "An ''Audience'' is a group of visitors that you want to be included in your experience". ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id description: ID of the project to which save/retrieved data is connected in: path required: true schema: type: integer requestBody: $ref: '#/components/requestBodies/GetAudiencesListRequest' responses: '200': $ref: '#/components/responses/AudiencesListResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences/{audience_id}: get: operationId: getAudience summary: Get details for a specific audience description: 'Retrieves detailed information about a single audience, identified by its `audience_id`. This includes its name, type (permanent, transient, segmentation), status, and the rules defining the audience criteria (e.g., browser is Chrome, country is USA, visited specific page). The `include` parameter can fetch additional data like usage statistics. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id in: path required: true description: ID of the project into which the audience is stored schema: type: integer - name: audience_id in: path required: true description: ID of the audience to be retrieved schema: type: integer - name: include in: query required: false description: 'Specifies the list of fields to be included in the response, which otherwise would not be sent. Read more in the section related to [Optional Fields](#tag/Optional-Fields) ' schema: type: array items: $ref: '#/components/schemas/AudienceIncludeFields' responses: '200': $ref: '#/components/responses/AudienceResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences/add: post: operationId: createAudience summary: Create a new audience description: 'Defines a new audience within a project. Requires a name, type (permanent, transient, segmentation), and a set of rules defining the audience criteria. Rules can be based on visitor data (browser, device, geo-location, language, visit count, cookie values), traffic sources (UTM parameters, referrer), page tags, or JavaScript conditions. The Knowledge Base article "Define an Advanced Audience" lists many available conditions. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id in: path required: true description: ID of the project into which the audience is to be stored schema: type: integer requestBody: $ref: '#/components/requestBodies/CreateAudienceRequest' responses: '201': $ref: '#/components/responses/AudienceResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences/{audience_id}/update: post: operationId: updateAudience summary: Update an existing audience description: 'Modifies the configuration of an existing audience. This can include changing its name, type, status (active/archived), or the rules defining its criteria. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id in: path required: true description: ID of the project into which the audience is stored schema: type: integer - name: audience_id in: path required: true description: ID of the audience to be updated schema: type: integer requestBody: $ref: '#/components/requestBodies/UpdateAudienceRequest' responses: '200': $ref: '#/components/responses/AudienceResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences/{audience_id}/delete: delete: operationId: deleteAudience summary: Delete an audience description: 'Permanently removes an audience from a project. This action is irreversible. If the audience is in use by active experiences, consider archiving it instead or unlinking it from experiences first. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id description: ID of the project to which save/retrieved data is connected in: path required: true schema: type: integer - name: audience_id in: path required: true description: ID of the audience to be deleted schema: type: integer responses: '200': $ref: '#/components/responses/SuccessResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences/bulk-update: post: operationId: bulkAudiencesUpdate summary: Update multiple audiences at once description: 'Allows for changing the status (e.g., active, archived) of multiple audiences within a project simultaneously. Requires a list of audience IDs and the target status. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id description: ID of the project to which save/retrieved data is connected in: path required: true schema: type: integer requestBody: $ref: '#/components/requestBodies/BulkUpdateAudiencesRequest' responses: '200': $ref: '#/components/responses/BulkSuccessResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences/bulk-delete: post: operationId: bulkAudiencesDelete summary: Delete multiple audiences at once description: 'Permanently removes multiple audiences from a project in a single operation. Requires a list of audience IDs. This action is irreversible. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id description: ID of the project to which save/retrieved data is connected in: path required: true schema: type: integer requestBody: $ref: '#/components/requestBodies/BulkDeleteAudiencesRequest' responses: '200': $ref: '#/components/responses/BulkSuccessResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences-presets: get: operationId: getAudiencesPresets summary: List predefined audience templates (presets) description: 'Retrieves a list of predefined audience templates (presets) available for use. These presets offer common targeting configurations (e.g., "New Visitors", "Mobile Users", "Visitors from Google") to speed up audience setup. The Knowledge Base article "Define an Audience from the Templates" describes this. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id description: ID of the project to which save/retrieved data is connected in: path required: true schema: type: integer responses: '200': $ref: '#/components/responses/AudiencesPresetsListResponse' default: $ref: '#/components/responses/ErrorResponse' /accounts/{account_id}/projects/{project_id}/audiences/{audience_id}/clone: post: operationId: cloneAudience summary: Clone an existing audience description: 'Creates a new audience as an identical copy of an existing one (specified by `audience_id`). Useful for creating a similar audience with minor modifications or for templating. ' tags: - Audiences parameters: - name: account_id in: path required: true description: ID of the account that owns the retrieved/saved data schema: type: integer - name: project_id description: ID of the project to which save/retrieved data is connected in: path required: true schema: type: integer - name: audience_id in: path required: true description: ID of the audience to be deleted schema: type: integer - name: include in: query required: false description: 'Specifies the list of fields to be included in the response, which otherwise would not be sent. Read more in the section related to [Optional Fields](#tag/Optional-Fields) ' schema: type: array items: $ref: '#/components/schemas/AudienceIncludeFields' responses: '201': $ref: '#/components/responses/AudienceResponse' default: $ref: '#/components/responses/ErrorResponse' components: schemas: RuleObjectNoUrl: type: object nullable: true description: 'Similar to `RuleObject`, but the individual `RuleElementNoUrl` conditions within `OR_WHEN` arrays cannot include URL-based matching types. Used for ''permanent'' or ''transient'' audiences where URL context is not persistently evaluated or relevant for the audience type. ' properties: OR: description: An array of AND-blocks. type: array items: type: object properties: AND: description: An array of OR_WHEN-blocks. type: array items: type: object properties: OR_WHEN: description: An array of individual rule elements that do not involve URL matching. type: array items: $ref: '#/components/schemas/RuleElementNoUrl' MinuteOfHourMatchRulesTypes: type: string enum: - local_time_minute_of_hour - project_time_minute_of_hour LanguageMatchRulesTypes: type: string enum: - language WeatherConditionMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithWeatherConditionValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/WeatherConditionMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/TextMatchingOptions' GoalTriggeredMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithGoalTriggeredValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/GoalTriggeredMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' CookieMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithStringValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/CookieMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/CookieMatchingOptions' key: description: The name of the cookie which value is compared to the given rule value type: string JsConditionMatchRulesTypes: type: string enum: - js_condition VisitorTypeMatchRulesTypes: type: string enum: - visitor_type BaseRuleWithVisitorTypeValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: Type of the visitors type: string enum: - new - returning AudienceWithUrlMatching: allOf: - $ref: '#/components/schemas/AudienceBase' - type: object properties: type: $ref: '#/components/schemas/AudienceTypesWithUrl' rules: nullable: true allOf: - $ref: '#/components/schemas/RuleObjectAudience' AudiencesListFilteringOptions: allOf: - $ref: '#/components/schemas/ResultsPerPage' - $ref: '#/components/schemas/SortDirection' - type: object properties: status: type: array nullable: true description: List of audience statuses to be returned items: $ref: '#/components/schemas/AudienceStatuses' search: type: string maxLength: 200 nullable: true description: a search string that would be used to search against audience's name or description is_default: type: boolean nullable: true description: 'A flag to filter audiences by default status If set to true, only default audiences will be returned, if not set, all audiences will be returned ' sort_by: type: string nullable: true default: id description: 'A value to sort audiences by specific field Defaults to **id** if not provided ' enum: - id - type - name - usage - status - key type: allOf: - $ref: '#/components/schemas/AudienceTypes' nullable: true experiences: type: array nullable: true description: List of experiences to be returned items: type: integer maxItems: 100 usage: type: string nullable: true description: It indicates wherever retrieved audiences are used or not inside experiences enum: - used - not_used ErrorData: type: object properties: code: type: integer format: int32 message: oneOf: - type: string - type: array items: type: string fields: oneOf: - type: string - type: array items: type: string BaseRule: type: object required: - rule_type properties: rule_type: description: 'The specific attribute or condition to evaluate. Examples: ''url'', ''cookie'', ''browser_name'', ''js_condition'', ''page_tag_product_price''. The allowed `rule_type` values depend on whether the rule is for an Audience (which can use visitor and page content attributes if it''s a ''segmentation'' type) or a Location (typically URL or page tag based). ' type: string GenericTextKeyValueMatchRulesTypes: type: string enum: - generic_text_key_value SegmentBucketedMatchRulesTypes: type: string enum: - bucketed_into_segment Audience: oneOf: - $ref: '#/components/schemas/AudienceWithoutUrlMatching' - $ref: '#/components/schemas/AudienceWithUrlMatching' discriminator: propertyName: type mapping: permanent: '#/components/schemas/AudienceWithoutUrlMatching' segmentation: '#/components/schemas/AudienceWithUrlMatching' transient: '#/components/schemas/AudienceWithoutUrlMatching' BaseRuleWithCountryCodeValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: The 2 letter ISO country code used for matching type: string minLength: 2 maxLength: 2 BulkUpdateAudienceRequestData: type: object description: Request body for bulk updating the status of multiple audiences. additionalProperties: false properties: id: $ref: '#/components/schemas/BulkAudiencesIds' status: $ref: '#/components/schemas/AudienceStatuses' required: - id - status Extra: type: object properties: pagination: $ref: '#/components/schemas/Pagination' BaseMatch: type: object properties: negated: description: 'If `true`, the logical result of the match is inverted. For example, if `match_type` is ''contains'' and `value` is ''apple'', `negated: true` means the rule matches if the attribute *does not* contain ''apple''. ' type: boolean WeatherConditionMatchRulesTypes: type: string enum: - weather_condition BrowserNameMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithBrowserNameValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/BrowserNameMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' BulkSuccessData: allOf: - $ref: '#/components/schemas/SuccessData' - type: object properties: code: type: integer format: int32 errors: type: array description: List of unprocessed entities. Would be empty, if all passed entities processed items: $ref: '#/components/schemas/BulkEntityError' CountryMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithCountryCodeValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/CountryMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' BaseRuleWithDayOfWeekValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: Day of week used for matching type: number minimum: 1 maximum: 7 BrowserNameMatchRulesTypes: type: string enum: - browser_name BulkEntityError: type: object additionalProperties: false properties: id: type: integer description: The unique identifier of the entity that could not be processed. message: type: string description: A message explaining the reason for the failure for this specific entity. RuleElementNoUrl: oneOf: - $ref: '#/components/schemas/GenericTextMatchRule' - $ref: '#/components/schemas/GenericNumericMatchRule' - $ref: '#/components/schemas/GenericBoolMatchRule' - $ref: '#/components/schemas/CookieMatchRule' - $ref: '#/components/schemas/GenericTextKeyValueMatchRule' - $ref: '#/components/schemas/GenericNumericKeyValueMatchRule' - $ref: '#/components/schemas/GenericBoolKeyValueMatchRule' - $ref: '#/components/schemas/CountryMatchRule' - $ref: '#/components/schemas/LanguageMatchRule' - $ref: '#/components/schemas/GoalTriggeredMatchRule' - $ref: '#/components/schemas/SegmentBucketedMatchRule' - $ref: '#/components/schemas/DayOfWeekMatchRule' - $ref: '#/components/schemas/HourOfDayMatchRule' - $ref: '#/components/schemas/MinuteOfHourMatchRule' - $ref: '#/components/schemas/BrowserNameMatchRule' - $ref: '#/components/schemas/OsMatchRule' - $ref: '#/components/schemas/WeatherConditionMatchRule' - $ref: '#/components/schemas/VisitorTypeMatchRule' - $ref: '#/components/schemas/JsConditionMatchRule' - $ref: '#/components/schemas/VisitorDataExistsMatchRule' discriminator: propertyName: rule_type mapping: campaign: '#/components/schemas/GenericTextMatchRule' keyword: '#/components/schemas/GenericTextMatchRule' medium: '#/components/schemas/GenericTextMatchRule' source_name: '#/components/schemas/GenericTextMatchRule' avg_time_page: '#/components/schemas/GenericNumericMatchRule' city: '#/components/schemas/GenericTextMatchRule' country: '#/components/schemas/CountryMatchRule' region: '#/components/schemas/GenericTextMatchRule' days_since_last_visit: '#/components/schemas/GenericNumericMatchRule' language: '#/components/schemas/LanguageMatchRule' pages_visited_count: '#/components/schemas/GenericNumericMatchRule' goal_triggered: '#/components/schemas/GoalTriggeredMatchRule' visit_duration: '#/components/schemas/GenericNumericMatchRule' cookie: '#/components/schemas/CookieMatchRule' visitor_type: '#/components/schemas/VisitorTypeMatchRule' visits_count: '#/components/schemas/GenericNumericMatchRule' bucketed_into_experience: '#/components/schemas/GenericBoolMatchRule' bucketed_into_segment: '#/components/schemas/SegmentBucketedMatchRule' local_time_day_of_week: '#/components/schemas/DayOfWeekMatchRule' local_time_hour_of_day: '#/components/schemas/HourOfDayMatchRule' local_time_minute_of_hour: '#/components/schemas/MinuteOfHourMatchRule' project_time_day_of_week: '#/components/schemas/DayOfWeekMatchRule' project_time_hour_of_day: '#/components/schemas/HourOfDayMatchRule' project_time_minute_of_hour: '#/components/schemas/MinuteOfHourMatchRule' browser_name: '#/components/schemas/BrowserNameMatchRule' browser_version: '#/components/schemas/GenericTextMatchRule' os: '#/components/schemas/OsMatchRule' user_agent: '#/components/schemas/GenericTextMatchRule' is_desktop: '#/components/schemas/GenericBoolMatchRule' is_mobile: '#/components/schemas/GenericBoolMatchRule' is_tablet: '#/components/schemas/GenericBoolMatchRule' js_condition: '#/components/schemas/JsConditionMatchRule' page_tag_page_type: '#/components/schemas/GenericTextMatchRule' page_tag_category_id: '#/components/schemas/GenericTextMatchRule' page_tag_category_name: '#/components/schemas/GenericTextMatchRule' page_tag_product_sku: '#/components/schemas/GenericTextMatchRule' page_tag_product_name: '#/components/schemas/GenericTextMatchRule' page_tag_product_price: '#/components/schemas/GenericNumericMatchRule' page_tag_customer_id: '#/components/schemas/GenericTextMatchRule' page_tag_custom_1: '#/components/schemas/GenericTextMatchRule' page_tag_custom_2: '#/components/schemas/GenericTextMatchRule' page_tag_custom_3: '#/components/schemas/GenericTextMatchRule' page_tag_custom_4: '#/components/schemas/GenericTextMatchRule' weather_condition: '#/components/schemas/WeatherConditionMatchRule' generic_text_key_value: '#/components/schemas/GenericTextKeyValueMatchRule' generic_numeric_key_value: '#/components/schemas/GenericNumericKeyValueMatchRule' generic_bool_key_value: '#/components/schemas/GenericBoolKeyValueMatchRule' visitor_id: '#/components/schemas/GenericTextMatchRule' visitor_data_exists: '#/components/schemas/VisitorDataExistsMatchRule' BaseRuleWithBrowserNameValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: Browser name used for matching type: string enum: - chrome - microsoft_ie - firefox - microsoft_edge - mozilla - opera - safari BulkDeleteAudienceRequestData: type: object description: Request body for bulk deleting multiple audiences. Contains a list of audience IDs to be permanently removed. additionalProperties: false properties: id: $ref: '#/components/schemas/BulkAudiencesIds' required: - id BaseRuleWithWeatherConditionValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: 'Weather Condition name used for matching. Full or partial condition. The weather provider used by Convert detects the following conditions: - Blizzard - Blowing snow - Cloudy - Fog - Freezing drizzle - Freezing fog - Heavy freezing drizzle - Heavy rain - Heavy rain at times - Light drizzle - Light freezing rain - Light rain - Mist - Moderate rain - Moderate rain at times - Overcast - Partly cloudy ' type: string GenericTextKeyValueMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithStringValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/GenericTextKeyValueMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/TextMatchingOptions' - $ref: '#/components/schemas/GenericKey' VisitorDataExistsMatchRulesTypes: type: string enum: - visitor_data_exists GenericNumericKeyValueMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithNumericValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/GenericNumericKeyValueMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/NumericMatchingOptions' - $ref: '#/components/schemas/GenericKey' OsMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithOsValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/OsMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' BulkAudiencesIds: type: array description: A list of audience unique numerical identifiers to be affected by a bulk operation. items: type: integer minItems: 1 maxItems: 100 HourOfDayMatchRulesTypes: type: string enum: - local_time_hour_of_day - project_time_hour_of_day TextMatchRulesTypes: type: string enum: - url - url_with_query - query_string - campaign - keyword - medium - source_name - city - region - browser_version - user_agent - page_tag_page_type - page_tag_category_id - page_tag_category_name - page_tag_product_sku - page_tag_product_name - page_tag_customer_id - page_tag_custom_1 - page_tag_custom_2 - page_tag_custom_3 - page_tag_custom_4 - visitor_id JsConditionMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithJsCodeValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/JsConditionMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' GenericBoolMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithBooleanValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/BoolMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' AudiencesListResponseData: type: object description: Response containing a list of audiences defined within a project, along with pagination details if applicable. properties: data: $ref: '#/components/schemas/AudiencesList' extra: $ref: '#/components/schemas/Extra' OnlyCount: type: object properties: onlyCount: type: boolean description: 'If set to `true` in a list request, the response will only contain the total count of matching items (`extra.pagination.items_count`) and will not include the actual item data. Useful for quickly getting totals without fetching full datasets. ' GenericBoolKeyValueMatchRulesTypes: type: string enum: - generic_bool_key_value BaseRuleWithSegmentBucketedValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: ID of the segment used for matching type: number NumericMatchingOptions: type: string enum: - equalsNumber - less - lessEqual BoolMatchRulesTypes: type: string enum: - bucketed_into_experience - is_desktop - is_mobile - is_tablet SuccessData: type: object properties: code: type: integer format: int32 message: type: string CountryMatchRulesTypes: type: string enum: - country AudiencesList: type: array description: A list of audience objects. items: $ref: '#/components/schemas/Audience' BaseRuleWithNumericValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: The value used to match against 'rule_type' using 'matching' type: number DayOfWeekMatchRulesTypes: type: string enum: - local_time_day_of_week - project_time_day_of_week GenericTextMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithStringValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/TextMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/TextMatchingOptions' GenericKey: type: object properties: key: description: The name of the key whose value will be retrieved and compared against the rule's `value`. type: string CookieMatchingOptions: type: string enum: - matches - regexMatches - contains - endsWith - startsWith - exists - doesNotExist RuleObjectAudience: type: object nullable: true description: This one describes a logical rule that is being used inside the app for triggering goals, matching audiences etc properties: OR: description: This describes an outer set of blocks which are evaluated using OR's between them type: array items: type: object properties: AND: description: This describes a colections of logical blocks which are evaluated using AND's between them type: array items: type: object properties: OR_WHEN: description: This describes a colections of logical blocks which are evaluated using OR's between them type: array items: $ref: '#/components/schemas/RuleElementAudience' BaseRuleWithLanguageCodeValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: The 2 letter ISO language code used for matching type: string minLength: 2 maxLength: 2 GenericNumericKeyValueMatchRulesTypes: type: string enum: - generic_numeric_key_value MinuteOfHourMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithMinuteOfHourValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/MinuteOfHourMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/NumericMatchingOptions' AudiencePreset: type: object properties: id: type: integer description: The unique identifier for the audience preset. readOnly: true description: type: string description: A brief explanation of the criteria this preset audience targets. name: type: string description: The display name of the preset audience (e.g., "All Visitors", "Desktop Users"). stats: type: object readOnly: true description: Statistics related to the usage of this preset. properties: experiences_usage: description: 'The number of active experiences currently using this preset audience. ' type: number default: 0 rules: nullable: true allOf: - $ref: '#/components/schemas/RuleObjectAudience' CookieMatchRulesTypes: type: string enum: - cookie Pagination: type: object properties: current_page: description: The current page number being displayed from the paginated set. type: integer minimum: 1 items_count: description: The total number of items available across all pages for the current filter criteria. type: integer minimum: 0 items_per_page: description: The number of items included in the current page of results (matches `results_per_page` from the request). type: integer minimum: 0 pages_count: description: The total number of pages available for the current filter criteria and `results_per_page` setting. type: integer minimum: 0 BaseRuleWithStringValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: The value used to match against 'rule_type' using 'matching' type: string RuleElementAudience: oneOf: - $ref: '#/components/schemas/GenericTextMatchRule' - $ref: '#/components/schemas/GenericNumericMatchRule' - $ref: '#/components/schemas/GenericBoolMatchRule' - $ref: '#/components/schemas/GenericTextKeyValueMatchRule' - $ref: '#/components/schemas/GenericNumericKeyValueMatchRule' - $ref: '#/components/schemas/GenericBoolKeyValueMatchRule' - $ref: '#/components/schemas/CookieMatchRule' - $ref: '#/components/schemas/CountryMatchRule' - $ref: '#/components/schemas/LanguageMatchRule' - $ref: '#/components/schemas/GoalTriggeredMatchRule' - $ref: '#/components/schemas/SegmentBucketedMatchRule' - $ref: '#/components/schemas/DayOfWeekMatchRule' - $ref: '#/components/schemas/HourOfDayMatchRule' - $ref: '#/components/schemas/MinuteOfHourMatchRule' - $ref: '#/components/schemas/BrowserNameMatchRule' - $ref: '#/components/schemas/OsMatchRule' - $ref: '#/components/schemas/WeatherConditionMatchRule' - $ref: '#/components/schemas/VisitorTypeMatchRule' - $ref: '#/components/schemas/JsConditionMatchRule' - $ref: '#/components/schemas/VisitorDataExistsMatchRule' discriminator: propertyName: rule_type mapping: url: '#/components/schemas/GenericTextMatchRule' url_with_query: '#/components/schemas/GenericTextMatchRule' query_string: '#/components/schemas/GenericTextMatchRule' campaign: '#/components/schemas/GenericTextMatchRule' keyword: '#/components/schemas/GenericTextMatchRule' medium: '#/components/schemas/GenericTextMatchRule' source_name: '#/components/schemas/GenericTextMatchRule' avg_time_page: '#/components/schemas/GenericNumericMatchRule' city: '#/components/schemas/GenericTextMatchRule' country: '#/components/schemas/CountryMatchRule' region: '#/components/schemas/GenericTextMatchRule' days_since_last_visit: '#/components/schemas/GenericNumericMatchRule' language: '#/components/schemas/LanguageMatchRule' pages_visited_count: '#/components/schemas/GenericNumericMatchRule' goal_triggered: '#/components/schemas/GoalTriggeredMatchRule' visit_duration: '#/components/schemas/GenericNumericMatchRule' cookie: '#/components/schemas/CookieMatchRule' visitor_type: '#/components/schemas/VisitorTypeMatchRule' visits_count: '#/components/schemas/GenericNumericMatchRule' bucketed_into_experience: '#/components/schemas/GenericBoolMatchRule' bucketed_into_segment: '#/components/schemas/SegmentBucketedMatchRule' local_time_day_of_week: '#/components/schemas/DayOfWeekMatchRule' local_time_hour_of_day: '#/components/schemas/HourOfDayMatchRule' local_time_minute_of_hour: '#/components/schemas/MinuteOfHourMatchRule' project_time_day_of_week: '#/components/schemas/DayOfWeekMatchRule' project_time_hour_of_day: '#/components/schemas/HourOfDayMatchRule' project_time_minute_of_hour: '#/components/schemas/MinuteOfHourMatchRule' browser_name: '#/components/schemas/BrowserNameMatchRule' browser_version: '#/components/schemas/GenericTextMatchRule' os: '#/components/schemas/OsMatchRule' user_agent: '#/components/schemas/GenericTextMatchRule' is_desktop: '#/components/schemas/GenericBoolMatchRule' is_mobile: '#/components/schemas/GenericBoolMatchRule' is_tablet: '#/components/schemas/GenericBoolMatchRule' js_condition: '#/components/schemas/JsConditionMatchRule' page_tag_page_type: '#/components/schemas/GenericTextMatchRule' page_tag_category_id: '#/components/schemas/GenericTextMatchRule' page_tag_category_name: '#/components/schemas/GenericTextMatchRule' page_tag_product_sku: '#/components/schemas/GenericTextMatchRule' page_tag_product_name: '#/components/schemas/GenericTextMatchRule' page_tag_product_price: '#/components/schemas/GenericNumericMatchRule' page_tag_customer_id: '#/components/schemas/GenericTextMatchRule' page_tag_custom_1: '#/components/schemas/GenericTextMatchRule' page_tag_custom_2: '#/components/schemas/GenericTextMatchRule' page_tag_custom_3: '#/components/schemas/GenericTextMatchRule' page_tag_custom_4: '#/components/schemas/GenericTextMatchRule' weather_condition: '#/components/schemas/WeatherConditionMatchRule' generic_text_key_value: '#/components/schemas/GenericTextKeyValueMatchRule' generic_numeric_key_value: '#/components/schemas/GenericNumericKeyValueMatchRule' generic_bool_key_value: '#/components/schemas/GenericBoolKeyValueMatchRule' visitor_id: '#/components/schemas/GenericTextMatchRule' visitor_data_exists: '#/components/schemas/VisitorDataExistsMatchRule' DayOfWeekMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithDayOfWeekValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/DayOfWeekMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/NumericMatchingOptions' LanguageMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithLanguageCodeValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/LanguageMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' SortDirection: type: object properties: sort_direction: type: string nullable: true default: desc description: 'The direction for sorting the list results, based on the `sort_by` field. - `asc`: Ascending order (e.g., A-Z, 1-10, oldest to newest). - `desc`: Descending order (e.g., Z-A, 10-1, newest to oldest). Defaults to `desc` (newest/highest first) if not specified. ' enum: - asc - desc SegmentBucketedMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithSegmentBucketedValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/SegmentBucketedMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' AudienceStatuses: type: string description: 'The status of an audience: - `active`: The audience is currently active and can be used for targeting experiences. - `archived`: The audience is no longer active and cannot be used for new experiences, but its definition and past usage data are preserved. Archived audiences can often be cloned. Knowledge Base: "Benefits of Archiving Unused Goals, Locations, and Audiences." ' enum: - active - archived AudienceCreate: oneOf: - $ref: '#/components/schemas/AudienceWithoutUrlMatchingCreate' - $ref: '#/components/schemas/AudienceWithUrlMatchingCreate' discriminator: propertyName: type mapping: permanent: '#/components/schemas/AudienceWithoutUrlMatchingCreate' segmentation: '#/components/schemas/AudienceWithUrlMatchingCreate' transient: '#/components/schemas/AudienceWithoutUrlMatchingCreate' AudiencesPresetsListResponseData: type: object description: Response containing a list of predefined audience templates (presets) available in the system. properties: data: $ref: '#/components/schemas/AudiencesPresetsList' AudienceIncludeFields: type: string enum: - rules - stats.experiences_usage AudienceTypesWithUrl: description: 'Defines the behavior for an audience that *includes* URL-based conditions in its rules. - `segmentation`: Once a visitor matches the audience criteria (which can include URL rules), they are tagged and permanently added to this segment. This segment membership persists across sessions and can be used for long-term targeting or analysis. URL rules are evaluated to determine initial entry into the segment. Knowledge Base: "A segment basically allows a visitor to qualify for an audience on subsequent visits even if they do not meet the audience conditions." ' type: string enum: - segmentation GoalTriggeredMatchRulesTypes: type: string enum: - goal_triggered UpdateAudienceRequestData: $ref: '#/components/schemas/Audience' AudienceTypesNoUrl: description: 'Defines the behavior and persistence of an audience that does *not* use URL-based conditions in its rules. - `permanent`: Once a visitor matches the audience criteria, they are permanently considered part of this audience for future sessions and evaluations, even if their characteristics change later. The matching is checked only at the initial bucketing time. - `transient`: A visitor must match the audience criteria upon each evaluation (e.g., on every page load or when an experiment is rechecked) to be included. If conditions are no longer met, the visitor is no longer part of the audience for that specific evaluation. For Full Stack projects, only `transient` and `segmentation` (if applicable without URL rules) are valid. ' type: string enum: - permanent - transient AudienceWithUrlMatchingCreate: required: - name - rules - type allOf: - $ref: '#/components/schemas/AudienceWithUrlMatching' BaseRuleWithOsValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: Operating System name used for matching type: string enum: - android - iphone - ipod - ipad - windows - macos - linux VisitorTypeMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithVisitorTypeValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/VisitorTypeMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' AudiencesPresetsList: type: array description: A list of audience preset objects. items: $ref: '#/components/schemas/AudiencePreset' TextMatchingOptions: type: string enum: - matches - regexMatches - contains - endsWith - startsWith GetAudiencesListRequestData: allOf: - $ref: '#/components/schemas/OnlyCount' - $ref: '#/components/schemas/AudiencesListFilteringOptions' - $ref: '#/components/schemas/PageNumber' - type: object properties: include: description: Specifies the list of fields to be included in the response, which otherwise would not be sent. type: array items: $ref: '#/components/schemas/AudienceIncludeFields' only: description: 'Only retrieve audiences with the given ids. ' type: array nullable: true items: type: integer maxItems: 100 except: description: 'Except audiences with the given ids. ' type: array items: type: integer maxItems: 100 AudienceBase: type: object properties: id: type: integer description: The unique numerical identifier for the audience. readOnly: true description: type: string description: An optional, more detailed explanation of the audience's purpose or criteria, aiding in identification and management. maxLength: 500 status: $ref: '#/components/schemas/AudienceStatuses' name: type: string description: A user-defined, friendly name for the audience (e.g., "New Visitors from USA", "Repeat Purchasers - Mobile"). This name appears in the Convert UI when selecting audiences for experiences. maxLength: 100 preset: type: boolean description: Indicates if this audience is a system-defined preset (e.g., "All Visitors", "Mobile Users"). Preset audiences cannot be modified directly but can be used as templates. readOnly: true selected_default: type: boolean description: If true, this audience will be automatically pre-selected when creating new experiences within the project. Useful for commonly targeted segments. stats: type: object readOnly: true description: Statistics related to the usage of this audience. properties: experiences_usage: description: 'The number of currently active experiences that are using this audience for targeting. This is an optional field, included if ''stats.experiences_usage'' is specified in the `include` parameter. ' type: number default: 0 GenericNumericMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithNumericValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/NumericMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/NumericMatchingOptions' BaseRuleWithHourOfDayValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: Hour of day used for matching type: number minimum: 0 maximum: 24 BaseRuleWithMinuteOfHourValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: Minute of hour used for matching type: number minimum: 1 maximum: 60 OsMatchRulesTypes: type: string enum: - os PageNumber: type: object properties: page: type: integer minimum: 1 description: 'The page number for paginated results. For example, if `results_per_page` is 30, `page: 2` will retrieve items 31-60. Defaults to 1 if not specified. ' AudienceWithoutUrlMatchingCreate: required: - name - rules - type allOf: - $ref: '#/components/schemas/AudienceWithoutUrlMatching' HourOfDayMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithHourOfDayValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/HourOfDayMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/NumericMatchingOptions' BaseRuleWithGoalTriggeredValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: ID of the goal used for matching type: number ChoiceMatchingOptions: type: string enum: - equals BaseRuleWithJsCodeValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: 'The JS code that would be executed when rule is checked. The return value of this JS code is what is gonna be matched against **true**(or **false** if **matching.negated = true** is provided) ' type: string CreateAudienceRequestData: $ref: '#/components/schemas/AudienceCreate' NumericMatchRulesTypes: type: string enum: - avg_time_page - days_since_last_visit - pages_visited_count - visit_duration - visits_count - page_tag_product_price AudienceTypes: type: string enum: - segmentation - permanent - transient AudienceWithoutUrlMatching: allOf: - $ref: '#/components/schemas/AudienceBase' - type: object properties: type: $ref: '#/components/schemas/AudienceTypesNoUrl' rules: nullable: true allOf: - $ref: '#/components/schemas/RuleObjectNoUrl' VisitorDataExistsMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithBooleanValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/VisitorDataExistsMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' GenericBoolKeyValueMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithBooleanValue' - type: object required: - rule_type properties: rule_type: $ref: '#/components/schemas/GenericBoolKeyValueMatchRulesTypes' matching: allOf: - $ref: '#/components/schemas/BaseMatch' - type: object properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' - $ref: '#/components/schemas/GenericKey' ResultsPerPage: type: object properties: results_per_page: type: integer nullable: true minimum: 0 maximum: 50 default: 30 description: 'Specifies the maximum number of items to return in a single page of results. Used for pagination. Default is 30, maximum is 50. ' BaseRuleWithBooleanValue: allOf: - $ref: '#/components/schemas/BaseRule' - type: object properties: value: description: The value used to match against 'rule_type' using 'matching' type: boolean requestBodies: GetAudiencesListRequest: content: application/json: schema: $ref: '#/components/schemas/GetAudiencesListRequestData' UpdateAudienceRequest: content: application/json: schema: $ref: '#/components/schemas/UpdateAudienceRequestData' required: true BulkUpdateAudiencesRequest: content: application/json: schema: $ref: '#/components/schemas/BulkUpdateAudienceRequestData' description: Contains a list of audience `id`s and the target `status` (e.g., 'active', 'archived') to apply to all of them. required: true BulkDeleteAudiencesRequest: content: application/json: schema: $ref: '#/components/schemas/BulkDeleteAudienceRequestData' CreateAudienceRequest: content: application/json: schema: allOf: - $ref: '#/components/schemas/CreateAudienceRequestData' required: true responses: ErrorResponse: description: 'Indicates an error occurred while processing the request. The `code` provides an HTTP status code, `message` offers a human-readable explanation or an array of validation errors, and `fields` (if present) specifies which input fields were problematic. ' content: application/json: schema: $ref: '#/components/schemas/ErrorData' AudienceResponse: description: Detailed information for a single audience, including its name, type, status, and the `rules` (visitor data, traffic source, cookie values, JS conditions) that define its criteria. content: application/json: schema: $ref: '#/components/schemas/Audience' AudiencesListResponse: description: A list of audiences defined within a project. Each audience entry includes its ID, name, type (permanent, transient, segmentation), status, and potentially usage statistics. Audiences define who sees an experience. content: application/json: schema: $ref: '#/components/schemas/AudiencesListResponseData' BulkSuccessResponse: description: 'Indicates the outcome of a bulk operation (e.g., bulk update or delete). Provides a general success `message` and an `errors` array listing any entities that could not be processed, along with the reason for failure for each. ' content: application/json: schema: $ref: '#/components/schemas/BulkSuccessData' SuccessResponse: description: 'A generic success response, typically used for operations that don''t return specific data (like deletions or some updates). The `code` is usually 200, and `message` confirms the successful action. ' content: application/json: schema: $ref: '#/components/schemas/SuccessData' AudiencesPresetsListResponse: description: A list of predefined audience templates (presets) provided by Convert, such as "New Visitors" or "Mobile Users," which can be used as a starting point for creating custom audiences. content: application/json: schema: $ref: '#/components/schemas/AudiencesPresetsListResponseData' securitySchemes: requestSigning: type: apiKey x-name-applicationId: Convert-Application-ID x-name-expire: Expire name: Authorization in: header description: 'See **[API Key Authentication](#tag/API-KEY-Authentication)** for more information. ' secretKey: type: http scheme: bearer description: 'See **[API Key Authentication](#tag/API-KEY-Authentication)** for more information. ' cookieAuthentication: type: apiKey in: cookie name: sid description: Cookie authentication is used against Convert's own IdentityProvider or third party identity providers and is described more in the "[Cookie Authentication](#tag/Cookie-Authentication)" section x-tagGroups: - name: Client Authentication tags: - API KEY Authentication - Cookie Authentication - OAuth Authorization - name: Common Parameters tags: - Optional Fields - Expandable Fields - name: Requests tags: - User - Accounts - AI content - Collaborators - API Keys - Projects - SDK Keys - Experiences - Experience Variations - Experience Sections - Section Versions - Version Changes - Experiences Reports - Experiences Heatmaps - Goals - Hypotheses - Knowledge Bases - Observations - Locations - Audiences - Domains - Cdn Images - Files - Tags - Features - Visitor Insights - Visitors Data - Visitor Data Placeholders - OAuth