Radar

Get User Risk Score

GET
/api/radar/risk

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:

  1. Send a Check Session request and include the user’s identifier in metadata.user (either id or email).
  2. The Radar service aggregates the user’s recent history and determines whether their behavior indicates elevated risk.
  3. Query GET /api/radar/risk with the same id or email to 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:

If recent violations exist for the user, Radar returns an elevated risk level; otherwise, it returns a normal risk level.

Authorizations

  • Authorizationstringheaderrequired

    API Key required. Format: Bearer wc-your-api-key

Headers

  • whitecircle-versionstringrequired

    API Version

    Example: "2025-06-15"

Query Parameters

  • emailstring | null

    User email address (provide either email or id, not both)

  • idstring | null

    External user ID (provide either email or id, not both)

Response

application/json

Success

  • risk_levelenum<string>required

    Available options: normal, elevated, severe