POST
/segmentsCreate a segment
Creates a segment. Provide a name and optionally specify the audience and filter conditions for the segment.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Segment details. Provide the required name and optionally include an audience identifier or filter conditions.
namestringrequired
The name of the segment.
audience_idstringdeprecatedoptional
The ID of the audience this segment belongs to.
filterobjectoptional
Filter conditions for the segment.
201Returns the created segment's identifier and object type.
idstringoptional
The ID of the segment.
objectstringoptional
The object type of the response.
Error handling
name is required. audience_id identifies the audience the segment belongs to, and filter contains the segment's filter conditions.