Create segment
Create a new segment. The new segment has no individual targets or rules.
The request body only accepts the fields documented below. If you include targeting fields such as included, excluded, includedContexts, excludedContexts, or rules, LaunchDarkly ignores them and does not return an error. These fields are empty in the response.
To add individual targets or rules after you create the segment, use Update segment with a semantic patch. For example, use the addIncludedTargets or addExcludedTargets instruction to add individual targets, and the addRule instruction to add a rule. For big segments, use the addBigSegmentIncludedTargets or addBigSegmentExcludedTargets instruction.
Path Parameters
Body
Whether to create a standard segment (false) or a big segment (true). Standard segments include rule-based and smaller list-based segments. Big segments include larger list-based segments and synced segments. Only use a big segment if you need to add more than 15,000 individual targets.
false
Response
Segment response
An array of keys for excluded targets. Segment rules bypass individual excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly. This value is omitted for list-based segments over 15,000 entries, also called big segments.