Broadcast test event
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": {
"success": true,
"status_code": 200,
"response_body": "OK"
}
}Event subscriptions
Broadcast test event
Send a test event to the connection endpoint configured for a specific subscription. Use this to verify that your connection is set up correctly before relying on it for production events.
POST
/
event-subscriptions
/
broadcast
/
test
/
{subscription_id}
Broadcast test event
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": {
"success": true,
"status_code": 200,
"response_body": "OK"
}
}Send a test event to the connection endpoint configured for this subscription. This is useful for verifying that your webhook URL or Klaviyo integration is set up correctly.
The test event will contain a sample payload matching the subscription’s event type.
The test broadcast will use the same authentication and headers configured on the connection.
Authorizations
HTTPBasicAuthOAuth2ClientCreds
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Path Parameters
The id of the subscription to send a test event to.
Response
OK
Test broadcast result
The result of a test event broadcast to a subscription's connection endpoint.
Show child attributes
Show child attributes