Retrieving a list of segments
To retrieve a list of segments, submit a GET request to:
1
https://push-api.sare.pl/v1/segments/<YOUR_WEBSITE_UID>
Copied!

PHP example

1
$url = "https://push-api.sare.pl/v1/segments/<YOUR_WEBSITE_UID>";
2
3
$ch = curl_init();
4
curl_setopt($ch, CURLOPT_URL, $url);
5
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Basic <YOUR_API_KEY>']);
6
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
7
$result = curl_exec($ch);
Copied!

Bash example

1
curl --include \
2
--header "Authorization: Basic <YOUR_API_KEY>" \
3
https://push-api.sare.pl/v1/segments/<YOUR_WEBSITE_UID>
Copied!

Response example

1
[
2
{
3
"name": "Mobile Users",
4
"created": 1569916221
5
},
6
{
7
"name": "Subscribers from last 7 days",
8
"created": 1569961234
9
}
10
]
Copied!
Copy link
Contents