List segments
Segments of the site in ascending order of id (order=newest for the latest first), each with its name, conditions and folder. Call it to find a segment by name or to get a segment_id: list_contacts takes segment_id to list the contacts in the segment, and contact statistics (get_contacts_stats) take it to count them. A segment stores no list of contacts: its conditions are applied at the moment it is used. Filters combine: every one given must match.
A page holds up to limit segments; while next_cursor is set, pass it as cursor for the next page.
Request
- Base URLhttps://api.getsitecontrol.com
- AuthHTTP bearer
Path parameters
Query parameters
Part of the name, without case; % and _ are plain characters. Digits also match the id
Only the items of this folder, an id from list_folders; 0 is General
next_cursor of the previous page, sent with the same order; omit for the first
Items per page
Comma-separated fields to keep in each item, for example id,name; each item then carries only those fields and id. Omit for every field
Order of a list. oldest: the oldest item first; newest: the newest item first, for the latest items without paging through the history.
Order of the items: oldest first (default) or newest first; asc and desc mean the same
Response
Successful Response
Example response
{
"items": [
{
"conditions": {
"op": "and",
"args": [
{
"op": "and",
"args": [
{
"op": "=",
"args": [
"{{$contact.isSubscribed}}",
"S"
]
},
{
"op": "ina",
"args": [
"{{$contact.tags}}",
[
12,
15
]
]
}
]
},
{
"op": "or",
"args": [
{
"op": ">",
"args": [
"{{$contact.date}}",
"2026-01-01"
]
},
{
"op": "in",
"args": [
"{{$contact.email}}",
"@example.com"
]
}
]
}
]
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.