v1
latestOpenAPI 3.0.02026-07-2664192238.8 KBSegments
List segments
List segments with sorting and cursor-based pagination support.
Scopes: segments.read
Pagination: This endpoint uses cursor-based pagination. Use the after cursor from the response to get the next page, or the before cursor to get the previous page. Do not use both after and before parameters simultaneously.
Sorting:
- Only single-field sorting is supported. You cannot sort by multiple fields.
- Available sort fields: createdAt (default), name.
- When sorting by name, segments are sorted lexicographically (case-sensitive).
- Sort parameters are only required on the first request. Subsequent requests using a cursor will automatically use the sort settings embedded in the cursor.
Cursor Behavior:
- Cursors are self-contained and include all parameters needed for pagination.
- Once you have a cursor, you only need to pass the cursor for subsequent pages.
- If sort parameters are provided with a cursor, they must match the cursor's sort settings.
- Cursors may become invalid if the underlying data changes significantly (e.g., the referenced segment is deleted).
Rate Limiting: This endpoint is rate limited to 100 requests per minute.
get/segments
Query parameters
limitinteger
Page size (1-50)
afterstring
Cursor for next page (base64-encoded, obtained from previous response)
beforestring
Cursor for previous page (base64-encoded, obtained from previous response)
sort'createdAt' | 'name'
Sort field (only needed on first request)
direction'asc' | 'desc'
Sort direction (only needed on first request)
Headers
Omnisend-Versionstring required
API version that specifies the response format and behaviour
Response
Segments list
Example response
{
"paging": {
"cursors": {
"after": "eyJpZCI6ImNhbXAtNDU2In0",
"before": "eyJpZCI6ImNhbXAtMTIzIn0"
},
"hasMore": true,
"limit": 50
},
"segments": [
{
"archivedAt": "2026-06-01T00:00:00Z",
"conditionGroups": [
{
"conditions": [
{
"entity": "contact",
"junction": "and"
}
]
}
],
"createdAt": "2026-01-15T10:30:00Z",
"name": "VIP Customers",
"segmentID": "000000000000000000000001",
"status": "ready",
"updatedAt": "2026-01-20T14:45:00Z"
}
]
}