v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Segments

List segments

Returns a paginated list of segments for the authenticated project. Segments are ordered by creation date (newest first).

get/segments

Query parameters

limitinteger

Maximum number of segments to return. Min 1, max 100.

starting_afterstring

Cursor for pagination. Pass the id of the last segment from the previous page to fetch the next page.

Response

A paginated list of segments.

objectstring required
urlstring required
has_moreboolean required
next_cursorstring nullable

Example response

{
  "object": "list",
  "url": "/v4/segments",
  "data": [
    {
      "object": "segment",
      "id": "premium-users",
      "url": "/v4/segments/premium-users",
      "name": "Premium Users",
      "conditions": [
        {
          "metric": "environment",
          "comparator": "eq",
          "value": "prod"
        }
      ],
      "created_at": "2025-09-15T12:30:00Z",
      "updated_at": "2025-11-03T10:26:40Z"
    }
  ]
}