curl --request PUT \
--url https://app.blockgence.com/v1/guard/email \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"enabled": true,
"min_severity": "high"
}
'import requests
url = "https://app.blockgence.com/v1/guard/email"
payload = {
"enabled": True,
"min_severity": "high"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, min_severity: 'high'})
};
fetch('https://app.blockgence.com/v1/guard/email', 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://app.blockgence.com/v1/guard/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'min_severity' => 'high'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.blockgence.com/v1/guard/email"
payload := strings.NewReader("{\n \"enabled\": true,\n \"min_severity\": \"high\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://app.blockgence.com/v1/guard/email")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"min_severity\": \"high\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/guard/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"min_severity\": \"high\"\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Configure the email digest
Enables or disables the requester’s email digest of alerts and sets its minimum severity.
Body: {"enabled": true, "min_severity": "high"}. min_severity is high by default.
The digest is sent only to the account’s email address; no other address is accepted. It groups in one email the new alerts the requester sees in the application, from the chosen severity; an email is never sent per alert:
- it waits 5 minutes from the first alert, to group alerts that arrive together;
- at most one digest is sent every 60 minutes;
- at most 6 digests are sent per person in 24 hours.
If a sending limit is reached, the alerts wait (they remain visible in the application), the delay is declared in
held_since and held_reason, and the next digest states since when it was late and why. Anything waiting more
than 7 days expires. The email includes the rule, the severity, the watch name, the network, the USD amounts and
the link to each alert; it does not include token symbols or counterparty labels.
Disabling it discards what was waiting for the next digest. Returns the email status, in the same shape as
email in GET /v1/guard/notifications.
Errors: 400 with an invalid severity; 422 with an unknown field. Requires an API key assigned to a person
(403).
Cost: free.
curl --request PUT \
--url https://app.blockgence.com/v1/guard/email \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"enabled": true,
"min_severity": "high"
}
'import requests
url = "https://app.blockgence.com/v1/guard/email"
payload = {
"enabled": True,
"min_severity": "high"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, min_severity: 'high'})
};
fetch('https://app.blockgence.com/v1/guard/email', 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://app.blockgence.com/v1/guard/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'min_severity' => 'high'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.blockgence.com/v1/guard/email"
payload := strings.NewReader("{\n \"enabled\": true,\n \"min_severity\": \"high\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://app.blockgence.com/v1/guard/email")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"min_severity\": \"high\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/guard/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"min_severity\": \"high\"\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Authorizations
Headers
Response
Successful response.