Segments
POSTCreate a segment
Create a reusable segment for feature-flag targeting rules
POST
/v1/projects/{projectId}/segmentsCreate a segment
curl --request POST \
--url 'http://localhost:4000/v1/projects/{projectId}/segments' \
--header 'Authorization: Bearer <token>'200
application/json{}Create a segment
Creates a reusable segment within a project. A segment defines a named set of conditions that targeting rules can reference.
Use this endpoint when you want to define an audience once and reuse its conditions across flag-targeting configurations. The created segment includes a key, name, conditions, and an optional description.
Authentication
AuthorizationbearerrequiredServer API key (srv_). See Authentication.
Path Parameters
projectIdstringrequiredProject ID