POST/api/v1/segments

Create a segment

Creates a segment in your project. Supply its name and a JSON filter under data to define the segment. The response includes the created segment and its identifier.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 body field

Optional segment attributes supplied under data.

dataobjectoptional

1 status code
200Returns the created segment, including its filter, identifier, name, and timestamps.
dataobjectoptional

Error handling

The request schema does not require name or filter. Use name for the segment name and filter for the segment's filter JSON.