Segments
GET
List Segments
GET /v1/segmentsRetrieve a paginated list of all segments in your workspace.
Use Cases:
- Display available segments in your application
- Export segment configurations for backup
- Build segment analytics dashboards
- List targeting options for campaigns
- Audit segment usage and definitions
Behavior:
- Returns all segments in reverse chronological order (newest first)
- Uses cursor-based pagination for efficient retrieval
- Includes segment conditions (MongoDB-style filters)
- Shows estimated contact counts for each segment
- Maximum 100 segments per request
- Segments are evaluated dynamically (contact membership updates automatically)
Required Scope: read:segments
Response Includes:
- Segment ID, name, and description
- Filter conditions (MongoDB query format)
- Estimated member count (cached, updates periodically)
- Creation and update timestamps
- Segment type (dynamic/static)
Segment Use Cases:
- Target high-value customers (e.g.,
lifetime_value > 1000) - Engaged subscribers (e.g.,
opened_last_30_days = true) - Geographic targeting (e.g.,
country = 'US') - Behavioral triggers (e.g.,
last_purchase_date < 30_days_ago)
Query parameters
limitintegerNumber of items to return (default: 20, max: 100)
afterstringCursor for pagination - ID of the last item from the previous page
beforestringCursor for reverse pagination - ID of the first item from the next page
Response
200Successfully retrieved paginated list of segments with conditions and estimated member counts
object"segment_list"requiredObject type identifier
hasMorebooleanrequiredWhether more results are available
dataSegmentListItem[]requiredArray of segments