API reference
Segments
Preview, create, list, pause and delete segments.
A segment is a saved rule over metrics. See Segments for how to write the predicate.
Preview a segment#
Validates a rule and counts who would match, without saving anything. Good for live previews in a rule editor.
Body
workspace_id string predicate object curl -X POST "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/segments/preview" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN" -H "Content-Type: application/json" \
-d '{
"workspace_id": "my-store",
"predicate": { "metric": "total_spend", "op": "gte", "value": 10000 }
}'{
"matching_customers": 3,
"matching_breakdown": { "customers": 2, "visitors": 1 },
"workspace_members": 15,
"workspace_customers": 11,
"workspace_visitors": 4,
"truncated": false,
"is_temporal": false
}Matches are counted over at most 20,000 profiles. truncated: true means the counts are a lower bound. The workspace_* totals are always exact.
Create a segment#
Creates a segment. Create-only: returns 409 if the id exists.
Body
workspace_id string Requireddisplay_name string Requiredpredicate object Requiredstatus string draft, active (default), paused or archived.automations object {"on_enter": true, "on_exit": true, "on_backfill": false}.curl -X PUT "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/segments/vip-customers" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN" -H "Content-Type: application/json" \
-d '{
"workspace_id": "my-store",
"display_name": "VIP customers",
"predicate": { "metric": "total_spend", "op": "gte", "value": 10000 }
}'{
"tenant_id": "breeze",
"segment_id": "vip-customers",
"is_temporal": false,
"status": "created"
}List segments#
Lists segments with live member counts.
Query
workspace_id string limit number cursor string next_cursor from the previous page.curl "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/segments?workspace_id=my-store&limit=100" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN"{
"segments": [
{
"workspace_id": "my-store",
"segment_id": "vip-customers",
"display_name": "VIP customers",
"predicate": { "metric": "total_spend", "op": "gte", "value": 10000 },
"is_temporal": false,
"status": "active",
"automations": { "on_enter": true, "on_exit": true, "on_backfill": false },
"created_at": "2026-10-08T09:00:00Z",
"member_count": 12,
"segment_customers": 9,
"segment_visitors": 3
}
],
"next_cursor": null
}Get a segment#
Returns one segment, in the same shape as List segments without the counts.
Query
workspace_id string curl "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/segments/vip-customers/definition?workspace_id=my-store" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN"Update segment status#
Changes the status, the only field that can change after creation.
Body
workspace_id string status string draft, active, paused or archived.curl -X PUT "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/segments/vip-customers/status" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN" -H "Content-Type: application/json" \
-d '{"workspace_id": "my-store", "status": "paused"}'Delete a segment#
Deletes a segment definition. Use it for mistakes. For normal retirement, prefer status: "archived".
Query
workspace_id string curl -X DELETE "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/segments/vip-customers?workspace_id=my-store" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN"