curl --request POST \
--url https://developer.synq.io/api/alerts/v2/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
}
'import requests
url = "https://developer.synq.io/api/alerts/v2/test"
payload = {
"name": "<string>",
"targets": [{ "email": { "recipientEmails": ["jsmith@example.com"] } }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
targets: [{email: {recipientEmails: ['jsmith@example.com']}}]
})
};
fetch('https://developer.synq.io/api/alerts/v2/test', 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://developer.synq.io/api/alerts/v2/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'targets' => [
[
'email' => [
'recipientEmails' => [
'jsmith@example.com'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developer.synq.io/api/alerts/v2/test"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://developer.synq.io/api/alerts/v2/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/alerts/v2/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"dispatches": [
{
"target": {
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
},
"dispatched": true,
"error": "<string>"
}
]
}SendTestAlert
Delivers a static test message to the given targets so you can confirm that delivery reaches each channel before relying on a real alert. Nothing is stored and the targets need not belong to a saved alert, so this can be called while an alert is still being authored.
curl --request POST \
--url https://developer.synq.io/api/alerts/v2/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
}
'import requests
url = "https://developer.synq.io/api/alerts/v2/test"
payload = {
"name": "<string>",
"targets": [{ "email": { "recipientEmails": ["jsmith@example.com"] } }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
targets: [{email: {recipientEmails: ['jsmith@example.com']}}]
})
};
fetch('https://developer.synq.io/api/alerts/v2/test', 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://developer.synq.io/api/alerts/v2/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'targets' => [
[
'email' => [
'recipientEmails' => [
'jsmith@example.com'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developer.synq.io/api/alerts/v2/test"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://developer.synq.io/api/alerts/v2/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/alerts/v2/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"dispatches": [
{
"target": {
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
},
"dispatched": true,
"error": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
SendTestAlertRequest delivers a static test message to the given targets.
Alert name shown in the test message. Optional — leave empty while an alert is still being created; the message then omits the name.
255The alert kind the test stands in for. Optional; selects the message wording only, so an unspecified kind produces a generic test message.
TEST_ALERT_KIND_UNSPECIFIED, TEST_ALERT_KIND_ISSUE_LIFECYCLE, TEST_ALERT_KIND_SCHEMA_CHANGE, TEST_ALERT_KIND_INCIDENT_LIFECYCLE The targets to deliver the test message to. At least one is required. Owner targets are expanded to each owner's configured channels.
1AlertingTarget represents a destination where alert notifications will be sent. Each target type has its own specific configuration requirements.
- email
- ms_teams
- owner
- slack
- webhook
Show child attributes
Show child attributes
Response
Success
SendTestAlertResponse reports the per-target outcome of the test send.
One entry per delivered target, in the order they were resolved. Owner targets contribute one entry per resolved channel.
Show child attributes
Show child attributes