Normalizar evento de riesgo
curl --request POST \
--url https://api.truthlocks.com/v1/risk/events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"event_source": "<string>",
"event_type": "<string>",
"subject_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_source: '<string>', event_type: '<string>', subject_id: '<string>'})
};
fetch('https://api.truthlocks.com/v1/risk/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/events"
payload = {
"event_source": "<string>",
"event_type": "<string>",
"subject_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/risk/events"
payload := strings.NewReader("{\n \"event_source\": \"<string>\",\n \"event_type\": \"<string>\",\n \"subject_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"event_id": "<string>",
"signal_id": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Señales de Riesgo
Normalizar evento de identidad
Envíe un evento de identidad sin procesar para su normalización automática en una señal de riesgo. La capa de normalización mapea los eventos de la plataforma a tipos de señales estandarizados con puntuaciones de riesgo precalibradas.
POST
/
v1
/
risk
/
events
Normalizar evento de riesgo
curl --request POST \
--url https://api.truthlocks.com/v1/risk/events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"event_source": "<string>",
"event_type": "<string>",
"subject_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_source: '<string>', event_type: '<string>', subject_id: '<string>'})
};
fetch('https://api.truthlocks.com/v1/risk/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/events"
payload = {
"event_source": "<string>",
"event_type": "<string>",
"subject_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/risk/events"
payload := strings.NewReader("{\n \"event_source\": \"<string>\",\n \"event_type\": \"<string>\",\n \"subject_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"event_id": "<string>",
"signal_id": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Cómo funciona la normalización
Cuando envía un evento de identidad, la plataforma:- Registra el evento sin procesar en la pista de auditoría.
- Asigna el
event_typea un tipo de señal canónico y una puntuación de riesgo base. - Enriquece la señal con metadatos disponibles (nivel de confianza del emisor, geolocalización, dispositivo)
- Almacena un registro
risk_signallisto para la evaluación de políticas
Mapeos de eventos incorporados
| Tipo de evento | Tipo de señal | Puntuación base |
|---|---|---|
verification.failed | behavior | 60 |
verification.invalid_sig | behavior | 75 |
login.failed.repeated | ato | 70 |
login.suspicious_geo | geo_anomaly | 65 |
attestation.deepfake_suspect | deepfake | 85 |
session.hijack_suspect | ato | 90 |
behavior.
Respuesta
true si el evento coincidió con una asignación conocida; false si utilizó el respaldo genérico.Cuerpo
application/json

