RefineFilter
Create Refine Filter
Create a new RefineFilter in the workspace. The criteria array must contain at least one entry. Criteria are validated against the safe-condition whitelist — unsupported attributes/clauses return 422 with a pointer to the dev community. See the Refine Filters Skill for the full reference (attributes, clauses, worked examples).
post/workspaces/{workspace_id}/refine_filters
Path parameters
workspace_idinteger required
Request body
Example request
{
"refine_filter": {
"name": "VIP newsletter audience",
"filter_class": "ContactsFilter",
"conjunction": "and",
"criteria": [
{
"attribute": "tags.id",
"clause": "in",
"value": [
"tag-pub-id-1",
"tag-pub-id-2"
]
},
{
"attribute": "purchased_products.id",
"clause": "equals",
"value": "prod-pub-id"
},
{
"attribute": "created_at",
"clause": "gte",
"value": "2026-01-01T00:00:00Z"
}
]
}
}Response
Created
Example response
{
"id": 42,
"public_id": "AbCdEf",
"workspace_id": 5,
"name": "VIP newsletter audience",
"filter_class": "ContactsFilter",
"conjunction": "and",
"criteria": [
{
"attribute": "tags.id",
"clause": "in",
"value": [
"tag-pub-id-1"
]
},
{
"attribute": "created_at",
"clause": "gte",
"value": "2026-01-01"
}
],
"created_at": "2026-04-01T12:00:00.000Z",
"updated_at": "2026-04-01T12:00:00.000Z"
}