Normaliser l'événement de risque
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
}Signaux de risque
Normaliser l'événement d'identité
Soumettre un événement d’identité brut pour une normalisation automatique en un signal de risque. La couche de normalisation mappe les événements de la plateforme à des types de signaux standardisés avec des scores de risque pré-calibrés.
POST
/
v1
/
risk
/
events
Normaliser l'événement de risque
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
}Comment fonctionne la normalisation
Lorsque vous soumettez un événement d’identité, la plateforme :- Enregistre l’événement brut dans la piste d’audit
- Mappe le
event_typeà un type de signal canonique et à un score de risque de base - Enrichit le signal avec les métadonnées disponibles (niveau de confiance de l’émetteur, géolocalisation, appareil)
- Stocke un enregistrement
risk_signalprêt pour l’évaluation de la politique
Mappages d’événements intégrés
| Type d’événement | Type de signal | Score de 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.
Réponse
true si l’événement correspondait à une cartographie connue ; false s’il a utilisé le repli générique.Corps
application/json

