Menu

List contacts in a segment

GET/v1/segments/{id}/contacts

Requires an API key with the contacts:read scope. About keys and scopes

Evaluates a saved segment and returns the matching contacts. Because segments are evaluated on read, results can change between pages if contacts are changing underneath. Results are cursor-paginated: pass meta.pagination.nextCursor back as cursor until it comes back null. The cursor is opaque — do not construct or parse one. meta.count counts the matching contacts up to 10000: beyond that it reports the cap and meta.countExact is false; both are counted on the first page only (null with a cursor).

Path parameters

idstringrequired

uuid

Query parameters

limitintegeroptional

min > 0 · max 100 · default 20

cursorstringoptional

1–2048 characters

Returns

Returns 200 OK with a list of Contact objects in data, and the next page's cursor in meta (see pagination). Otherwise returns an error; Errors lists every code and which to retry.

idstringrequired

uuid

externalIdstring | nullrequired

Your own id for the contact, if set.

emailstring | nullrequired

email

firstNamestring | nullrequired
lastNamestring | nullrequired
phonestring | nullrequired

Phone number in E.164 format.

timezonestring | nullrequired

IANA timezone, e.g. Europe/London.

countrystring | nullrequired

ISO 3166-1 alpha-2 code: as written, or inferred from the phone, else the timezone.

datesobjectrequired

Named calendar dates, e.g. birthday, as YYYY-MM-DD or --MM-DD.

attributesobjectrequired

Custom attributes, keyed by attribute name.

emailConsentbooleanrequired

Whether the contact has consented to email.

pushConsentbooleanrequired

Whether the contact has consented to push.

createdAtstringrequired

date-time

updatedAtstringrequired

date-time