API Reference
List segment contacts
GET /segments/:id/contacts — the contacts that match a segment.
GET
/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.
Path parameters
segment_idstringrequiredThe segment ID.
Query parameters
limitnumberoptionalNumber of contacts to retrieve. Optional; if omitted, all matching contacts are returned in a single response. Minimum 1, maximum 100.
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('seg_9a2f...');
console.log({ data, error });Response
{
"object": "list",
"has_more": false,
"data": [
{
"id": "ct_1...",
"email": "ada@gmail.com",
"first_name": "Ada",
"last_name": null,
"unsubscribed": false,
"created_at": "2026-06-23T10:00:00.000Z"
}
]
}