v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Segments

Create Segment

Create a customer segment.

🚧 Limit on static segments

There is a cap on the number of customers that you can assign to a static segment: 20,000. If you would like to create a bigger segment, then you can use the unlimited auto-update or passive segment instead and use some customer metadata to build this segment.

🚧 Limit on Active and Passive segments

You can create a maximum of 100 passive and active segments.

post/v1/segments

Request body

OR

Response

Returns a customer segment object.

idstring

Unique segment ID.

namestring

Segment name.

created_atstring date-time

Timestamp representing the date and time when the segment was created. The value is shown in the ISO 8601 format.

updated_atstring date-time

Timestamp in ISO 8601 format indicating when the segment was updated.

type'auto-update' | 'passive' | 'static'

Defines whether the segment is:

  • Active (auto-update): customers enter and leave the segment based on the defined filters and the customer.segment.entered and customer.segment.left events are triggered,
  • Passive (passive): customers enter and leave the segment based on the defined filters, but the customer.segment.entered and customer.segment.left events are not triggered,
  • Static (static): manually selected customers.
filterobject nullable

Defines a set of criteria for an auto-update or passive segment type.

object'segment'

The type of the object represented by JSON. This object stores information about the customer segment.

Example response

{
  "id": "seg_1wc52c5z6r1kQ81brO8j9Hk2",
  "created_at": "2022-05-12T13:01:56.896Z",
  "updated_at": "2022-10-03T12:24:58.008Z"
}