Segments
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
idstringrequireduuid
Query parameters
limitintegeroptionalmin > 0 · max 100 · default
20cursorstringoptional1–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.
idstringrequireduuid
externalIdstring | nullrequiredYour own id for the contact, if set.
emailstring | nullrequiredemail
firstNamestring | nullrequiredlastNamestring | nullrequiredphonestring | nullrequiredPhone number in E.164 format.
timezonestring | nullrequiredIANA timezone, e.g.
Europe/London.countrystring | nullrequiredISO 3166-1 alpha-2 code: as written, or inferred from the phone, else the timezone.
datesobjectrequiredNamed calendar dates, e.g.
birthday, asYYYY-MM-DDor--MM-DD.attributesobjectrequiredCustom attributes, keyed by attribute name.
emailConsentbooleanrequiredWhether the contact has consented to email.
pushConsentbooleanrequiredWhether the contact has consented to push.
createdAtstringrequireddate-time
updatedAtstringrequireddate-time