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
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the segment. |
name | string | Display name of the segment. |
contact_count | integer | Number of contacts currently in the segment. |
last_calculated_at | string | null | RFC 3339 timestamp of the last segment recalculation. null if never calculated. |
created_at | string | RFC 3339 timestamp of when the segment was created. |
updated_at | string | RFC 3339 timestamp of the last update. |