Replace the organization's alert settings
curl --request PUT \
--url https://app.trustivan.com/api/v1/notifications/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_findings": true,
"email_verdicts": true,
"email_recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slack_webhook_url": "<string>",
"slack_findings": true,
"slack_verdicts": true,
"email_sla_breaches": true,
"slack_sla_breaches": true
}
'import requests
url = "https://app.trustivan.com/api/v1/notifications/settings"
payload = {
"email_findings": True,
"email_verdicts": True,
"email_recipients": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"slack_webhook_url": "<string>",
"slack_findings": True,
"slack_verdicts": True,
"email_sla_breaches": True,
"slack_sla_breaches": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_findings: true,
email_verdicts: true,
email_recipients: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
slack_webhook_url: '<string>',
slack_findings: true,
slack_verdicts: true,
email_sla_breaches: true,
slack_sla_breaches: true
})
};
fetch('https://app.trustivan.com/api/v1/notifications/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/notifications/settings"
payload := strings.NewReader("{\n \"email_findings\": true,\n \"email_verdicts\": true,\n \"email_recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"slack_webhook_url\": \"<string>\",\n \"slack_findings\": true,\n \"slack_verdicts\": true,\n \"email_sla_breaches\": true,\n \"slack_sla_breaches\": true\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"email_findings": true,
"email_verdicts": true,
"email_recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slack_findings": true,
"slack_verdicts": true,
"email_sla_breaches": true,
"slack_sla_breaches": true,
"slack_configured": true,
"email_available": true,
"updated_at": "2023-11-07T05:31:56Z"
}Replace the organization's alert settings
Email alerts go to the listed member ids, re-checked against the
membership at send time; Slack posts go to one incoming webhook,
which must be https, passes the outbound SSRF guard, and is stored
encrypted. slack_webhook_url omitted keeps the stored URL, ""
removes it. Events: new critical or high findings first seen by a
scan, and a FAIL policy verdict. Requires webhooks:manage and a
human; audited as notification_settings.updated.
PUT
/
notifications
/
settings
Replace the organization's alert settings
curl --request PUT \
--url https://app.trustivan.com/api/v1/notifications/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_findings": true,
"email_verdicts": true,
"email_recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slack_webhook_url": "<string>",
"slack_findings": true,
"slack_verdicts": true,
"email_sla_breaches": true,
"slack_sla_breaches": true
}
'import requests
url = "https://app.trustivan.com/api/v1/notifications/settings"
payload = {
"email_findings": True,
"email_verdicts": True,
"email_recipients": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"slack_webhook_url": "<string>",
"slack_findings": True,
"slack_verdicts": True,
"email_sla_breaches": True,
"slack_sla_breaches": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_findings: true,
email_verdicts: true,
email_recipients: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
slack_webhook_url: '<string>',
slack_findings: true,
slack_verdicts: true,
email_sla_breaches: true,
slack_sla_breaches: true
})
};
fetch('https://app.trustivan.com/api/v1/notifications/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/notifications/settings"
payload := strings.NewReader("{\n \"email_findings\": true,\n \"email_verdicts\": true,\n \"email_recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"slack_webhook_url\": \"<string>\",\n \"slack_findings\": true,\n \"slack_verdicts\": true,\n \"email_sla_breaches\": true,\n \"slack_sla_breaches\": true\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"email_findings": true,
"email_verdicts": true,
"email_recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slack_findings": true,
"slack_verdicts": true,
"email_sla_breaches": true,
"slack_sla_breaches": true,
"slack_configured": true,
"email_available": true,
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json