Sending message to test subscribers
To send messages to test subscribers, submit a POST request to:
1
https://push-api.sare.pl/v1/campaigns/<YOUR_WEBSITE_UID>/test
Copied!
Body parameters
Description
title
Title of message (required)
body
Body of message (required)
link
Link of message (required)
ttl
Notification lifetime (required)
icon
Url to icon (optional)
image
Url to image (optional)

PHP example

1
$url = "https://push-api.sare.pl/v1/campaigns/<YOUR_WEBSITE_UID>/test";
2
$payload = [
3
"title" => "Title of message",
4
"body" => "Body of message",
5
"link" => "https://sendflow.pl",
6
"ttl" => 604800,
7
"icon" => "https://your-cdn.pl/icon.png",
8
"image" => "https://your-cdn.pl/image.png"
9
];
10
11
$ch = curl_init();
12
curl_setopt($ch, CURLOPT_URL, $url);
13
curl_setopt($ch, CURLOPT_POST, true);
14
curl_setopt($ch, CURLOPT_HTTPHEADER, [
15
'Authorization: Basic <YOUR_API_KEY>',
16
'Content-Type: application/json'
17
]);
18
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
19
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
20
$result = curl_exec($ch);
Copied!

Bash example

1
curl --include \
2
--request POST \
3
--header "Content-Type: application/json; charset=utf-8" \
4
--header "Authorization: Basic <YOUR_API_KEY>" \
5
--data-binary "{\"title\":\"Title of message\",\"body\":\"Body of message\",\"link\":\"https:\\/\\/sendflow.pl\",\"ttl\":604800}" \
6
https://push-api.sare.pl/v1/campaigns/<YOUR_WEBSITE_UID>/test
Copied!

Response example

1
{
2
"result": true
3
}
Copied!
Copy link
Contents