Patch Notifications
curl --request PATCH \
--url https://api.example.com/v1/settings/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_enabled": true,
"events": [
{
"key": "<string>",
"email": true,
"in_app": true,
"slack": true
}
],
"min_risk_score_for_alert": 50,
"notify_on_new_issue": true,
"notify_on_pattern_detected": true,
"notify_on_prediction": true,
"notify_on_recommendation": true,
"notify_on_report_ready": true,
"slack_enabled": true,
"teams_enabled": true
}
'import requests
url = "https://api.example.com/v1/settings/notifications"
payload = {
"email_enabled": True,
"events": [
{
"key": "<string>",
"email": True,
"in_app": True,
"slack": True
}
],
"min_risk_score_for_alert": 50,
"notify_on_new_issue": True,
"notify_on_pattern_detected": True,
"notify_on_prediction": True,
"notify_on_recommendation": True,
"notify_on_report_ready": True,
"slack_enabled": True,
"teams_enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_enabled: true,
events: [{key: '<string>', email: true, in_app: true, slack: true}],
min_risk_score_for_alert: 50,
notify_on_new_issue: true,
notify_on_pattern_detected: true,
notify_on_prediction: true,
notify_on_recommendation: true,
notify_on_report_ready: true,
slack_enabled: true,
teams_enabled: true
})
};
fetch('https://api.example.com/v1/settings/notifications', 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://api.example.com/v1/settings/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'email_enabled' => true,
'events' => [
[
'key' => '<string>',
'email' => true,
'in_app' => true,
'slack' => true
]
],
'min_risk_score_for_alert' => 50,
'notify_on_new_issue' => true,
'notify_on_pattern_detected' => true,
'notify_on_prediction' => true,
'notify_on_recommendation' => true,
'notify_on_report_ready' => true,
'slack_enabled' => true,
'teams_enabled' => true
]),
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://api.example.com/v1/settings/notifications"
payload := strings.NewReader("{\n \"email_enabled\": true,\n \"events\": [\n {\n \"key\": \"<string>\",\n \"email\": true,\n \"in_app\": true,\n \"slack\": true\n }\n ],\n \"min_risk_score_for_alert\": 50,\n \"notify_on_new_issue\": true,\n \"notify_on_pattern_detected\": true,\n \"notify_on_prediction\": true,\n \"notify_on_recommendation\": true,\n \"notify_on_report_ready\": true,\n \"slack_enabled\": true,\n \"teams_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/v1/settings/notifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_enabled\": true,\n \"events\": [\n {\n \"key\": \"<string>\",\n \"email\": true,\n \"in_app\": true,\n \"slack\": true\n }\n ],\n \"min_risk_score_for_alert\": 50,\n \"notify_on_new_issue\": true,\n \"notify_on_pattern_detected\": true,\n \"notify_on_prediction\": true,\n \"notify_on_recommendation\": true,\n \"notify_on_report_ready\": true,\n \"slack_enabled\": true,\n \"teams_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/settings/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_enabled\": true,\n \"events\": [\n {\n \"key\": \"<string>\",\n \"email\": true,\n \"in_app\": true,\n \"slack\": true\n }\n ],\n \"min_risk_score_for_alert\": 50,\n \"notify_on_new_issue\": true,\n \"notify_on_pattern_detected\": true,\n \"notify_on_prediction\": true,\n \"notify_on_recommendation\": true,\n \"notify_on_report_ready\": true,\n \"slack_enabled\": true,\n \"teams_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}settings
Patch Notifications
PATCH /settings/notifications — update notification preferences.
PATCH
/
v1
/
settings
/
notifications
Patch Notifications
curl --request PATCH \
--url https://api.example.com/v1/settings/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_enabled": true,
"events": [
{
"key": "<string>",
"email": true,
"in_app": true,
"slack": true
}
],
"min_risk_score_for_alert": 50,
"notify_on_new_issue": true,
"notify_on_pattern_detected": true,
"notify_on_prediction": true,
"notify_on_recommendation": true,
"notify_on_report_ready": true,
"slack_enabled": true,
"teams_enabled": true
}
'import requests
url = "https://api.example.com/v1/settings/notifications"
payload = {
"email_enabled": True,
"events": [
{
"key": "<string>",
"email": True,
"in_app": True,
"slack": True
}
],
"min_risk_score_for_alert": 50,
"notify_on_new_issue": True,
"notify_on_pattern_detected": True,
"notify_on_prediction": True,
"notify_on_recommendation": True,
"notify_on_report_ready": True,
"slack_enabled": True,
"teams_enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_enabled: true,
events: [{key: '<string>', email: true, in_app: true, slack: true}],
min_risk_score_for_alert: 50,
notify_on_new_issue: true,
notify_on_pattern_detected: true,
notify_on_prediction: true,
notify_on_recommendation: true,
notify_on_report_ready: true,
slack_enabled: true,
teams_enabled: true
})
};
fetch('https://api.example.com/v1/settings/notifications', 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://api.example.com/v1/settings/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'email_enabled' => true,
'events' => [
[
'key' => '<string>',
'email' => true,
'in_app' => true,
'slack' => true
]
],
'min_risk_score_for_alert' => 50,
'notify_on_new_issue' => true,
'notify_on_pattern_detected' => true,
'notify_on_prediction' => true,
'notify_on_recommendation' => true,
'notify_on_report_ready' => true,
'slack_enabled' => true,
'teams_enabled' => true
]),
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://api.example.com/v1/settings/notifications"
payload := strings.NewReader("{\n \"email_enabled\": true,\n \"events\": [\n {\n \"key\": \"<string>\",\n \"email\": true,\n \"in_app\": true,\n \"slack\": true\n }\n ],\n \"min_risk_score_for_alert\": 50,\n \"notify_on_new_issue\": true,\n \"notify_on_pattern_detected\": true,\n \"notify_on_prediction\": true,\n \"notify_on_recommendation\": true,\n \"notify_on_report_ready\": true,\n \"slack_enabled\": true,\n \"teams_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/v1/settings/notifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_enabled\": true,\n \"events\": [\n {\n \"key\": \"<string>\",\n \"email\": true,\n \"in_app\": true,\n \"slack\": true\n }\n ],\n \"min_risk_score_for_alert\": 50,\n \"notify_on_new_issue\": true,\n \"notify_on_pattern_detected\": true,\n \"notify_on_prediction\": true,\n \"notify_on_recommendation\": true,\n \"notify_on_report_ready\": true,\n \"slack_enabled\": true,\n \"teams_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/settings/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_enabled\": true,\n \"events\": [\n {\n \"key\": \"<string>\",\n \"email\": true,\n \"in_app\": true,\n \"slack\": true\n }\n ],\n \"min_risk_score_for_alert\": 50,\n \"notify_on_new_issue\": true,\n \"notify_on_pattern_detected\": true,\n \"notify_on_prediction\": true,\n \"notify_on_recommendation\": true,\n \"notify_on_report_ready\": true,\n \"slack_enabled\": true,\n \"teams_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Available options:
realtime, daily, weekly, never Show child attributes
Show child attributes
Required range:
0 <= x <= 100Available options:
p1, p2, p3, p4 Response
Successful Response
⌘I