List All Segments
Retrieve a paginated list of segments defined in your workspace.
Endpoint
GET https://api.campaignlark.com/v1/segments
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | optional | 1 | Page number. |
limit | integer | optional | 50 | Items per page (1–100). |
Sample Request
GET https://api.campaignlark.com/v1/segments?page=1&limit=50
Response
Success — 200 OK
{
"data": {
"segments": [
{
"id": 1,
"name": "Active Subscribers",
"filters": {
"condition": "AND",
"filters": [
{
"type": "field",
"field_id": 1,
"operator": "eq",
"value": "test@example.com"
}
]
},
"contact_count": 1500,
"last_calculated_at": "2026-04-09T02:00:00Z",
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-04-09T02:00:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total_pages": 1,
"total_count": 1
}
}
}
Segment Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the segment. |
name | string | Display name of the segment. |
filters | object | The segment's filter configuration. See Create Segment for the full filter schema. |
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. |
Pagination Object
| Field | Type | Description |
|---|---|---|
current_page | integer | The current page number. |
per_page | integer | Number of items per page. |
total_pages | integer | Total number of pages. |
total_count | integer | Total number of segments. |