List segments
Retrieves a list of segments.
The list doesn't include the customers that belong to respective segments. To return a list of customers who belong to a segment, use GET List customers endpoint with the segment_id query parameter.
To return a list of different results, use the filters[created_at][conditions][$before] and filters[created_at][conditions][$after] query parameters as pagination.
Query parameters
Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
Apply this filter to order the segments according the date and time when they were created. By default, lists the segments from the newest to the oldest. Use created_at to list from the oldest to the newest.
Filters for listing templates.
{
"created_at": {
"conditions": {
"$after": "2024-01-01T00:00:00.000Z",
"$before": "2024-01-01T00:00:00.000Z"
}
}
}Contains the list of segments in the sequence defined by the order parameter.
Response
Returns a data array with segment objects.
Example response
{
"segments": [
{
"id": "seg_1wc52c5z6r1kQ81brO8j9Hk2",
"created_at": "2022-05-12T13:01:56.896Z",
"updated_at": "2022-10-03T12:24:58.008Z"
}
]
}