v1

latestOpenAPI 3.1.02026-07-22750642.5 KB
Segments

Create a segment

Create a segment from a filter expression. It starts empty until evaluated. Validate and preview the filter first.

post/api/v1/segments

Request body

namestring required

Display name.

slugstring required

Permanent identifier, lowercase-kebab-case, unique in your organization. Cannot be changed after creation.

descriptionstring nullable
evaluationCadence'REACTIVE_ONLY' | 'HOURLY' | 'DAILY'

How often the segment re-evaluates. Defaults to REACTIVE_ONLY — evaluate on demand with segments_evaluate.

dailyEvaluationHourinteger nullable

For DAILY cadence: the hour (0-23, in your organization timezone) the segment evaluates.

skipWeekendEvaluationboolean

When true, the segment is not evaluated on weekends.

Response

Success

slugstring required

Unique identifier within your organization.

namestring required
descriptionstring nullable required
evaluationCadence'REACTIVE_ONLY' | 'HOURLY' | 'DAILY' required

How often the segment is re-evaluated. REACTIVE_ONLY segments only change when evaluated explicitly.

memberCountinteger required

Live count of currently active members.

lastEvaluatedAtstring nullable required

ISO 8601 timestamp; null if the segment has never evaluated.

createdAtstring required

ISO 8601 timestamp.