List segments
GET/segments
GET /segments: the workspace's contact groups and their ids.
List the workspace's active segments with their contact counts. Use a segment id in the segments array when you upsert a contact. subscribed_count is the deliverable subset (contacts still subscribed).
Request
curl https://sendy.co.il/api/v1/segments -H "Authorization: Bearer sk_live_8Jc…"const res = await fetch(`https://sendy.co.il/api/v1/segments`, {
headers: { Authorization: "Bearer sk_live_8Jc…" },
});
const { segments } = await res.json();Response · 200 OK
{
"segments": [
{ "id": "cmc0seg0001", "name": "Newsletter", "contact_count": 1280, "subscribed_count": 1195 }
]
}