curl --request POST \
--url https://developer.synq.io/api/alerts/v2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"incidentLifecycle": {
"settings": {
"states": []
},
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
},
"name": "<string>",
"fqn": "<string>",
"template": {
"plain": "<string>",
"title": "<string>"
}
}
'import requests
url = "https://developer.synq.io/api/alerts/v2"
payload = {
"incidentLifecycle": {
"settings": { "states": [] },
"targets": [{ "email": { "recipientEmails": ["jsmith@example.com"] } }]
},
"name": "<string>",
"fqn": "<string>",
"template": {
"plain": "<string>",
"title": "<string>"
}
}
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({
incidentLifecycle: {
settings: {states: []},
targets: [{email: {recipientEmails: ['jsmith@example.com']}}]
},
name: '<string>',
fqn: '<string>',
template: {plain: '<string>', title: '<string>'}
})
};
fetch('https://developer.synq.io/api/alerts/v2', 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",
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([
'incidentLifecycle' => [
'settings' => [
'states' => [
]
],
'targets' => [
[
'email' => [
'recipientEmails' => [
'jsmith@example.com'
]
]
]
]
],
'name' => '<string>',
'fqn' => '<string>',
'template' => [
'plain' => '<string>',
'title' => '<string>'
]
]),
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"
payload := strings.NewReader("{\n \"incidentLifecycle\": {\n \"settings\": {\n \"states\": []\n },\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"fqn\": \"<string>\",\n \"template\": {\n \"plain\": \"<string>\",\n \"title\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"incidentLifecycle\": {\n \"settings\": {\n \"states\": []\n },\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"fqn\": \"<string>\",\n \"template\": {\n \"plain\": \"<string>\",\n \"title\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/alerts/v2")
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 \"incidentLifecycle\": {\n \"settings\": {\n \"states\": []\n },\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"fqn\": \"<string>\",\n \"template\": {\n \"plain\": \"<string>\",\n \"title\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"alert": {
"createdAt": "2023-01-15T01:30:15.01Z",
"incidentLifecycle": {
"settings": {
"states": [
"STATE_UNSPECIFIED"
]
},
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
},
"id": "<string>",
"name": "<string>",
"fqn": "<string>",
"isDisabled": true,
"template": {
"plain": "<string>",
"title": "<string>"
}
}
}Create
Create a new alert configuration.
curl --request POST \
--url https://developer.synq.io/api/alerts/v2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"incidentLifecycle": {
"settings": {
"states": []
},
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
},
"name": "<string>",
"fqn": "<string>",
"template": {
"plain": "<string>",
"title": "<string>"
}
}
'import requests
url = "https://developer.synq.io/api/alerts/v2"
payload = {
"incidentLifecycle": {
"settings": { "states": [] },
"targets": [{ "email": { "recipientEmails": ["jsmith@example.com"] } }]
},
"name": "<string>",
"fqn": "<string>",
"template": {
"plain": "<string>",
"title": "<string>"
}
}
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({
incidentLifecycle: {
settings: {states: []},
targets: [{email: {recipientEmails: ['jsmith@example.com']}}]
},
name: '<string>',
fqn: '<string>',
template: {plain: '<string>', title: '<string>'}
})
};
fetch('https://developer.synq.io/api/alerts/v2', 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",
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([
'incidentLifecycle' => [
'settings' => [
'states' => [
]
],
'targets' => [
[
'email' => [
'recipientEmails' => [
'jsmith@example.com'
]
]
]
]
],
'name' => '<string>',
'fqn' => '<string>',
'template' => [
'plain' => '<string>',
'title' => '<string>'
]
]),
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"
payload := strings.NewReader("{\n \"incidentLifecycle\": {\n \"settings\": {\n \"states\": []\n },\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"fqn\": \"<string>\",\n \"template\": {\n \"plain\": \"<string>\",\n \"title\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"incidentLifecycle\": {\n \"settings\": {\n \"states\": []\n },\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"fqn\": \"<string>\",\n \"template\": {\n \"plain\": \"<string>\",\n \"title\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/alerts/v2")
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 \"incidentLifecycle\": {\n \"settings\": {\n \"states\": []\n },\n \"targets\": [\n {\n \"email\": {\n \"recipientEmails\": [\n \"jsmith@example.com\"\n ]\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"fqn\": \"<string>\",\n \"template\": {\n \"plain\": \"<string>\",\n \"title\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"alert": {
"createdAt": "2023-01-15T01:30:15.01Z",
"incidentLifecycle": {
"settings": {
"states": [
"STATE_UNSPECIFIED"
]
},
"targets": [
{
"email": {
"recipientEmails": [
"jsmith@example.com"
]
}
}
]
},
"id": "<string>",
"name": "<string>",
"fqn": "<string>",
"isDisabled": true,
"template": {
"plain": "<string>",
"title": "<string>"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- CreateRequest
- CreateRequest
- CreateRequest
CreateRequest creates a new alert configuration. The kind oneof carries the
full specification of the alert; its target and trigger constraints are
enforced on the concrete kind messages.
Incident-owner alerts are not created here — turn them on with ToggleIncidentOwnerAlert.
An incident lifecycle alert.
Show child attributes
Show child attributes
Human-readable name for the alert configuration.
1 - 255User-provided fully qualified name for the alert config. This is a unique identifier that users can specify to reference the alert.
1 - 500Optional custom template for the rendered alert message. Common to every alert kind; currently applied only to issue alerts.
- template
- template
Show child attributes
Show child attributes
Response
Success
CreateResponse returns the created alert configuration.
The alert configuration that was created.
- Alert
- Alert
- Alert
Show child attributes
Show child attributes