ATO risk evaluate
curl --request POST \
--url https://api.truthlocks.com/v1/risk/ato/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"subject_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"device_fingerprint": "<string>",
"action": "<string>"
}
'import requests
url = "https://api.truthlocks.com/v1/risk/ato/evaluate"
payload = {
"subject_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"device_fingerprint": "<string>",
"action": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject_id: '<string>',
ip_address: '<string>',
user_agent: '<string>',
device_fingerprint: '<string>',
action: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/risk/ato/evaluate', 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://api.truthlocks.com/v1/risk/ato/evaluate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject_id' => '<string>',
'ip_address' => '<string>',
'user_agent' => '<string>',
'device_fingerprint' => '<string>',
'action' => '<string>'
]),
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://api.truthlocks.com/v1/risk/ato/evaluate"
payload := strings.NewReader("{\n \"subject_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"device_fingerprint\": \"<string>\",\n \"action\": \"<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))
}HttpResponse<String> response = Unirest.post("https://api.truthlocks.com/v1/risk/ato/evaluate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subject_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"device_fingerprint\": \"<string>\",\n \"action\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/risk/ato/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subject_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"device_fingerprint\": \"<string>\",\n \"action\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"risk_score": 123,
"decision": "<string>",
"signals": [
{}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Account Takeover
Evaluate ATO risk
Evaluate a login event against account takeover heuristics. Tracks failed login velocity per subject and triggers alerts when thresholds are exceeded.
POST
/
v1
/
risk
/
ato
/
evaluate
ATO risk evaluate
curl --request POST \
--url https://api.truthlocks.com/v1/risk/ato/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"subject_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"device_fingerprint": "<string>",
"action": "<string>"
}
'import requests
url = "https://api.truthlocks.com/v1/risk/ato/evaluate"
payload = {
"subject_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"device_fingerprint": "<string>",
"action": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject_id: '<string>',
ip_address: '<string>',
user_agent: '<string>',
device_fingerprint: '<string>',
action: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/risk/ato/evaluate', 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://api.truthlocks.com/v1/risk/ato/evaluate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject_id' => '<string>',
'ip_address' => '<string>',
'user_agent' => '<string>',
'device_fingerprint' => '<string>',
'action' => '<string>'
]),
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://api.truthlocks.com/v1/risk/ato/evaluate"
payload := strings.NewReader("{\n \"subject_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"device_fingerprint\": \"<string>\",\n \"action\": \"<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))
}HttpResponse<String> response = Unirest.post("https://api.truthlocks.com/v1/risk/ato/evaluate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subject_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"device_fingerprint\": \"<string>\",\n \"action\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/risk/ato/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subject_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"device_fingerprint\": \"<string>\",\n \"action\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"risk_score": 123,
"decision": "<string>",
"signals": [
{}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Evaluates a login event against the ATO heuristic engine. The platform tracks failed logins per subject in a rolling one-hour window and derives a risk level from the current count. When a threshold is crossed, an alert is created and a risk signal is automatically ingested into the risk signal pipeline.
See the account takeover detection guide for the full workflow, threshold reference, and integration patterns.
Threshold rules
| Failed logins (1 h window) | Risk level | Auto-alert |
|---|---|---|
| 0–4 | normal | No |
| 5–9 | elevated | Yes — velocity_exceeded |
| 10–19 | high | Yes — velocity_exceeded |
| 20+ | critical | Yes — credential_stuffing |
Request
string
required
User identifier (user ID, email, or external ID).
string
required
Login event type:
login.failed, login.failed.repeated, login.success, login.new_devicestring
Type of subject. Defaults to
user.string
Source IP address for the login attempt.
Response
string
The subject that was evaluated.
string
Type of subject (
user).string
Current ATO risk level:
normal | elevated | high | criticalinteger
Numeric risk score: 10 (normal), 50 (elevated), 70 (high), 90 (critical).
integer
Number of failed logins in the current one-hour window.
boolean
true if a new alert was triggered by this evaluation.string
Alert category when triggered:
velocity_exceeded or credential_stuffing.string
UUID of the auto-ingested risk signal (only present when an alert fired).
string
The event type that was evaluated.

