Skip to main content

Get Segment

Retrieve a single segment by its ID, including its filter configuration and contact count.


Endpoint

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

Path Parameters

ParameterTypeRequiredDescription
idintegerrequiredThe segment ID.

Sample Request

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

Response

Success — 200 OK

{
"data": {
"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"
}
}

Errors

StatusMessageCause
400Please provide a valid segment ID.id path parameter is missing or invalid.
404We were unable to find the segment.Segment does not exist in this workspace.