<!-- llms.txt: https://workos.com/llms.txt -->
<!-- feedback.md: https://workos.com/docs/feedback.md -->

import { DocsAccordionHydrator } from "../../../../../components/docs-accordion-hydrator";
import { DocsAccordion } from "../../../../../components/docs-accordion";

# Radar detections

A Radar detection records that a Radar control fired on an authentication attempt, the verdict Radar reached, and the evidence for why. Authentication events such as `authentication.radar_risk_detected` include the detection's ID as `radar_detection_id`.

:::code-group{title="Example Radar detection"}

```json language="json"
{
  "object": "radar_detection",
  "id": "detection_01HZBC6N1EB1ZY7KG32X",
  "attempt_id": "radar_att_01HZBC6N1EB1ZY7KG32X",
  "control": "impossible_travel",
  "verdict": "block",
  "challenge_type": null,
  "evidence": {
    "control": "impossible_travel",
    "summary": "Sign-in from Hong Kong, HK 35 min after New York, US (8,543 km).",
    "details": {
      "previous": {
        "attempt_id": "radar_att_01HZBC6N1EB1ZY7KG32Y",
        "ip_address": "198.51.100.7",
        "user_agent": "Mozilla/5.0",
        "location": {
          "city": "New York",
          "country": "US"
        },
        "created_at": "2026-11-16T11:25:00.000Z"
      },
      "distance_km": 8543,
      "speed_km_per_s": 4.07
    }
  },
  "ip_address": "192.0.2.44",
  "location": {
    "city": "Hong Kong",
    "country": "HK"
  },
  "user_agent": "Mozilla/5.0",
  "email": "user@example.com",
  "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
  "action": "login",
  "auth_method": "password",
  "created_at": "2026-11-16T12:00:00.000Z",
  "updated_at": "2026-11-16T12:00:00.000Z"
}
```

:::

## Evidence details

The fields in `evidence.details` depend on `evidence.control`. Optional fields are omitted when Radar didn't record them.

<DocsAccordion.Header as="h3">Bot detection</DocsAccordion.Header>

`control: "bot_detection"`

| Field | Type | Description |
| --- | --- | --- |
| `signals` | object\[] | The bot detection signals that fired, and what each would have done on its own. |
| `decided_by` | string, optional | The signal that determined the verdict. |
| `ip_risk` | string\[], optional | Why the IP address is risky. |
| `email_pattern` | string\[], optional | Why the email address looks suspicious. |
| `browser_signals` | string\[], optional | Why the browser looks automated. |
| `ip_sign_ups` | object, optional | How many recent sign-ups came from this IP address. |
| `domain_sign_ups` | object, optional | How many recent sign-ups used this email domain. |

<DocsAccordion.Header as="h3">Brute force attack</DocsAccordion.Header>

`control: "brute_force_attack"`

| Field | Type | Description |
| --- | --- | --- |
| `attempts` | integer | The number of sign-in attempts. |
| `window_minutes` | integer | The window the attempts were counted in. |
| `matched_on` | string | What the attempts had in common. |

<DocsAccordion.Header as="h3">Domain protections</DocsAccordion.Header>

`control: "domain_protections"`

| Field | Type | Description |
| --- | --- | --- |
| `list_id` | string | The ID of the matched list. |
| `list` | object | null | The list the domain matched, as it is now. `null` if it was deleted. |
| `also_matched_list_ids` | string\[], optional | The IDs of other lists the domain is on. |
| `also_matched_lists` | (object | null)\[], optional | The other lists the domain is on. |
| `matched_domain` | string, optional | The domain that matched the list. |

<DocsAccordion.Header as="h3">Impossible travel</DocsAccordion.Header>

`control: "impossible_travel"`

| Field | Type | Description |
| --- | --- | --- |
| `previous` | object | The user's previous successful sign-in, which this one is compared against. |
| `distance_km` | number | The distance from the previous sign-in, in kilometers. |
| `speed_km_per_s` | number | The speed needed to travel that distance, in kilometers per second. |

<DocsAccordion.Header as="h3">Repeat sign-up</DocsAccordion.Header>

`control: "repeat_sign_up"`

The fields depend on `matched_on`.

| Field | Type | Description |
| --- | --- | --- |
| `matched_on` | `"email"` | `"normalized_email"` | `email` if the same email address signed up repeatedly, `normalized_email` if the email address is an alias of an existing user's. |
| `prior_sign_ups` | integer | The number of earlier sign-ups. Only when `matched_on` is `email`. |
| `window_days` | integer | The window the sign-ups were counted in. Only when `matched_on` is `email`. |
| `matched_user_id` | string | The existing user whose email this sign-up is an alias of. Only when `matched_on` is `normalized_email`. |

<DocsAccordion.Header as="h3">Stale account</DocsAccordion.Header>

`control: "stale_account"`

| Field | Type | Description |
| --- | --- | --- |
| `last_activity_at` | string | null | When the user was last active. `null` if unknown. |

<DocsAccordion.Header as="h3">Unrecognized device</DocsAccordion.Header>

`control: "unrecognized_device"`

