List segment contacts
GET /segments/:id/contacts — the contacts that match a segment.
/segments/:id/contactsReturns the contacts in the segment’s audience that match its filter — a live preview of who a campaign to this segment would reach.
segment_idstringrequiredThe segment ID.
limitnumberoptionalNumber of contacts to retrieve. An integer between 1 and 100. Optional; if omitted, all matching contacts are returned in a single response up to a ceiling of 1,000 — a segment matching 5,000 contacts returns the first 1,000 with has_more: true, so keep walking with after.
afterstringoptionalThe contact ID *after* which to retrieve more contacts (for pagination). The ID is not included in the result. Cannot be combined with before.
beforestringoptionalThe contact ID *before* which to retrieve more contacts (for pagination). The ID is not included in the result. Cannot be combined with after.
import { Mailblastr } from 'mailblastr';
const mb = new Mailblastr('mb_xxxxxxxxx');
const { data, error } = await mb.segments.contacts('4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93');
console.log({ data, error });Response
{
"object": "list",
"has_more": false,
"data": [
{
"id": "479e3145-dd0e-4f64-bf48-1d4b6d4cd8f6",
"email": "ada@gmail.com",
"first_name": "Ada",
"last_name": null,
"unsubscribed": false,
"created_at": "2026-06-23T10:00:00.000Z"
}
]
}