Segments
Create a segment
Create an ACTIVE or STATIC CRM segment in the tenant and project derived from the access token.
Overview
Use this endpoint to create a CRM segment for one supported object type. ACTIVE segments require a filters payload. STATIC segments can be created without filters, and if filters are supplied, member resolution runs during creation. The public segment create flow routes by the segment objectType and reuses the shared BAU segment engine instead of a separate public-only implementation. It requires public api oauth access token authentication and the crm.segments.write scope.
/api/segmentscURL
POSTcurl --request POST \ --url 'https://crm.notifyy.io/api/segments' \ --header 'Authorization: Bearer nfy_public_api_access_token' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "name": "High value contacts", "objectType": "contact", "segmentType": "ACTIVE", "description": "Segment for high intent contacts", "filters": { "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 101, "property": "lifecyclestage", "operator": "equals", "value": "customer" }, { "propertyId": 102, "property": "created_ts", "operator": "LAST_N_DAYS", "value": "30" } ] } ] }}'Sample Request Body
{ "name": "High value contacts", "objectType": "contact", "segmentType": "ACTIVE", "description": "Segment for high intent contacts", "filters": { "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 101, "property": "lifecyclestage", "operator": "equals", "value": "customer" }, { "propertyId": 102, "property": "created_ts", "operator": "LAST_N_DAYS", "value": "30" } ] } ] }}Additional Examples
Equality filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 101, "property": "lifecyclestage", "operator": "EQUALS", "value": "customer" } ] } ]}Numeric comparison filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 201, "property": "amount", "operator": "GT", "value": "1000" } ] } ]}String contains filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 301, "property": "email", "operator": "CONTAINS", "value": "@notifyy.io" } ] } ]}IN list matching filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 401, "property": "status", "operator": "IN", "values": [ "OPEN", "WON", "QUALIFIED" ] } ] } ]}BETWEEN range filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 501, "property": "amount", "operator": "BETWEEN", "from": 100, "to": 500 } ] } ]}BETWEEN using legacy values array
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 502, "property": "amount", "operator": "BETWEEN", "values": [ "100", "500" ] } ] } ]}Null check filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 601, "property": "phone", "operator": "IS_NULL" } ] } ]}Boolean convenience filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 701, "property": "is_active", "operator": "IS_TRUE" } ] } ]}Relative date filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 801, "property": "created_ts", "operator": "LAST_N_DAYS", "value": "30" } ] } ]}Recurring date filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 802, "property": "renewal_date", "operator": "RECURS_MONTHS_AFTER", "value": "1" } ] } ]}Multi-select array filter
{ "logic": "AND", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 901, "property": "tags", "operator": "HAS_ALL", "values": [ "vip", "newsletter" ] } ] } ]}OR across groups filter
{ "logic": "OR", "groups": [ { "logic": "AND", "filters": [ { "propertyId": 101, "property": "lifecyclestage", "operator": "EQ", "value": "customer" } ] }, { "logic": "AND", "filters": [ { "propertyId": 102, "property": "email", "operator": "CONTAINS", "value": "@notifyy.io" } ] } ]}Sample Response
{ "success": true, "message": "Segment created successfully", "data": { "id": 999, "name": "High value contacts", "objectType": "contact", "segmentType": "ACTIVE", "description": "Segment for high intent contacts", "currentVersion": 1, "createdAt": "2026-08-01T09:15:30Z", "updatedAt": "2026-08-01T09:15:30Z" }}Status Codes
| Code | Description |
|---|---|
| 201 | Segment was created. |
| 400 | Request body is invalid, objectType is unsupported, filters is missing for ACTIVE segments, or a filter payload does not match the current public contract. |
| 401 | Public API access token is missing, invalid, expired, or revoked. |
Headers
Public API OAuth bearer token.
Example: Bearer nfy_public_api_access_token
Request body media type.
Example: application/json
Expected response media type.
Example: application/json
| Object | Description |
|---|---|
Authorization string | RequiredPublic API OAuth bearer token. Example: Bearer nfy_public_api_access_token |
Content-Type string | RequiredRequest body media type. Example: application/json |
Accept string | RequiredExpected response media type. Example: application/json |
Request body
Segment name. Duplicate names within the same tenant, project, and object type are rejected.
Example: High value contacts
Lowercase CRM object type. Only object types wired into the current segment filter execution context are supported.
Example: contact
Segment type. Supported values are ACTIVE and STATIC.
Example: ACTIVE
Free-text segment description.
Example: Segment for high intent contacts
Filter definition for dynamic segment membership. Required for ACTIVE segments and optional for STATIC segments.
Top-level group combiner. Supported values are AND and OR.
Example: AND
One or more filter groups.
Per-group combiner. Supported values are AND and OR. Defaults to AND in execution if omitted.
Example: AND
Individual filter conditions.
Optional object hint field exposed by the BAU DTO. The public create flow routes by the segment objectType rather than this field.
Property ID used for property accessibility validation.
Example: 101
Property internal name or hot-field name.
Example: lifecyclestage
Filter operator. Accepted canonical operators and aliases are documented in the operator matrix below.
Example: EQUALS
Single comparison value used by single-value operators such as EQ, GT, CONTAINS, and LAST_N_DAYS.
Example: customer
Multi-value list used by operators such as IN, NOT_IN, CONTAINS_ANY, and HAS_ALL.
Example: ["OPEN","WON","QUALIFIED"]
Lower bound for BETWEEN and NOT_BETWEEN.
Example: 100
Upper bound for BETWEEN and NOT_BETWEEN.
Example: 500
| Object | Description |
|---|---|
name string | RequiredSegment name. Duplicate names within the same tenant, project, and object type are rejected. Example: High value contacts |
objectType string | RequiredLowercase CRM object type. Only object types wired into the current segment filter execution context are supported. Example: contact |
segmentType string | RequiredSegment type. Supported values are ACTIVE and STATIC. Example: ACTIVE |
description string | OptionalFree-text segment description. Example: Segment for high intent contacts |
filters object | RequiredFilter definition for dynamic segment membership. Required for ACTIVE segments and optional for STATIC segments. |
filters.logic string | RequiredTop-level group combiner. Supported values are AND and OR. Example: AND |
filters.groups object[] | RequiredOne or more filter groups. |
filters.groups[].logic string | OptionalPer-group combiner. Supported values are AND and OR. Defaults to AND in execution if omitted. Example: AND |
filters.groups[].filters object[] | RequiredIndividual filter conditions. |
filters.groups[].filters[].object string | OptionalOptional object hint field exposed by the BAU DTO. The public create flow routes by the segment objectType rather than this field. |
filters.groups[].filters[].propertyId integer | RequiredProperty ID used for property accessibility validation. Example: 101 |
filters.groups[].filters[].property string | RequiredProperty internal name or hot-field name. Example: lifecyclestage |
filters.groups[].filters[].operator string | RequiredFilter operator. Accepted canonical operators and aliases are documented in the operator matrix below. Example: EQUALS |
filters.groups[].filters[].value scalar | OptionalSingle comparison value used by single-value operators such as EQ, GT, CONTAINS, and LAST_N_DAYS. Example: customer |
filters.groups[].filters[].values array | OptionalMulti-value list used by operators such as IN, NOT_IN, CONTAINS_ANY, and HAS_ALL. Example: ["OPEN","WON","QUALIFIED"] |
filters.groups[].filters[].from scalar | OptionalLower bound for BETWEEN and NOT_BETWEEN. Example: 100 |
filters.groups[].filters[].to scalar | OptionalUpper bound for BETWEEN and NOT_BETWEEN. Example: 500 |
Supported Object Types
The current segment filter execution path is wired only for the object types listed here. objectType must be lowercase.
Object Type
contact
Support Notes
Supported by the current public segment filter execution path.
Object Type
company
Support Notes
Supported by the current public segment filter execution path.
Object Type
deal
Support Notes
Supported by the current public segment filter execution path.
Object Type
ticket
Support Notes
Supported by the current public segment filter execution path.
Object Type
appointment
Support Notes
Supported by the current public segment filter execution path.
Object Type
meeting
Support Notes
Supported by the current public segment filter execution path.
Object Type
product
Support Notes
Supported by the current public segment filter execution path.
Object Type
order
Support Notes
Supported by the current public segment filter execution path.
Object Type
lead
Support Notes
Supported by the current public segment filter execution path.
Object Type
payment
Support Notes
Supported by the current public segment filter execution path.
Object Type
call
Support Notes
Supported by the current public segment filter execution path.
| Object Type | Support Notes |
|---|---|
| contact | Supported by the current public segment filter execution path. |
| company | Supported by the current public segment filter execution path. |
| deal | Supported by the current public segment filter execution path. |
| ticket | Supported by the current public segment filter execution path. |
| appointment | Supported by the current public segment filter execution path. |
| meeting | Supported by the current public segment filter execution path. |
| product | Supported by the current public segment filter execution path. |
| order | Supported by the current public segment filter execution path. |
| lead | Supported by the current public segment filter execution path. |
| payment | Supported by the current public segment filter execution path. |
| call | Supported by the current public segment filter execution path. |
Supported Segment Types
ACTIVE and STATIC have different filter requirements during create.
Segment Type
ACTIVE
Behavior
filters is required.
Segment Type
STATIC
Behavior
filters is optional. If filters is supplied, member resolution runs during creation.
| Segment Type | Behavior |
|---|---|
| ACTIVE | filters is required. |
| STATIC | filters is optional. If filters is supplied, member resolution runs during creation. |
Filter Operator Matrix
These are the canonical operators explicitly documented in the current segment create flow. Common aliases listed here are accepted by the shared BAU executor.
Operator
EQ
Accepted Aliases
IS, EQUALS, ON
Payload Field(s)
value
Functionality
Matches records where the field equals the supplied value.
Operator
NEQ
Accepted Aliases
NOT_EQUALS, NOT_EQUAL
Payload Field(s)
value
Functionality
Matches records where the field does not equal the supplied value.
Operator
GT
Accepted Aliases
GREATER_THAN, AFTER
Payload Field(s)
value
Functionality
Matches records where the field is greater than the supplied value.
Operator
GTE
Accepted Aliases
GREATER_THAN_OR_EQUAL
Payload Field(s)
value
Functionality
Matches records where the field is greater than or equal to the supplied value.
Operator
LT
Accepted Aliases
LESS_THAN, BEFORE
Payload Field(s)
value
Functionality
Matches records where the field is less than the supplied value.
Operator
LTE
Accepted Aliases
LESS_THAN_OR_EQUAL
Payload Field(s)
value
Functionality
Matches records where the field is less than or equal to the supplied value.
Operator
IN
Accepted Aliases
None
Payload Field(s)
values
Functionality
Matches records where the field equals any value in the provided list.
Operator
NOT_IN
Accepted Aliases
None
Payload Field(s)
values
Functionality
Matches records where the field does not equal any value in the provided list.
Operator
CONTAINS
Accepted Aliases
None
Payload Field(s)
value
Functionality
Case-insensitive substring match.
Operator
NOT_CONTAINS
Accepted Aliases
DOES_NOT_CONTAIN
Payload Field(s)
value
Functionality
Case-insensitive negative substring match.
Operator
STARTS_WITH
Accepted Aliases
BEGINS_WITH
Payload Field(s)
value
Functionality
Case-insensitive prefix match.
Operator
NOT_STARTS_WITH
Accepted Aliases
DOES_NOT_BEGIN_WITH
Payload Field(s)
N/A in current strategy set
Functionality
Alias is normalized by the executor, but there is no corresponding strategy implementation in the current filter registry.
Operator
ENDS_WITH
Accepted Aliases
None
Payload Field(s)
value
Functionality
Case-insensitive suffix match.
Operator
CONTAINS_ANY
Accepted Aliases
None
Payload Field(s)
values or value
Functionality
Case-insensitive substring match against any supplied candidate.
Operator
NOT_CONTAINS_ANY
Accepted Aliases
None
Payload Field(s)
values or value
Functionality
Case-insensitive negative substring match against all supplied candidates.
Operator
STARTS_WITH_ANY
Accepted Aliases
None
Payload Field(s)
values or value
Functionality
Case-insensitive prefix match against any supplied candidate.
Operator
ENDS_WITH_ANY
Accepted Aliases
None
Payload Field(s)
values or value
Functionality
Case-insensitive suffix match against any supplied candidate.
Operator
IS_NULL
Accepted Aliases
IS_EMPTY, NO_VALUE
Payload Field(s)
none
Functionality
Matches records where the field is null or not present.
Operator
IS_NOT_NULL
Accepted Aliases
IS_NOT_EMPTY, HAS_VALUE
Payload Field(s)
none
Functionality
Matches records where the field exists or has a value.
Operator
NOT_HAS_PROPERTY
Accepted Aliases
None
Payload Field(s)
none
Functionality
Matches records where the field row is absent in the EAV store.
Operator
BETWEEN
Accepted Aliases
None
Payload Field(s)
from and to, or legacy values[0..1]
Functionality
Matches records where the field falls inside the supplied range.
Operator
NOT_BETWEEN
Accepted Aliases
None
Payload Field(s)
from and to, or legacy values[0..1]
Functionality
Matches records where the field falls outside the supplied range.
Operator
EQ_ALL
Accepted Aliases
None
Payload Field(s)
values
Functionality
Matches multi-select fields containing all supplied values.
Operator
NEQ_ALL
Accepted Aliases
None
Payload Field(s)
values
Functionality
Matches multi-select fields whose array value is not equal to the supplied set.
Operator
HAS_ALL
Accepted Aliases
None
Payload Field(s)
values
Functionality
Matches multi-select fields that contain all supplied values.
Operator
NOT_HAS_ALL
Accepted Aliases
None
Payload Field(s)
values
Functionality
Matches multi-select fields that do not contain all supplied values.
Operator
IS_TRUE
Accepted Aliases
None
Payload Field(s)
none
Functionality
Convenience boolean operator normalized to equality with true.
Operator
IS_FALSE
Accepted Aliases
None
Payload Field(s)
none
Functionality
Convenience boolean operator normalized to equality with false.
Operator
IS_TODAY
Accepted Aliases
None
Payload Field(s)
none
Functionality
Matches date or datetime fields whose date value is today.
Operator
WAS_YESTERDAY
Accepted Aliases
None
Payload Field(s)
none
Functionality
Matches date or datetime fields whose date value was yesterday.
Operator
IS_TOMORROW
Accepted Aliases
None
Payload Field(s)
none
Functionality
Matches date or datetime fields whose date value is tomorrow.
Operator
LAST_N_DAYS
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches date or datetime fields falling within the last N days, inclusive of today.
Operator
NEXT_N_DAYS
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches date or datetime fields falling within the next N days, inclusive of today.
Operator
UPDATED_IN_LAST
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches EAV-backed fields updated within the last N days.
Operator
NOT_UPDATED_IN_LAST
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches EAV-backed fields not updated within the last N days.
Operator
RECURS_TODAY
Accepted Aliases
None
Payload Field(s)
none
Functionality
Matches date or datetime fields whose month and day equal today, ignoring year.
Operator
RECURS_DAYS_BEFORE
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches month/day values equal to N days before today, ignoring year.
Operator
RECURS_WEEKS_BEFORE
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches month/day values equal to N weeks before today, ignoring year.
Operator
RECURS_MONTHS_BEFORE
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches month/day values equal to N months before today, ignoring year.
Operator
RECURS_DAYS_AFTER
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches month/day values equal to N days after today, ignoring year.
Operator
RECURS_WEEKS_AFTER
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches month/day values equal to N weeks after today, ignoring year.
Operator
RECURS_MONTHS_AFTER
Accepted Aliases
None
Payload Field(s)
value
Functionality
Matches month/day values equal to N months after today, ignoring year.
Operator
ROLLING_DATE_RANGE
Accepted Aliases
None
Payload Field(s)
Not exposed by current public DTO
Functionality
Exists in the shared filter engine, but the current public segment request DTO does not expose the rollingDate payload required to use it.
| Operator | Accepted Aliases | Payload Field(s) | Functionality |
|---|---|---|---|
| EQ | IS, EQUALS, ON | value | Matches records where the field equals the supplied value. |
| NEQ | NOT_EQUALS, NOT_EQUAL | value | Matches records where the field does not equal the supplied value. |
| GT | GREATER_THAN, AFTER | value | Matches records where the field is greater than the supplied value. |
| GTE | GREATER_THAN_OR_EQUAL | value | Matches records where the field is greater than or equal to the supplied value. |
| LT | LESS_THAN, BEFORE | value | Matches records where the field is less than the supplied value. |
| LTE | LESS_THAN_OR_EQUAL | value | Matches records where the field is less than or equal to the supplied value. |
| IN | None | values | Matches records where the field equals any value in the provided list. |
| NOT_IN | None | values | Matches records where the field does not equal any value in the provided list. |
| CONTAINS | None | value | Case-insensitive substring match. |
| NOT_CONTAINS | DOES_NOT_CONTAIN | value | Case-insensitive negative substring match. |
| STARTS_WITH | BEGINS_WITH | value | Case-insensitive prefix match. |
| NOT_STARTS_WITH | DOES_NOT_BEGIN_WITH | N/A in current strategy set | Alias is normalized by the executor, but there is no corresponding strategy implementation in the current filter registry. |
| ENDS_WITH | None | value | Case-insensitive suffix match. |
| CONTAINS_ANY | None | values or value | Case-insensitive substring match against any supplied candidate. |
| NOT_CONTAINS_ANY | None | values or value | Case-insensitive negative substring match against all supplied candidates. |
| STARTS_WITH_ANY | None | values or value | Case-insensitive prefix match against any supplied candidate. |
| ENDS_WITH_ANY | None | values or value | Case-insensitive suffix match against any supplied candidate. |
| IS_NULL | IS_EMPTY, NO_VALUE | none | Matches records where the field is null or not present. |
| IS_NOT_NULL | IS_NOT_EMPTY, HAS_VALUE | none | Matches records where the field exists or has a value. |
| NOT_HAS_PROPERTY | None | none | Matches records where the field row is absent in the EAV store. |
| BETWEEN | None | from and to, or legacy values[0..1] | Matches records where the field falls inside the supplied range. |
| NOT_BETWEEN | None | from and to, or legacy values[0..1] | Matches records where the field falls outside the supplied range. |
| EQ_ALL | None | values | Matches multi-select fields containing all supplied values. |
| NEQ_ALL | None | values | Matches multi-select fields whose array value is not equal to the supplied set. |
| HAS_ALL | None | values | Matches multi-select fields that contain all supplied values. |
| NOT_HAS_ALL | None | values | Matches multi-select fields that do not contain all supplied values. |
| IS_TRUE | None | none | Convenience boolean operator normalized to equality with true. |
| IS_FALSE | None | none | Convenience boolean operator normalized to equality with false. |
| IS_TODAY | None | none | Matches date or datetime fields whose date value is today. |
| WAS_YESTERDAY | None | none | Matches date or datetime fields whose date value was yesterday. |
| IS_TOMORROW | None | none | Matches date or datetime fields whose date value is tomorrow. |
| LAST_N_DAYS | None | value | Matches date or datetime fields falling within the last N days, inclusive of today. |
| NEXT_N_DAYS | None | value | Matches date or datetime fields falling within the next N days, inclusive of today. |
| UPDATED_IN_LAST | None | value | Matches EAV-backed fields updated within the last N days. |
| NOT_UPDATED_IN_LAST | None | value | Matches EAV-backed fields not updated within the last N days. |
| RECURS_TODAY | None | none | Matches date or datetime fields whose month and day equal today, ignoring year. |
| RECURS_DAYS_BEFORE | None | value | Matches month/day values equal to N days before today, ignoring year. |
| RECURS_WEEKS_BEFORE | None | value | Matches month/day values equal to N weeks before today, ignoring year. |
| RECURS_MONTHS_BEFORE | None | value | Matches month/day values equal to N months before today, ignoring year. |
| RECURS_DAYS_AFTER | None | value | Matches month/day values equal to N days after today, ignoring year. |
| RECURS_WEEKS_AFTER | None | value | Matches month/day values equal to N weeks after today, ignoring year. |
| RECURS_MONTHS_AFTER | None | value | Matches month/day values equal to N months after today, ignoring year. |
| ROLLING_DATE_RANGE | None | Not exposed by current public DTO | Exists in the shared filter engine, but the current public segment request DTO does not expose the rollingDate payload required to use it. |
Filter Value Guidance
Use only the payload fields documented for each operator family. For null and presence operators, do not send value, values, from, or to.
Operator Family
Single-value equality / comparison
Operators
EQ, NEQ, GT, GTE, LT, LTE
Expected Request Field(s)
value
Notes
Numeric strings are parsed as numbers when applicable. Date strings in yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss... format are routed as dates.
Operator Family
List matching
Operators
IN, NOT_IN
Expected Request Field(s)
values
Notes
Values are compared case-insensitively for string fields.
Operator Family
String pattern
Operators
CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH, CONTAINS_ANY, NOT_CONTAINS_ANY, STARTS_WITH_ANY, ENDS_WITH_ANY
Expected Request Field(s)
value or values
Notes
Pattern operators keep numeric-looking strings as strings, for example phone suffix matching.
Operator Family
Null / presence
Operators
IS_NULL, IS_NOT_NULL, NOT_HAS_PROPERTY
Expected Request Field(s)
none
Notes
Do not send value, values, from, or to.
Operator Family
Range
Operators
BETWEEN, NOT_BETWEEN
Expected Request Field(s)
from and to
Notes
Legacy values: [min, max] is still supported by BAU.
Operator Family
Multi-select arrays
Operators
EQ_ALL, NEQ_ALL, HAS_ALL, NOT_HAS_ALL
Expected Request Field(s)
values
Notes
Used for array-backed EAV fields such as tag-style multi-select values.
Operator Family
Boolean convenience
Operators
IS_TRUE, IS_FALSE
Expected Request Field(s)
none
Notes
Internally converted to equality against a boolean value.
Operator Family
Relative / recurring date
Operators
IS_TODAY, WAS_YESTERDAY, IS_TOMORROW, LAST_N_DAYS, NEXT_N_DAYS, UPDATED_IN_LAST, NOT_UPDATED_IN_LAST, RECURS_*
Expected Request Field(s)
none or value for N-based variants
Notes
For N-based date operators, send value as a numeric string such as "7".
| Operator Family | Operators | Expected Request Field(s) | Notes |
|---|---|---|---|
| Single-value equality / comparison | EQ, NEQ, GT, GTE, LT, LTE | value | Numeric strings are parsed as numbers when applicable. Date strings in yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss... format are routed as dates. |
| List matching | IN, NOT_IN | values | Values are compared case-insensitively for string fields. |
| String pattern | CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH, CONTAINS_ANY, NOT_CONTAINS_ANY, STARTS_WITH_ANY, ENDS_WITH_ANY | value or values | Pattern operators keep numeric-looking strings as strings, for example phone suffix matching. |
| Null / presence | IS_NULL, IS_NOT_NULL, NOT_HAS_PROPERTY | none | Do not send value, values, from, or to. |
| Range | BETWEEN, NOT_BETWEEN | from and to | Legacy values: [min, max] is still supported by BAU. |
| Multi-select arrays | EQ_ALL, NEQ_ALL, HAS_ALL, NOT_HAS_ALL | values | Used for array-backed EAV fields such as tag-style multi-select values. |
| Boolean convenience | IS_TRUE, IS_FALSE | none | Internally converted to equality against a boolean value. |
| Relative / recurring date | IS_TODAY, WAS_YESTERDAY, IS_TOMORROW, LAST_N_DAYS, NEXT_N_DAYS, UPDATED_IN_LAST, NOT_UPDATED_IN_LAST, RECURS_* | none or value for N-based variants | For N-based date operators, send value as a numeric string such as "7". |
Notes And Caveats
Area
objectType validation
Documented Behavior
objectType is enforced in lowercase by BAU segment validation.
Area
Execution engine
Documented Behavior
Public segment creation reuses BAU SegmentService.createSegment(...); there is no duplicate public-only filter engine.
Area
ROLLING_DATE_RANGE
Documented Behavior
The shared filter engine includes ROLLING_DATE_RANGE, but the current public segment create DTO does not expose a rollingDate payload, so it is not treated as usable through this endpoint.
Area
Exclusions contract
Documented Behavior
The BAU exclusion resolver currently reads exclusion keys as segments and object_ids from stored filter JSON, while the Java DTO surface exposes segmentIds and objectIds. Until those shapes are normalized end to end, exclusions are not treated as a stable public contract.
| Area | Documented Behavior |
|---|---|
| objectType validation | objectType is enforced in lowercase by BAU segment validation. |
| Execution engine | Public segment creation reuses BAU SegmentService.createSegment(...); there is no duplicate public-only filter engine. |
| ROLLING_DATE_RANGE | The shared filter engine includes ROLLING_DATE_RANGE, but the current public segment create DTO does not expose a rollingDate payload, so it is not treated as usable through this endpoint. |
| Exclusions contract | The BAU exclusion resolver currently reads exclusion keys as segments and object_ids from stored filter JSON, while the Java DTO surface exposes segmentIds and objectIds. Until those shapes are normalized end to end, exclusions are not treated as a stable public contract. |
Response fields
Whether the request succeeded.
Example: true
Human-readable result message.
Example: Segment created successfully
Segment record ID.
Example: 999
Segment name.
Example: High value contacts
Segment object type.
Example: contact
Segment type.
Example: ACTIVE
Segment description.
Example: Segment for high intent contacts
Current segment version number.
Example: 1
Creation timestamp.
Example: 2026-08-01T09:15:30Z
Last update timestamp.
Example: 2026-08-01T09:15:30Z
| Object | Description |
|---|---|
success boolean | Whether the request succeeded. Example: true |
message string | Human-readable result message. Example: Segment created successfully |
data.id integer | Segment record ID. Example: 999 |
data.name string | Segment name. Example: High value contacts |
data.objectType string | Segment object type. Example: contact |
data.segmentType string | Segment type. Example: ACTIVE |
data.description string | null | Segment description. Example: Segment for high intent contacts |
data.currentVersion integer | Current segment version number. Example: 1 |
data.createdAt string<date-time> | Creation timestamp. Example: 2026-08-01T09:15:30Z |
data.updatedAt string<date-time> | Last update timestamp. Example: 2026-08-01T09:15:30Z |