Menu

List segments

GET/v1/segments

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

Returns segments in this organization. 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.

Query parameters

limitintegeroptional

min > 0 · max 100 · default 20

cursorstringoptional

1–2048 characters

qstringoptional

1–200 characters

Returns

Returns 200 OK with a list of Segment 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
rulesobjectrequired
One of 2 shapes
Match all
1 child attribute
allobject[]required

Every rule or nested group must match.

at least 1 item · at most 20 items

Match any
1 child attribute
anyobject[]required

At least one rule or nested group must match.

at least 1 item · at most 20 items

lastCountinteger | nullrequired

Audience size from the background count; null until first counted.

min 0 · max 9007199254740991

countedAtstring | nullrequired

When lastCount was taken.

date-time

createdAtstringrequired

date-time

updatedAtstringrequired

date-time