| Field | Type | Description |
| --- | --- | --- |
| `previous_device` | object | null | The device the user last signed in from. `null` if Radar hasn't seen an earlier device. |

<DocsAccordion.Header as="h3">Restriction</DocsAccordion.Header>

`control: "restriction"`

The fields depend on `type`.

| Field | Type | Description |
| --- | --- | --- |
| `type` | `"list"` | `"blocked_tld"` | `"sign_up"` | `"sms_sign_in"` | What restricted the attempt: a block list, a blocked top-level domain, a rule that always challenges sign-ups, or sign-in by SMS. |
| `list_id` | string | The ID of the matched list. Only when `type` is `list`. |
| `list` | object | null | The matched list as it is now, or `null` if it has since been deleted. Only when `type` is `list`. |
| `entry` | string, optional | The list entry that matched. Only when `type` is `list`. |
| `trigger` | string | Why Radar restricted SMS sign-in. Only when `type` is `sms_sign_in`. |
| `phone_country` | string, optional | The country of the phone number. Only when `trigger` is `country_mismatch`. |
| `line_type` | string, optional | The line type of the phone number, such as `voip`. Only when `trigger` is `non_mobile_line`. |
| `masked_phone_number` | string, optional | The phone number, masked to its last four digits. Only when `type` is `sms_sign_in`. |

## Get a Radar detection

Get a Radar detection from the last 30 days, including the evidence for why Radar fired.

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/radar/detections/detection_01HZBC6N1EB1ZY7KG32X" \
  --header "Authorization: Bearer sk_example_123456789"
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.radar.get_detection(id: "detection_01HZBC6N1EB1ZY7KG32X")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.radar.get_detection(id_="detection_01HZBC6N1EB1ZY7KG32X")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Radar().GetDetection(context.Background(), "detection_01HZBC6N1EB1ZY7KG32X")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->radar()->getDetection(id: "detection_01HZBC6N1EB1ZY7KG32X");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.radar.getDetection("detection_01HZBC6N1EB1ZY7KG32X");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Radar.GetDetectionAsync("detection_01HZBC6N1EB1ZY7KG32X");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .radar()
        .get_detection("detection_01HZBC6N1EB1ZY7KG32X")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "radar_detection",
  "id": "detection_01HZBC6N1EB1ZY7KG32X",
  "attempt_id": "radar_att_01HZBC6N1EB1ZY7KG32X",
  "control": "bot_detection",
  "verdict": "challenge",
  "challenge_type": "email",
  "evidence": {
    "control": "bot_detection",
    "summary": "Sign-up from a Tor exit node with an email format shared by many recent sign-ups. The action was decided by the risky IP. The email pattern would also have challenged.",
    "details": {
      "signals": [
        {
          "signal": "risky_ip",
          "action": "challenge"
        },
        {
          "signal": "suspicious_email_pattern",
          "action": "challenge"
        }
      ],
      "decided_by": "risky_ip",
      "ip_risk": [
        "tor"
      ],
      "email_pattern": [
        "repeated_format"
      ]
    }
  },
  "ip_address": "203.0.113.42",
  "location": {
    "city": "San Francisco",
    "country": "US"
  },
  "user_agent": "Mozilla/5.0",
  "email": "user@example.com",
  "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
  "action": "signup",
  "auth_method": "password",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

### radar_detection

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | "radar_detection" | Yes | Distinguishes the Radar detection object. |
| `id` | string | Yes | The unique ID of the detection. |
| `attempt_id` | string | Yes | The ID of the authentication attempt. |
| `control` | "bot_detection" \| "brute_force_attack" \| "domain_protections" \| "impossible_travel" \| "repeat_sign_up" \| "stale_account" \| "unrecognized_device" \| "restriction" | Yes | The Radar control that determined the verdict. |
| `verdict` | "allow" \| "block" \| "challenge" \| "log" | Yes | The verdict Radar reached for the attempt. |
| `challenge_type` | "email" \| "sms" \| null | Yes | The challenge Radar issued, if the verdict is `challenge`. |
| `evidence` | object \| null | Yes | Why Radar fired. `null` for detections recorded before evidence was captured. |
| `ip_address` | string | Yes | The IP address of the attempt. |
| `location` | object | Yes | Where the IP address is located. |
| `user_agent` | string | Yes | The user agent of the attempt. |
| `email` | string | Yes | The email address used in the attempt. |
| `user_id` | string \| null | Yes | The ID of the user, if one exists. |
| `action` | "signup" \| "login" \| null | Yes | Whether the attempt was a sign-up or a sign-in, matching the `authentication.radar_risk_detected` event. `null` if unknown. |
| `auth_method` | "password" \| "passkey" \| "magic_auth" \| "oauth" \| "sso" \| "authenticator" \| "sms_otp" \| "other" \| null | Yes | The authentication method used for the attempt, matching the `authentication.radar_risk_detected` event. |
| `created_at` | string | Yes | The timestamp when the detection was created. |
| `updated_at` | string | Yes | The timestamp when the detection was last updated. |

### GET /radar/detections/{id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The unique ID of the Radar detection. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `radar_detection` | object | Distinguishes the Radar detection object. |