List segments
The store’s named audiences, newest first. member_count IS AS STALE AS last_refreshed_at SAYS IT IS. A dynamic segment’s size is whatever the last materialisation recorded, not a live count, so read the two together; a client that treats the number as “who matches right now” will report a figure the next refresh changes with nothing having gone wrong. ?kind and ?status narrow it, so “the audiences a campaign can target today” is one call rather than a client-side filter over every segment in the store. MEMBERSHIP IS NOT PUBLISHED. There is no route here that lists the contacts a segment resolves to: those are ids of real people and this API has no marketing-contact resource to resolve them against, so they would be unusable to you and readable by anyone holding read_segments.
Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Query Parameters
Filter by how membership is decided. A dynamic segment selects its members from a rule; a static one holds a hand-curated list. This API creates dynamic segments only, so kind=dynamic is the set it can also edit.
static, dynamic Filter by whether the segment is still maintained. Only an ACTIVE segment is picked up by the refresh sweeper, so status=active is the set whose member_count is being kept current.
active, archived Rows per page. Out of range is a 400 rather than a silent clamp, so a client asking for more than 100 learns it did not get it.
1 <= x <= 100The next_cursor from the previous page. Opaque: decode nothing from it and construct nothing by hand, since its encoding is not part of this contract. Omit it to read the first page.
