Skip to main content

Get Segment

Retrieve a single segment by ID.

Endpoint​

GET /segments/:id

Returns: 200 OK

Headers​

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes

Path Parameters​

ParameterTypeDescription
idstringThe segment ID

Response​

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "VIP customers",
"description": "Opened 3+ emails in the last 90 days",
"status": "ready",
"filter": {
"type": "group",
"operator": "and",
"conditions": [
{
"type": "engagement_count",
"channel": "email",
"action": "opened",
"operator": "greater_than_or_equal",
"value": 3,
"time_window": { "value": 90, "unit": "days" }
}
]
},
"contact_count": 420,
"counted_at": "2026-03-08T12:00:00.000Z",
"created_at": "2026-03-01T10:00:00.000Z",
"updated_at": "2026-03-02T09:30:00.000Z"
}

See List Segments for the field reference. To list the contacts in a segment, pass its ID as segment_id to List Contacts.


Examples​

curl "https://api.arsel.sa/v1/segments/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer $ARSEL_API_KEY"

Error Responses​

{
"status_code": 404,
"name": "not_found",
"message": "Segment with ID 01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a not found"
}