Creates a new segment configuration — the definition of how records get sorted into buckets.
A saved config is required before you can segment anything: Run Segmentation takes
configIds and has no inline path, so create the definition here first and reference the
returned id on every run.
A config is an ordered list of segments[]. Each segment carries the rules[] that decide
whether a record belongs to it and the outputValue returned when it does. Array position
sets each segment's order, and action decides what that order means: FIND_FIRST returns
the earliest match, FIND_LAST the latest, FIND_ALL every match joined by
mergeOperator, and ADD_ALL the sum of the matching numeric values.
Provide name, action, and the ordered segments[]. mergeOperator is optional, applies
only when action is FIND_ALL, and defaults to ,.
Server-assigned fields — id, per-segment order, fieldsUsedInRules, and timestamps —
are ignored on input and returned in the response. fieldsUsedInRules is derived from the
rules you supply; it is not something you set.
Returns 201 with the created segment config. Returns 400 if the payload is malformed —
for example an unknown action, a rule missing its field, or a segment missing its
outputValue.
This endpoint does not consume credits.