Segment

List the workspace's contact segments, including those created in the UI. Standard cursor pagination, ordered by id ascending. Requires contacts:read.

get/workspaces/{workspace_id}/segments

Request

Path parameters

workspace_idstring required

Query parameters

afterstring

ID of item after which the collection should be returned. More examples and info about pagination in our guides.

sort_order'asc' | 'desc'

Sort order of a list response. Use 'desc' to reverse the default 'asc' (ascending) sort order. Examples in our guides.

namestring

Exact segment name. Separate several names with commas to match any of them; names are not unique, so one name can match several segments.

Response

Success

idinteger
public_idstring
workspace_idinteger
namestring
created_atstring date-time
updated_atstring date-time

Example response

[
  {
    "id": 5,
    "public_id": "QrStUv",
    "workspace_id": 42,
    "name": "VIP buyers",
    "filter": {
      "id": 901,
      "public_id": "XyZaBc",
      "workspace_id": 42,
      "name": null,
      "filter_class": "ContactsSegmentsFilter",
      "conjunction": "and",
      "criteria": [
        {
          "attribute": "tags.id",
          "clause": "in",
          "value": [
            "tag-pub-id-1"
          ]
        }
      ],
      "mixed_conjunctions": false,
      "created_at": "2026-10-13T09:00:00.000Z",
      "updated_at": "2026-10-13T09:00:00.000Z"
    },
    "created_at": "2026-10-13T09:00:00.000Z",
    "updated_at": "2026-10-13T09:00:00.000Z"
  }
]

Changes