> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encrata.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> ## Submitting feedback
> If you find an error, a missing step, or information that is outdated or misleading on this page — especially if it stopped you from completing your task — report it so the Encrata docs team can fix it.
> Send a POST request to https://docs.encrata.com/feedback with a JSON body containing `path` (the full URL of the page, for example `https://docs.encrata.com/quickstart`) and `feedback` (what was wrong and what you expected):
> curl -X POST https://docs.encrata.com/feedback -H 'Content-Type: application/json' -d '{"path": "https://docs.encrata.com/quickstart", "feedback": "Step 3 uses a parameter that the API rejects."}'
> Do not include API keys, personal data, or other secrets in your feedback.

# Phone Risk

> Score a phone number for fraud. Returns high_risk, suspicious, or safe with plain-language reasons. 1 credit, with free repeats for 6 months.

Phone Risk tells you whether a number is risky to deal with, and why. Use it to
block or review sign-ups, orders, and payouts.

`POST /api/lookup/phone/risk`

Requires an [Encrata API key](https://docs.encrata.com/authentication.md) in the `Authorization` header.

## Request

**phone** `string` *required*

The phone number in E.164 format, for example `+14155552671`. You can send it
as `query` instead.

### Example request

```bash cURL theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -X POST "https://developer.encrata.com/api/lookup/phone/risk" \
  -H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+14155552671"}'
```

```python Python theme={"theme":{"light":"github-light","dark":"vesper"}}
import requests

resp = requests.post(
    "https://developer.encrata.com/api/lookup/phone/risk",
    headers={"Authorization": "Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={"phone": "+14155552671"},
)
print(resp.json())
```

```javascript JavaScript theme={"theme":{"light":"github-light","dark":"vesper"}}
const resp = await fetch("https://developer.encrata.com/api/lookup/phone/risk", {
  method: "POST",
  headers: {
    Authorization: "Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ phone: "+14155552671" }),
});
const data = await resp.json();
```

## How the verdict is decided

The checks run in this order. The first match wins.

| `verdict` | When | Suggested action |
| - | - | - |
| `high_risk` | `risk_level` is `high`, or the number was reported for abuse or fraud. | Block. |
| `suspicious` | `risk_level` is `medium`, or the number is VoIP, disposable, or in at least one breach. | Review. |
| `safe` | None of the above. | Allow. |

A breach alone makes a number `suspicious`, not `high_risk`. Many real numbers
have leaked at some point.

## Response

The lookup is in `result`. `message` is `Phone risk assessment ready.`

**phone** `string`

The number as the data source returned it.

**verdict** `string`

`high_risk`, `suspicious`, or `safe`. See
[How the verdict is decided](#how-the-verdict-is-decided).

**reasons** `string[]`

Why, in plain language. Always has at least one entry. Possible values:
`Reported for abuse or fraud`, `High risk score`, `Medium risk score`,
`VoIP number (often used in scams)`, `Disposable / temporary number`,
`Exposed in known data breaches`, and, when nothing was found,
`No risk signals detected`.

**risk\_level** `string`

The data source's risk level: `low`, `medium`, or `high`. Left out when
unknown.

**is\_abuse\_detected** `boolean`

`true` when the number was reported for abuse or fraud.

**is\_disposable** `boolean`

`true` for a temporary or burner number.

**is\_voip** `boolean`

`true` for a VoIP line.

**total\_breaches** `number`

Number of known breaches the number appears in.

**first\_breached** `string`

Date of the earliest breach. Left out when there are none.

**last\_breached** `string`

Date of the latest breach. Left out when there are none.

**credits** `number`

Credits charged: `1` on your first risk check of this number, `0` for a
repeat within 6 months.

**cached** `boolean`

`true` when the report came from Encrata's cache. It isn't a billing signal.
Left out when `false`.

## Errors

See [Phone Lookup errors](https://docs.encrata.com/api-reference/endpoint/phone-lookup.md#errors). Risk
adds no other cases.

## Credits

Each check costs **1 credit**. Checking the same number again within 6 months is
free (`credits: 0`). The window is shared by your workspace. See
[Credits](https://docs.encrata.com/credits.md#free-repeat-window).

```bash cURL theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -X POST "https://developer.encrata.com/api/lookup/phone/risk" \
  -H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+14155552671"}'
```

```json 200 Suspicious theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "success": true,
  "result": {
    "phone": "14155552671",
    "verdict": "suspicious",
    "risk_level": "low",
    "is_abuse_detected": false,
    "is_disposable": false,
    "is_voip": false,
    "total_breaches": 2,
    "first_breached": "2019-07-24",
    "last_breached": "2021-04-03",
    "reasons": ["Exposed in known data breaches"],
    "credits": 1
  },
  "message": "Phone risk assessment ready."
}
```

```json 200 High risk theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "success": true,
  "result": {
    "phone": "12125550147",
    "verdict": "high_risk",
    "risk_level": "high",
    "is_abuse_detected": true,
    "is_disposable": true,
    "is_voip": true,
    "total_breaches": 0,
    "reasons": [
      "Reported for abuse or fraud",
      "High risk score",
      "VoIP number (often used in scams)",
      "Disposable / temporary number"
    ],
    "credits": 1
  },
  "message": "Phone risk assessment ready."
}
```

```json 200 Safe theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "success": true,
  "result": {
    "phone": "442071838750",
    "verdict": "safe",
    "risk_level": "low",
    "is_abuse_detected": false,
    "is_disposable": false,
    "is_voip": false,
    "total_breaches": 0,
    "reasons": ["No risk signals detected"],
    "credits": 1
  },
  "message": "Phone risk assessment ready."
}
```

```json 402 theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "success": false,
  "result": { "code": "insufficient_credits" },
  "message": "You don't have enough credits for this lookup. Top up to continue."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.