# Retrieve an assessment (/docs/api-reference/risk/get-risk-assessment)

The email address and IP address are removed 90 days after the assessment; the decision, reasons and signals stay for a year.

`GET https://api.coss.com/v1/risk/assessments/{id}`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Path parameters

- `id` (string, required): The assessment's id.

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.risk.assessments.get("rsk_01k7c8m4q2f3e9v6t5r1n0p8yz");
```

HTTP:

```sh
curl -X GET "https://api.coss.com/v1/risk/assessments/rsk_01k7c8m4q2f3e9v6t5r1n0p8yz" \
  -H "Authorization: Bearer $COSS_API_KEY"
```

Python:

```python
from coss import Coss

client = Coss()  # api_key= or COSS_API_KEY

client.risk.assessments.get(
    id="rsk_01k7c8m4q2f3e9v6t5r1n0p8yz",
)
```

Go:

```go
import (
	"context"

	cossclient "github.com/cosscom/coss-go/client"
	risk "github.com/cosscom/coss-go/risk"
)

client := cossclient.NewClient() // option.WithAPIKey(…) or COSS_API_KEY

request := &risk.GetAssessmentsRequest{
    ID: "rsk_01k7c8m4q2f3e9v6t5r1n0p8yz",
}
client.Risk.Assessments.Get(
    context.TODO(),
    request,
)
```

Ruby:

```ruby
require "coss"

client = Coss::Client.new # api_key: or COSS_API_KEY

client.risk.assessments.get(id: "rsk_01k7c8m4q2f3e9v6t5r1n0p8yz")
```

PHP:

```php
<?php

use Coss\Coss;

$client = new Coss(); // apiKey: or COSS_API_KEY

$client->risk->assessments->get(
    'rsk_01k7c8m4q2f3e9v6t5r1n0p8yz',
);
```

Java:

```java
import com.coss.Coss;
import com.coss.resources.risk.assessments.requests.GetAssessmentsRequest;

Coss client = Coss.builder().build(); // .apiKey(…) or COSS_API_KEY

client.risk().assessments().get(
    "rsk_01k7c8m4q2f3e9v6t5r1n0p8yz",
    GetAssessmentsRequest
        .builder()
        .build()
);
```

.NET:

```csharp
using Coss;
using Coss.Risk;

var client = new CossClient(); // apiKey: or COSS_API_KEY

