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.
Request
- Base URLhttps://api.omnisend.com/api
- URLhttps://api.omnisend.com/api/segments
- Auth
- OAuth 2Client credentialsToken URL: https://app.omnisend.com/oauth2/token scopes: segments.read
- or API key in header Authorization
Query parameters
Page size (1-50)
Cursor for next page (base64-encoded, obtained from previous response)
Cursor for previous page (base64-encoded, obtained from previous response)
Sort field (only needed on first request)
Sort direction (only needed on first request)
Headers
API version that specifies the response format and behaviour (e.g., 2026-preview)
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"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.