Concepts
Segments and Membership
Use segments when you want reusable audience definitions instead of repeating the same targeting logic inside every flag.
What a segment represents
A segment is a reusable audience definition. Instead of rewriting the same rule inside multiple flags, you can define the audience once and reference it wherever that targeting logic matters.
In current SDK behavior, segment-style rules compare the current context identifier and, when supplied, the context type. If the rule omits a type, matching falls back to identifier-only comparison.
Why use segments
- Keep audience definitions consistent across multiple flags.
- Reduce duplicated inline rule logic.
- Make operational changes safer because you update one audience definition instead of many flags.
When inline rules are still better
- The condition is unique to one flag.
- The rule depends on one or two short-lived attributes.
- You want a fully self-contained rollout definition for a temporary experiment.
Next step
Take the next integration step in your own stack.
Start with the quickstart that matches your runtime, then return to the reference pages when you need exact request and payload details.