Skip to main content

List All Segments

Retrieve all segments defined in your workspace.


Endpoint

GET https://api.campaignlark.com/v1/segments

Request

This endpoint accepts no query parameters or request body.


Response

Success — 200 OK

{
"data": {
"segments": [
{
"id": 1,
"name": "Active Subscribers",
"contact_count": 1024,
"last_calculated_at": "2024-02-15T10:30:00Z",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-02-15T10:30:00Z"
}
]
}
}

Response Fields

FieldTypeDescription
idintegerUnique identifier for the segment.
namestringDisplay name of the segment.
contact_countintegerNumber of contacts currently in the segment.
last_calculated_atstring | nullRFC 3339 timestamp of the last segment recalculation. null if never calculated.
created_atstringRFC 3339 timestamp of when the segment was created.
updated_atstringRFC 3339 timestamp of the last update.