await client.Risk.Assessments.GetAsync(
    new GetAssessmentsRequest { Id = "rsk_01k7c8m4q2f3e9v6t5r1n0p8yz" }
);
```

## Response 200

The assessment.

- `object` ("risk_assessment", required)
- `id` (string, required)
- `event` ("signup" | "login" | "message" | "checkout" | "custom", required): What is being assessed. `custom` events are named by `event_name`; velocity is counted per event.
- `event_name` (string | null, required): Your name for a `custom` event. `null`: none.
- `decision` ("allow" | "review" | "block", required): `allow`: go ahead. `review`: suspicious; let it through with limits, or hold it for a person. `block`: refuse it.
- `score` (number, required, 0-1): 0-1: how risky the signals are together. Lists can decide regardless of the score.
- `reasons` (object[], required): Why, most significant first.
  - `code` (string, required, one of "email.invalid", "email.disposable", "email.undeliverable", "email.role_account", "email.typo", "email.domain_new", "ip.tor", "ip.vpn_network", "ip.hosting_provider", "ip.vpn", "ip.proxy", "ip.relay", "ip.private", "velocity.signups_per_ip_1h", "velocity.signups_per_ip_24h", "velocity.signups_per_subnet_1h", "velocity.signups_per_email_domain_1h", "velocity.signups_per_mailbox_24h", "velocity.signups_per_device_24h", "velocity.checkouts_per_ip_1h", "velocity.checkouts_per_user_1h", "velocity.checkouts_per_card_24h", "velocity.logins_per_ip_1h", "velocity.logins_per_user_1h", "velocity.events_per_ip_1h", "velocity.events_per_user_1h", "duplicate.canonical_mailbox", "duplicate.device", "history.fraud_mailbox", "history.fraud_user", "history.fraud_ip", "history.fraud_subnet", "history.fraud_card", "history.fraud_device", "checkout.card_country_mismatch", "checkout.billing_country_mismatch", "checkout.prepaid_card", "device.automation", "device.invalid", "login.new_country", "login.new_network", "captcha.failed", "captcha.missing", "content.spam", "content.phishing", "content.malware", "content.fraud", "rule.matched", "list.blocked", "list.allowed"): The reason's code, listed under Risk's reasons in the docs.
  - `message` (string, required): What it means, in words. May change.
  - `value` (number): The count behind a `velocity.*` reason, or the score behind a `content.*` one.
  - `threshold` (number): What a `velocity.*` or `content.*` reason fires at.
  - `window` ("1h" | "24h"): `velocity.*`: the window it's counted over.
  - `suggestion` (string): `email.typo`: the likely domain.
  - `provider` (string): `ip.hosting_provider`, `ip.vpn_network`: the network's operator; `ip.vpn`: the VPN service.
  - `previous_user` (string | null): `duplicate.canonical_mailbox`, `duplicate.device`: your id of the user who has the mailbox or device, if known.
  - `previous_assessment` (string): `duplicate.canonical_mailbox`, `duplicate.device`: the assessment that first saw the mailbox or device.
  - `entry` (string): `list.*`: the matching list entry.
  - `rule` (string): `rule.matched`: the rule's id.
  - `name` (string): `rule.matched`: the rule's name.
  - `type` ("email" | "domain" | "ip" | "asn" | "country" | "user"): `list.*`: what matched.
- `signals` (object, required): What the assessment saw, by group. A group is `null` when it had nothing to go on.
  - `email` (object | null, required): What the address says. `null`: no email was given.
    - `domain` (string | null, required): `null` once the address is removed (90 days after the assessment).
    - `valid` (boolean, required): Whether it's syntactically valid.
    - `disposable` (boolean, required): Whether its domain is a known burner service.
    - `deliverability` ("deliverable" | "undeliverable" | "unknown", required): From DNS (MX, A, AAAA). `unknown` when the lookup failed or timed out.
    - `role_account` (boolean, required): Whether it's a role mailbox, like `info@`.
    - `free_provider` (boolean, required): Whether its domain is a free mailbox provider.
    - `suggestion` (string | null, required): `email.typo`: the likely intended domain. `null` otherwise.
    - `domain_age_days` (integer | null, required): Days since the domain was registered (RDAP); `null` when unknown or not looked up (free providers, disposable domains).
  - `ip` (object | null, required): What the IP address says. `null`: none was given.
    - `version` (4 | 6, required): IPv4 or IPv6.
    - `private` (boolean, required): Whether it's a private or reserved address.
    - `tor` (boolean, required): Whether it's a Tor exit.
    - `hosting` (boolean, required): Whether it's in a cloud, hosting or VPN network.
    - `hosting_provider` (string | null, required): That network's operator. `null` when it isn't one.
    - `hosting_kind` ("cloud" | "hosting" | "vpn" | null, required): `cloud`, `hosting` or `vpn`. `null` when it isn't one.
    - `asn` (integer | null, required): The network's autonomous system number. `null` when unknown.
    - `as_name` (string | null, required): The network's name. `null` when unknown.
    - `country` (string | null, required): ISO 3166-1 alpha-2.
    - `privacy` (object | null, required): From coss.com's IP privacy data provider (VPNs, proxies, relays). `null` when it isn't available or was not asked (private addresses).
      - `vpn` (boolean, required): Whether it's a VPN exit.
      - `proxy` (boolean, required): Whether it's a proxy.
      - `relay` (boolean, required): Whether it's a privacy relay.
      - `service` (string | null, required): The VPN or proxy service.
  - `velocity` (map of integer | null, required): `null` when velocity was unavailable (see `degraded`).
  - `captcha` (object | null, required): How the captcha went. `null`: no captcha applied.
    - `provided` (boolean, required): Whether the request carried a token.
    - `passed` (boolean | null, required): `null` when it couldn't be checked (no captcha configured, or the provider was unreachable).
  - `login` (object | null, required): Whether a login is new for this user. `null`: not a login of a user with history.
    - `new_country` (boolean, required): Whether this user never logged in from this country in this environment.
    - `new_network` (boolean, required): Whether this user never logged in from this network (ASN) in this environment.
  - `content` (object | null, required): `null` when no content was given or it couldn't be classified.
    - `spam` (number, required, 0-1): The model's probability (0-1) that it's spam.
    - `phishing` (number, required, 0-1): The model's probability (0-1) that it's phishing.
    - `malware` (number, required, 0-1): The model's probability (0-1) that it's malware.
    - `fraud` (number, required, 0-1): The model's probability (0-1) that it's fraud.
  - `checkout` (object | null, required): What you sent in `checkout`. `null`: not given.
    - `amount` (integer, required): The amount you sent, in the currency's smallest unit.
    - `currency` (string, required): The currency you sent.
    - `card_country` (string | null, required): The card's country. `null` when not given.
    - `card_funding` ("credit" | "debit" | "prepaid" | "unknown" | null, required): The card's funding type. `null` when not given.
    - `billing_country` (string | null, required): The billing country. `null` when not given.
    - `shipping_country` (string | null, required): The shipping country. `null` when not given.
  - `device` (object | null, required): What the device token said. `null`: none was given.
    - `valid` (boolean, required): `false`: the token was malformed or too old.
    - `automation` (boolean, required): WebDriver control or a headless browser.
    - `timezone` (string | null, required): IANA time zone (`Europe/London`).
    - `language` (string | null, required): The browser's first language.
    - `platform` (string | null, required): The browser's reported platform. `null` when it reported none.
    - `screen` (string | null, required): `<width>x<height>` in CSS pixels.
    - `touch` (boolean | null, required): Whether the device has a touch screen. `null` when it didn't say.
- `user` (object, required): Who it's about.
  - `id` (string | null, required): Your user id. `null`: none given.
  - `email` (string | null, required): `null` once removed (90 days after the assessment) or when none was given.
- `ip` (string | null, required): `null` once removed (90 days after).
- `degraded` (("email_dns" | "domain_age" | "ip_data" | "velocity" | "captcha" | "content" | "ip_privacy" | "usage_limit")[], required): Signal groups that were unavailable for this assessment (it was made without them). `usage_limit` means the plan's included assessments are used up, or a billing hold or budget applies: the assessment was free and made without velocity, memory of earlier events, content or address-level IP data.
- `outcome` ("legitimate" | "fraud" | "abuse" | null, required): The latest outcome you reported with feedback.
- `review_status` ("open" | "resolved" | null, required): `open` for `review` decisions until you send feedback, then `resolved`.
- `created_at` (string, required, date-time)

Example:

```json
{
  "object": "risk_assessment",
  "id": "rsk_01k7c8m4q2f3e9v6t5r1n0p8yz",
  "event": "signup",
  "event_name": null,
  "decision": "review",
  "score": 0.62,
  "reasons": [
    {
      "code": "email.typo",
      "message": "The domain looks like a typo of gmail.com.",
      "suggestion": "gmail.com"
    },
    {
      "code": "velocity.signups_per_ip_1h",
      "message": "7 sign-ups from this IP address in the last hour.",
      "value": 7,
      "threshold": 5,
      "window": "1h"
    }
  ],
  "signals": {
    "email": {
      "domain": "gmail.con",
      "valid": true,
      "disposable": false,
      "deliverability": "deliverable",
      "role_account": false,
      "free_provider": false,
      "suggestion": "gmail.com",
      "domain_age_days": 9
    },
    "ip": {
      "version": 4,
      "private": false,
      "tor": false,
      "hosting": false,
      "hosting_provider": null,
      "hosting_kind": null,
      "asn": 64500,
      "as_name": "Example Broadband",
      "country": "GB",
      "privacy": null
    },
    "velocity": {
      "ip_1h": 7,
      "ip_24h": 9,
      "subnet_1h": 7,
      "mailbox_24h": 1
    },
    "captcha": {
      "provided": true,
      "passed": true
    },
    "login": null,
    "content": null,
    "checkout": null,
    "device": null
  },
  "user": {
    "id": null,
    "email": "ada@gmail.con"
  },
  "ip": "203.0.113.7",
  "degraded": [],
  "outcome": null,
  "review_status": "open",
  "created_at": "2026-01-15T09:30:00.000Z"
}
```

## Errors

- `400`: The `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `404`: No assessment with this id exists in the API key's environment (`not_found`).
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: The API key could not be verified right now; retry (`service_unavailable`).