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>"
}Activar o apagar tu resumen por correo y su severidad mínima
Activa o apaga tu resumen de alertas por correo y elige su severidad mínima.
Body {"enabled": true, "min_severity": "high"}. El resumen sale solo a tu email de la cuenta (no se acepta otro) y
junta en un correo las alertas nuevas que ves en la app: nunca sale un correo por alerta. Apagarlo descarta lo que
esperaba el próximo resumen. Responde el estado de tu correo (enabled, min_severity, to, available,
pending, held_since, topes y uso), como email en GET /v1/guard/notifications.
400 con una severidad inválida; 422 con un campo desconocido.
Necesita una key asignada a una persona (si no, 403).
Costo: 0 créditos.
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>"
}Autorizaciones
Encabezados
Caso activo (opcional): el token de un caso que podés ver. La consulta queda en el registro de actividad de ese caso y resuelve también sus labels propias. Un caso que no existe, se borró o ya no está compartido con vos da 400 case_unavailable y la consulta no se hace (sin cobro).
Respuesta
Successful Response