Creates an audience for an experience. The experience must belong to the member group, otherwise 404. A GUID (UUID) is generated by the server. The audience is created unpublished: published is false, status is inactive, audience_count is null and synced_with_databricks is false. It cannot be targeted until POST .../audiences/{audienceId}/publish is called. The audience name must be unique among the experience's non-deleted audiences (exact, case-sensitive comparison). Returns 201 with the new audience_id. The request body is limited to 1 MiB. Requires the audience_builder_management permission (create). The caller's own member group must match memberGroupId unless the caller belongs to the Koddi member group (id 1), otherwise 403. Granted to Super Admin, Internal Admin and Client Admin by the migration that created the permission. Only available when the is-audience-builder-enabled feature flag is on for the caller; otherwise 404.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Creates an audience for an experience. The server generates the audience GUID. The new audience is unpublished (published false, status inactive, no audience_count) and cannot be targeted until you call the publish endpoint. The audience name must be unique among the experience's non-deleted audiences, compared exactly (case-sensitive). The request body is limited to 1 MiB.
Callers need the audience builder permission (create), which the Super Admin, Internal Admin and Client Admin roles have. The caller's member group must match memberGroupId unless the caller belongs to the Koddi member group. The endpoint is only available when the audience builder feature is enabled for the caller.
Inputs
| Field | Type | Description | Required |
| memberGroupId | integer (path) | The member group id (provided by Koddi) | Yes |
| experienceId | integer (path) | The experience ID | Yes |
| audience_name | string | The audience name, 1 to 256 characters, unique among the experience's non-deleted audiences. | Yes |
| audience_description | string | Description, up to 1024 characters. | No |
| audience_criteria | object | The rule that defines the audience. | Yes |
| audience_criteria.action_count | integer | Number of actions to compare against. Must be greater than 0. | Yes |
| audience_criteria.action_comparison | string | One of >, >=, ==, <=, <. |
Yes |
| audience_criteria.action_type | string | One of impression, click, conversion. |
Yes |
| audience_criteria.lookback_window | integer | Lookback window in days, 1 to 60. | Yes |
| audience_criteria.product_feed_attr | object | Optional product feed attribute filter. | No |
| audience_criteria.product_feed_attr.attribute_id | integer | The attribute ID. Must be an attribute of the member group. | Yes, when product_feed_attr is sent |
| audience_criteria.product_feed_attr.attribute_value | string | The attribute value, 1 to 256 characters. | Yes, when product_feed_attr is sent |
Response
Returns HTTP 201 with {"status": "success", "result": {"audience_id": ...}}.
| Field | Type | Description |
| audience_id | integer | The ID of the new audience. |

