Create a new segment

Creates a new segment using the payload provided

Authentication

Authorizationstring
API key needed to access this API
OR
AuthorizationBearer
API key needed to access this API, in Bearer token format

Request

upsertSegmentSchema
namestringRequired
The name of the segment
constraintslist of objectsRequired
The list of constraints that make up this segment
descriptionstring or nullOptional
A description of what the segment is for
projectstring or nullOptional
The project the segment belongs to if any.

Response headers

locationstring or null
The location of the newly created resource.

Response

The resource was successfully created.
idinteger>=0
The ID of this segment
namestring
The name of this segment
constraintslist of objects
The list of constraints that are used in this segment
createdAtstringformat: "date-time"
When the segment was created
descriptionstring or null
The description for this segment
usedInFeaturesinteger or null>=0
The number of feature flags that use this segment. The number also includes the any flags with pending change requests that would add this segment.
usedInProjectsinteger or null>=0
The number of projects that use this segment. The number includes any projects with pending change requests that would add this segment.
projectstring or null

The project the segment belongs to. Only present if the segment is a project-specific segment.

createdBystring or null
The creator's email or username

Errors