List a contact's segmentsMenu

List a contact's segments

GET/v1/contacts/{id}/segments

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

Works with integration, agent and partner keys.

Lists the segments the contact is in, newest entry first, from the stored membership the background evaluation keeps about every 15 minutes: the same answer as GET /v1/contacts?segmentId= and the contact.entered_segment events, up to about 15 minutes behind a live evaluation. Results are cursor-paginated: pass meta.pagination.nextCursor back as cursor until it comes back null.

Path parameters

idstringrequired

Kirora's id for the contact, your own with idType=externalId, or its email address with idType=email, URL-encoded (@ as %40).

1–255 characters

Query parameters

limitintegeroptional

How many items a page holds: 1 to 100, 20 by default.

min > 0 · max 100 · default 20

cursorstringoptional

Where the page starts: the previous page's meta.pagination.nextCursor. Omit it for the first page, and send the same filters with it.

1–2,048 characters

querystringoptional

Part of the segment's name, ignoring case.

1–200 characters

idTypestringoptional

What {id} is: Kirora's id for the contact (id, the default), your own (externalId, as set with identify) or its email address (email, matched trimmed and without case).

one of id, externalId, email · default "id"

Header parameters

Kirora-Workspacestringoptional

Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

pattern ^[A-Za-z0-9._:-]{1,128}$

Returns

Returns 200 OK with a list of ContactSegment 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

namestringrequired
enteredAtstringrequired

When the background evaluation first found the contact in it.

date-time