GET
Use this endpoint to retrieve a user’s risk level using either email or id.
How it works
White Circle can assess a user’s Risk Score by correlating their recent sessions with policy violations. To enable this:
- Send a Check Session request and include the user’s identifier in
metadata.user(eitheridoremail). - The Radar service aggregates the user’s recent history and determines whether their behavior indicates elevated risk.
- Query
GET /api/radar/riskwith the sameidoremailto fetch the current Risk Score.
Adding user identity to Check Session
Include metadata.user.id or metadata.user.email in your Check Session payload. This lets Radar associate policy outcomes with a specific user over time.
JSON
{
"messages": [
{ "role": "user", "content": "Hello, can you check this for policy issues?" }
],
"metadata": {
"user": {
"id": "user-123",
"email": "[email protected]",
"ip": "224.16.0.23",
"mac_address": "00:11:22:33:44:55",
"name": "John Doe"
}
}
}Fetching the Risk Score
Use this endpoint to retrieve the current risk level for a user:
GET /api/radar/[email protected]GET /api/radar/risk?id=user-123
If recent violations exist for the user, Radar returns an elevated risk level; otherwise, it returns a normal risk level.