Create customer segment
POST/customer360/segments
Creates a new customer segment with rule-based membership criteria. Segments start in 'draft' status. Call the activate endpoint to compute membership and set the segment live for use in journeys and campaigns.
Request
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Segment display name (e.g. "Enterprise Fintech"). Max length: 180 |
description | string, nullable | No | Human-readable description of who is in this segment. Max length: 2000 |
status | string | No | Lifecycle status. Use 'draft' until rules are finalised. One of: |
rules_json | string, nullable | No | JSON array of rule objects. Each rule contains 'field', 'operator', and 'value' keys. All rules are ANDed together for membership evaluation. |
Example
{
"name": "Enterprise Fintech",
"description": "All enterprise-tier customers in the fintech industry.",
"status": "draft",
"rules_json": "[{\"field\":\"attributes.tier\",\"operator\":\"equals\",\"value\":\"enterprise\"},{\"field\":\"attributes.industry\",\"operator\":\"equals\",\"value\":\"fintech\"}]"
}
Responses
302 Redirect to segments list after creation
422 Validation error — name is required
Example request
curl -X POST "https://{tenant}.faciotech.net/api/v1/customer360/segments" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name": "Enterprise Fintech", "description": "All enterprise-tier customers in the fintech industry.", "status": "draft", "rules_json": "[{\"field\":\"attributes.tier\",\"operator\":\"equals\",\"value\":\"enterprise\"},{\"field\":\"attributes.industry\",\"operator\":\"equals\",\"value\":\"fintech\"}]"}'