Required scopes: segments_read
Arguments
Forward pagination cursor — returns items after it. Pass an edges[].cursor or pageInfo.endCursor from a previous page.
Backward pagination cursor — returns items before it. Pass an edges[].cursor or pageInfo.startCursor from a previous page.
Forward pagination: returns the first N items (max 100, default 25). Use with after; mutually exclusive with last/before.
Backward pagination: returns the last N items (max 100, default 25). Use with before; mutually exclusive with first/after.
Which key to sort by (defaults to the first key, newest-first). Combine with reverse to flip direction.
Case-insensitive substring match on the segment name. At most 200 characters.
Reverses the sort direction selected by orderBy (or its default).
Only include segments of this type.
Returns
A paginated list of Segment items.
The list of edges (each a node plus its pagination cursor).
Opaque cursor for this item; pass to after/before to page from here.
The item at this edge.
Dynamic segment condition tree. Null for static and persona segments.
When the member counts were last recalculated. They are not live.
When the segment was created.
The merchant’s description of who this segment is for.
Members subscribed to email marketing as of countsRefreshedAt.
The segment’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
Customers in the segment as of countsRefreshedAt. Null until it has first been counted.
The merchant-facing name of the segment.
Members subscribed to SMS marketing as of countsRefreshedAt.
How membership of this segment is determined.
When the segment was last updated.
The nodes in this page, without the edge/cursor wrapper — a convenience over edges.
Dynamic segment condition tree. Null for static and persona segments.
When the member counts were last recalculated. They are not live.
When the segment was created.
The merchant’s description of who this segment is for.
Members subscribed to email marketing as of countsRefreshedAt.
The segment’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
Customers in the segment as of countsRefreshedAt. Null until it has first been counted.
The merchant-facing name of the segment.
Members subscribed to SMS marketing as of countsRefreshedAt.
How membership of this segment is determined.
When the segment was last updated.
Pagination metadata for the current page.
Cursor of the last edge in this page; pass to after to page forward.
Whether more items exist after this page (drives forward pagination with first/after).
Whether more items exist before this page (drives backward pagination with last/before).
Cursor of the first edge in this page; pass to before to page backward.
Example