Create segment

Create a new segment.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
environmentKeystringRequiredformat: "string"
The environment key

Request

This endpoint expects an object.
namestringRequired

A human-friendly name for the segment

keystringRequired
A unique key used to reference the segment
descriptionstringOptional
A description of the segment's purpose
tagslist of stringsOptional
Tags for the segment
unboundedbooleanOptional

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.

unboundedContextKindstringOptional
For big segments, the targeted context kind.

Response

Segment response
namestring

A human-friendly name for the segment.

tagslist of strings
Tags for the segment. Defaults to an empty array.
creationDatelong
Timestamp of when the segment was created
lastModifiedDatelong
Timestamp of when the segment was last modified
keystring
A unique key used to reference the segment
ruleslist of objects
An array of the targeting rules for this segment.
versioninteger
Version of the segment
deletedboolean
Whether the segment has been deleted
generationinteger
For big segments, how many times this segment has been created.
descriptionstring

A description of the segment’s purpose. Defaults to null and is omitted in the response if not provided.

includedlist of strings

An array of keys for included targets. Included individual targets are always segment members, regardless of segment rules. For list-based segments over 15,000 entries, also called big segments, this array is either empty or omitted.

excludedlist of strings

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.

includedContextslist of objects
excludedContextslist of objects
_accessobject
_flagslist of objects

A list of flags targeting this segment. Only included when getting a single segment, using the getSegment endpoint.

unboundedboolean

Whether this is a standard segment (false) or a big segment (true). Standard segments include rule-based segments and smaller list-based segments. Big segments include larger list-based segments and synced segments. If omitted, the segment is a standard segment.

unboundedContextKindstring
For big segments, the targeted context kind.
_unboundedMetadataobject
Details on the external data store backing this segment. Only applies to big segments.
_externalstring
The external data store backing this segment. Only applies to synced segments.
_importInProgressboolean
Whether an import is currently in progress for the specified segment. Only applies to big segments.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error