post
https://platform.{env}.simpplr.com/v1/b2b/identity/audiences
This API allows you to create a new audience
Note:
parentId, categoryId, or categoryName are only supported for tenants where ABAC is enabled
Example 1: Segment with IS_NOT operator
"name": "date type auidence",
"type": "mixed",
"rule": {
"AND": [
{
"AND": [
{
"values": [
{
"label": "date",
"value": "2025-11-21"
}
],
"attribute": "start_date",
"operator": "ON",
"fieldType": "regular"
},
{
"values": [
{
"label": "date",
"value": "2025-11-21"
}
],
"attribute": "start_date",
"operator": "ON_OR_BEFORE",
"fieldType": "regular"
},
{
"values": [
{
"label": "date",
"value": "2025-11-21"
}
],
"attribute": "start_date",
"operator": "ON_OR_AFTER",
"fieldType": "regular"
},
{
"values": [
{
"label": "date",
"value": "2025-11-21"
}
],
"attribute": "start_date",
"operator": "BEFORE",
"fieldType": "regular"
},
{
"values": [
{
"label": "date",
"value": "2025-11-21"
}
],
"attribute": "start_date",
"operator": "AFTER",
"fieldType": "regular"
}
]
},
{
"AND": [
{
"values": [
{
"label": "startDate",
"value": "2025-11-21"
},
{
"label": "endDate",
"value": "2025-11-21"
}
],
"attribute": "start_date",
"operator": "BETWEEN",
"fieldType": "regular"
}
]
}
]
},
"sourceType": "app_managed",
"categoryId": "57cc74a4-c059-428d-914c-caa4eba702a2"
} ```
**Example 2: User ID with IS operator and First Name/Last Name with CONTAINS/STARTS_WITH**
``` {
"name": "Audience with user ID and name filters",
"type": "mixed",
"rule": {
"AND": [
{
"AND": [
{
"values": [
{
"value": "85dcc783-6afd-4871-9ad6-637abb29841b"
},
{
"value": "0c6fa051-c4f8-4a1d-9636-7da661e11c97"
}
],
"attribute": "userId",
"operator": "IS",
"fieldType": "regular"
}
]
},
{
"AND": [
{
"values": [
{
"value": "abc"
}
],
"attribute": "firstName",
"operator": "CONTAINS",
"fieldType": "regular"
},
{
"values": [
{
"value": "Cena"
}
],
"attribute": "lastName",
"operator": "STARTS_WITH",
"fieldType": "regular"
}
]
}
]
},
"sourceType": "app_managed",
"parentId": "39437d92-9be0-4a25-8543-55bdab74df4e"
} ```
**Example 3: Start Date with BEFORE/ON_OR_BEFORE and Is Manager with IS (with OR condition)**
``` {
"name": "Audience with date and manager filters",
"type": "mixed",
"rule": {
"AND": [
{
"AND": [
{
"values": [
{
"value": "2025-11-07"
}
],
"attribute": "startDate",
"operator": "BEFORE",
"fieldType": "regular"
}
]
},
{
"OR": [
{
"values": [
{
"value": "True"
}
],
"attribute": "isManager",
"operator": "IS",
"fieldType": "regular"
},
{
"values": [
{
"value": "2026-11-19"
}
],
"attribute": "startDate",
"operator": "ON_OR_BEFORE",
"fieldType": "regular"
}
]
}
]
},
"sourceType": "app_managed",
"categoryId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
} ```
**Example 4: City and Country Name with various operators**
``` {
"name": "Audience with location filters",
"type": "mixed",
"rule": {
"AND": [
{
"AND": [
{
"values": [
{
"value": "Cha"
}
],
"attribute": "city",
"operator": "STARTS_WITH",
"fieldType": "regular"
},
{
"values": [
{
"value": "Chandigarh"
}
],
"attribute": "city",
"operator": "IS_NOT",
"fieldType": "regular"
},
{
"values": [
{
"value": "India"
}
],
"attribute": "country",
"operator": "IS",
"fieldType": "regular"
}
]
}
]
},
"sourceType": "app_managed",
"categoryName": "Marketing Team"
} ```
**Example 5: Custom Field with CONTAINS operator**
``` {
"name": "Audience with custom field filter",
"type": "mixed",
"rule": {
"AND": [
{
"AND": [
{
"values": [
{
"value": "udaipur"
}
],
"attribute": "city__c",
"operator": "CONTAINS",
"fieldType": "regular"
}
]
}
]
},
"sourceType": "app_managed",
"parentId": "39437d92-9be0-4a25-8543-55bdab74df4e"
} ```
**Example 6: Multiple attribute with multiple operator**
``` {
"name": "Testing audience",
"type": "mixed",
"rule": {
"AND": [
{
"OR": [
{
"values": [
{
"value": "84c542ac-6fdf-4d37-8788-b0c4546eb9fa"
}
],
"attribute": "userId",
"operator": "IS",
"fieldType": "regular"
},
{
"values": [
{
"value": "sim"
}
],
"attribute": "firstName",
"operator": "CONTAINS",
"fieldType": "regular"
},
{
"values": [
{
"value": "CDX Tech"
}
],
"attribute": "businessUnit",
"operator": "IS_NOT",
"fieldType": "regular"
}
]
},
{
"AND": [
{
"values": [
{
"value": "True"
}
],
"attribute": "isManager",
"operator": "IS",
"fieldType": "regular"
}
]
},
{
"AND": [
{
"values": [
{
"value": "add on name"
}
],
"attribute": "office_loc__c",
"operator": "IS",
"fieldType": "regular"
}
]
}
]
},
"sourceType": "app_managed",
"parentId": "39437d92-9be0-4a25-8543-55bdab74df4e"
} ```
**Example 7: Business Unit, Company Name, State, Custom Field, and Title with various operators**
``` {
"name": "Audience with business unit, company, location and custom field filters",
"type": "mixed",
"rule": {
"AND": [
{
"AND": [
{
"values": [
{
"value": "CDX Tech"
},
{
"value": "bus-unit-1"
}
],
"attribute": "businessUnit",
"operator": "IS",
"fieldType": "regular"
},
{
"values": [
{
"value": "Simpplr Company"
}
],
"attribute": "companyName",
"operator": "IS_NOT",
"fieldType": "regular"
}
]
},
{
"AND": [
{
"values": [
{
"value": "abc"
}
],
"attribute": "state",
"operator": "CONTAINS",
"fieldType": "regular"
},
{
"values": [
{
"value": "test"
}
],
"attribute": "department__c",
"operator": "STARTS_WITH",
"fieldType": "regular"
},
{
"values": [
{
"value": "analyst"
}
],
"attribute": "title",
"operator": "ENDS_WITH",
"fieldType": "regular"
}
]
}
]
},
"sourceType": "app_managed",
"categoryId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
} ```