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

# Phone Validation

> Validate phone number format, carrier information, and line type using the iDenfy phone validation API for fraud prevention checks.

<Note>
  **Requirements**

  * **API** key pair
  * Service **enabled** (done by iDenfy staff)
  * Number validation **credits**
</Note>

<Card title="Learn More" icon="globe" href="https://idenfy.com/phone-verification/">
  Phone Number Risk Scoring for Instant Validation -- receive risk scores, filter invalid numbers, and get detailed phone insights in one call.
</Card>

***

## Validate Phone Number

<Info>
  **Authorization:** `API key pair`
  **Method:** `POST`
  **Endpoint:** `https://ivs.idenfy.com/fraud/validate-phone`
</Info>

### Request Structure

<Warning>
  If the provided phone number is not in [E.164](https://en.wikipedia.org/wiki/E.164) format or it is not a mobile phone number, the server may return an empty string `""`.
</Warning>

| Key                | Required | Type     | Constraints                                         | Explanation                             |
| ------------------ | -------- | -------- | --------------------------------------------------- | --------------------------------------- |
| `phone_number`     | Yes      | `String` | [E.164](https://en.wikipedia.org/wiki/E.164) format | Phone number with country code to check |
| `current_location` | No       | `String` | Country alpha-2 code                                | Current IP address location             |

### Response Structure

| Key                    | Type   | Constraints                                                                                  | Explanation                                                                                                                                  |
| ---------------------- | ------ | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `risk_score`           | Float  | Min 0, Max 99                                                                                | Calculated score indicating how risky the phone number is.                                                                                   |
| `country_code`         | String | Country alpha-2 code                                                                         | Two character country code for the phone number.                                                                                             |
| `current_network`      | String | --                                                                                           | The full name of the carrier the phone number is associated with.                                                                            |
| `current_route`        | String | `mobile`, `landline`, `landline_premium`, `landline_tollfree`, `virtual`, `unknown`, `pager` | The type of network the phone number is associated with.                                                                                     |
| `original_network`     | String | --                                                                                           | The full name of the original carrier for the phone number.                                                                                  |
| `availability`         | String | `unknown`, `reachable`, `undeliverable`, `absent`, `bad_number`, `blacklisted`               | Whether the phone number can be called. Applicable to mobile numbers only.                                                                   |
| `validity`             | String | `unknown`, `valid`, `not_valid`, `inferred`, `inferred_not_valid`                            | Whether the number is valid. `inferred_not_valid` means it could not be determined and is likely invalid. Applicable to mobile numbers only. |
| `roaming`              | String | `unknown`, `roaming`, `not_roaming`                                                          | Whether the phone number is outside its home carrier network.                                                                                |
| `roaming_country`      | String | Country alpha-2 code                                                                         | If roaming, the country the phone number is roaming in.                                                                                      |
| `roaming_network_name` | String | --                                                                                           | If roaming, the carrier network the phone number is roaming in.                                                                              |
| `request_id`           | String | Max length 40                                                                                | The unique identifier for your request.                                                                                                      |

### Request Example

```json theme={"system"}
{
  "phone_number": "+12025550163",
  "current_location": "US"
}
```

### Response Example

```json theme={"system"}
{
  "risk_score": 10.0,
  "country_code": "US",
  "current_network": "United States Premium",
  "current_route": "unknown",
  "original_network": "United States Premium",
  "availability": "unknown",
  "validity": "not_valid",
  "roaming": "unknown",
  "roaming_country": null,
  "roaming_network_name": null,
  "request_id": "fcecf6e6-1ad7-4d5e-98a8-cc9b2d5575eb"
}
```
