[**Documentation**](index.md)
***
[Documentation](packages.md) / Vonage Number Insights V2
# Vonage Number Insight V2 SDK for Node.js
 [](https://codecov.io/gh/Vonage/vonage-server-sdk)  [](../../CODE_OF_CONDUCT.md) [][license]
This is the Vonage Number Insight V2 SDK for Node.js for use with [Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage account. Sign up [for free at vonage.com][signup].
For full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).
* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
* [Testing](#testing)
## Installation
We recommend using this SDK as part of the overall [`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). Please see the main package for installation.
You can also use this SDK standalone if you only need access to just the Number insights V2 API.
### With NPM
```bash
npm install @vonage/number-insight-v2
```
### With Yarn
```bash
yarn add @vonage/number-insight-v2
```
## Usage
Unlike the other SDK's this package is not include in the [Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk)
```js
const { Auth } = require('@vonage/auth');
const { NumberInsightV2 } = require('@vonage/number-insight-v2');
const credentials = new Auth({
apiKey: API_KEY,
apiSecret: API_SECRET
});
const options = {};
const niClient = new NumberInsightV2(credentials, options);
```
Where `credentials` is any option from [`@vonage/auth`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md#options), and `options` is any option from [`@vonage/server-client`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-client/README.md#options)
## Promises
Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use `await` to wait for a response.
```js
const resp = await vonage.numberInsightV2.basicLookup(PHONE_NUMBER)
vonage.numberInsightV2.checkForFraud({
type: 'phone',
phone: PHONE_NUMBER,
insights: [Insight.SIM_SWAP, Insight.FRAUD_SCORE],
})
.then(resp => console.log(resp))
.catch(err => console.error(err));
```
## Testing
Run:
```bash
npm run test
```
[signup]: https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=node-server-sdk
[license]: _media/LICENSE.txt
## Enumerations
### Insight
Defined in: [number-insight-v2/lib/enums/insight.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/insight.ts#L4)
Enum representing the types of insights available for phone number checks.
#### Enumeration Members
| Enumeration Member | Value | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `FRAUD_SCORE` | `"fraud_score"` | Use this insight to check the fraud score associated with a phone number. | [number-insight-v2/lib/enums/insight.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/insight.ts#L8) |
| `SIM_SWAP` | `"sim_swap"` | Use this insight to check if a SIM swap has occurred for a phone number in the last 7 days. | [number-insight-v2/lib/enums/insight.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/insight.ts#L13) |
***
### Label
Defined in: [number-insight-v2/lib/enums/label.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/label.ts#L4)
Enum representing the labels for risk scores.
#### Enumeration Members
| Enumeration Member | Value | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `HIGH` | `"high"` | Represents a high risk score. | [number-insight-v2/lib/enums/label.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/label.ts#L18) |
| `LOW` | `"low"` | Represents a low risk score. | [number-insight-v2/lib/enums/label.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/label.ts#L8) |
| `MEDIUM` | `"medium"` | Represents a medium risk score. | [number-insight-v2/lib/enums/label.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/label.ts#L13) |
***
### RiskRecommendation
Defined in: [number-insight-v2/lib/enums/riskRecommendation.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/riskRecommendation.ts#L4)
Enum representing the recommendations based on risk scores.
#### Enumeration Members
| Enumeration Member | Value | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `ALLOW` | `"allow"` | Indicates that it is recommended to allow the action based on the risk score. | [number-insight-v2/lib/enums/riskRecommendation.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/riskRecommendation.ts#L8) |
| `BLOCK` | `"block"` | Indicates that it is recommended to block the action based on the risk score. | [number-insight-v2/lib/enums/riskRecommendation.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/riskRecommendation.ts#L18) |
| `FLAG` | `"flag"` | Indicates that it is recommended to flag the action based on the risk score. | [number-insight-v2/lib/enums/riskRecommendation.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/riskRecommendation.ts#L13) |
***
### Status
Defined in: [number-insight-v2/lib/enums/status.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/status.ts#L4)
Enum representing the possible status values for an operation.
#### Enumeration Members
| Enumeration Member | Value | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `COMPLETED` | `"completed"` | Indicates that the operation has been completed successfully. | [number-insight-v2/lib/enums/status.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/status.ts#L8) |
| `FAILED` | `"failed"` | Indicates that the operation has failed. | [number-insight-v2/lib/enums/status.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/enums/status.ts#L13) |
## Classes
### NumberInsightV2
Defined in: [number-insight-v2/lib/numberInsightV2.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/numberInsightV2.ts#L8)
Number Insight v2 is designed to give fraud scores for Application Integrations.
This class represents the client for making fraud check requests.
#### Extends
- [`Client`](Vonage-Server-Client.md#client)
#### Constructors
##### Constructor
```ts
new NumberInsightV2(credentials, options?): NumberInsightV2;
```
Defined in: server-client/dist/lib/client.d.ts:35
Creates a new instance of the Client.
###### Parameters
###### credentials
The authentication credentials or an authentication instance.
[`AuthInterface`](Vonage-Auth.md#authinterface) | [`AuthParams`](Vonage-Auth.md#authparams)
###### options?
[`ConfigParams`](Vonage-Server-Client.md#configparams)
Optional configuration settings for the client.
###### Returns
[`NumberInsightV2`](#numberinsightv2)
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`constructor`](Vonage-Server-Client.md#client#constructor)
#### Properties
##### auth
```ts
protected auth: AuthInterface;
```
Defined in: server-client/dist/lib/client.d.ts:24
The authentication instance responsible for generating authentication headers and query parameters.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`auth`](Vonage-Server-Client.md#client#auth)
##### authType
```ts
protected authType: AuthenticationType = AuthenticationType.BASIC;
```
Defined in: [number-insight-v2/lib/numberInsightV2.ts:9](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/numberInsightV2.ts#L9)
The type of authentication used for the client's requests.
###### Overrides
[`Client`](Vonage-Server-Client.md#client).[`authType`](Vonage-Server-Client.md#client#authtype)
##### config
```ts
protected config: ConfigParams;
```
Defined in: server-client/dist/lib/client.d.ts:28
Configuration settings for the client, including default hosts for various services and other request settings.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`config`](Vonage-Server-Client.md#client#config)
##### transformers
```ts
static transformers: object;
```
Defined in: server-client/dist/lib/client.d.ts:11
Static property containing utility transformers.
###### camelCaseObjectKeys
```ts
camelCaseObjectKeys: PartialTransformFunction;
```
###### kebabCaseObjectKeys
```ts
kebabCaseObjectKeys: PartialTransformFunction;
```
###### omit()
```ts
omit: (keys, obj) => TransformedObject;
```
###### Parameters
###### keys
`string`[]
###### obj
[`ObjectToTransform`](Vonage-Server-Client.md#objecttotransform)
###### Returns
[`TransformedObject`](Vonage-Server-Client.md#transformedobject)
###### snakeCaseObjectKeys
```ts
snakeCaseObjectKeys: PartialTransformFunction;
```
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`transformers`](Vonage-Server-Client.md#client#transformers)
#### Methods
##### addAuthenticationToRequest()
```ts
addAuthenticationToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:43
Adds the appropriate authentication headers or parameters to the request based on the authentication type.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addAuthenticationToRequest`](Vonage-Server-Client.md#client#addauthenticationtorequest)
##### addBasicAuthToRequest()
```ts
protected addBasicAuthToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:71
Adds basic authentication headers to the request.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addBasicAuthToRequest`](Vonage-Server-Client.md#client#addbasicauthtorequest)
##### addJWTToRequest()
```ts
protected addJWTToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:64
Adds a JWT to the request.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addJWTToRequest`](Vonage-Server-Client.md#client#addjwttorequest)
##### addQueryKeySecretToRequest()
```ts
protected addQueryKeySecretToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:57
Adds API key and secret to the request.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addQueryKeySecretToRequest`](Vonage-Server-Client.md#client#addquerykeysecrettorequest)
##### addQueryKeySecretToRequestBody()
```ts
protected addQueryKeySecretToRequestBody(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:50
Adds API key and secret to the request body.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addQueryKeySecretToRequestBody`](Vonage-Server-Client.md#client#addquerykeysecrettorequestbody)
##### ~~checkForFraud()~~
```ts
checkForFraud(params): Promise;
```
Defined in: [number-insight-v2/lib/numberInsightV2.ts:61](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/numberInsightV2.ts#L61)
Make a fraud check request with the provided parameters.
###### Parameters
###### params
[`FraudCheckParameters`](#fraudcheckparameters)
The parameters for the fraud check request.
###### Returns
`Promise`\<[`FraudCheck`](#fraudcheck)\>
- A Promise that resolves with the fraud score response.
###### Deprecated
This service is deprecated and will be turned off.
###### Examples
Check for fraud on a phone number.
```ts
import { Insight } from '@vonage/number-insight-v2';
const score = await client.numberInsightV2.checkForFraud({
type: 'phone',
number: '447700900000',
insights: [
Insight.FRAUD_SCORE,
],
});
console.log(`Fraud score: ${score.riskScore}`);
```
Check for SIM swap on a phone number.
```ts
import { Insight } from '@vonage/number-insight-v2';
const score = await client.numberInsightV2.checkForFraud({
type: 'phone',
number: '447700900000',
insights: [
Insight.SIM_SWAP,
],
});
console.log(`SIM swap detected: ${score.simSwap ? 'Yes' : 'No'}`);
```
Check both fraud score and SIM swap on a phone number.
```ts
import { Insight } from '@vonage/number-insight-v2';
const score = await client.numberInsightV2.checkForFraud({
type: 'phone',
number: '447700900000',
insights: [
Insight.SIM_SWAP,
Insight.FRAUD_SCORE,
],
});
console.log(`SIM swap detected: ${score.simSwap ? 'Yes' : 'No'}`);
console.log(`Fraud score: ${score.riskScore}`);
```
##### getConfig()
```ts
getConfig(): ConfigParams;
```
Defined in: server-client/dist/lib/client.d.ts:36
###### Returns
[`ConfigParams`](Vonage-Server-Client.md#configparams)
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`getConfig`](Vonage-Server-Client.md#client#getconfig)
##### parseResponse()
```ts
protected parseResponse(request, response): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:168
Parses the response based on its content type.
###### Type Parameters
###### T
`T`
The expected type of the parsed response data.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options.
###### response
`Response`
The raw response from the request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The parsed response.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`parseResponse`](Vonage-Server-Client.md#client#parseresponse)
##### prepareBody()
```ts
protected prepareBody(request): undefined | string;
```
Defined in: server-client/dist/lib/client.d.ts:158
Prepares the body for the request based on the content type.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options.
###### Returns
`undefined` \| `string`
- The prepared request body as a string or undefined.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`prepareBody`](Vonage-Server-Client.md#client#preparebody)
##### prepareRequest()
```ts
protected prepareRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:151
Prepares the request with necessary headers, authentication, and query parameters.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The initial request options.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The modified request options.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`prepareRequest`](Vonage-Server-Client.md#client#preparerequest)
##### sendDeleteRequest()
```ts
sendDeleteRequest(url): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:78
Sends a DELETE request to the specified URL.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the DELETE request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the DELETE request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendDeleteRequest`](Vonage-Server-Client.md#client#senddeleterequest)
##### sendFormSubmitRequest()
```ts
sendFormSubmitRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:86
Sends a POST request with form data to the specified URL.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the POST request.
###### payload?
`Record`\<`string`, `undefined` \| `string`\>
Optional payload containing form data to send with the POST request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the POST request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendFormSubmitRequest`](Vonage-Server-Client.md#client#sendformsubmitrequest)
##### sendGetRequest()
```ts
sendGetRequest(url, queryParams?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:94
Sends a GET request to the specified URL with optional query parameters.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the GET request.
###### queryParams?
Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the GET request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendGetRequest`](Vonage-Server-Client.md#client#sendgetrequest)
##### sendPatchRequest()
```ts
sendPatchRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:104
Sends a PATCH request to the specified URL with an optional payload.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the PATCH request.
###### payload?
Optional payload to be sent as the body of the PATCH request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the PATCH request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendPatchRequest`](Vonage-Server-Client.md#client#sendpatchrequest)
##### sendPostRequest()
```ts
sendPostRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:114
Sends a POST request to the specified URL with an optional payload.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the POST request.
###### payload?
Optional payload to be sent as the body of the POST request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the POST request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendPostRequest`](Vonage-Server-Client.md#client#sendpostrequest)
##### sendPutRequest()
```ts
sendPutRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:124
Sends a PUT request to the specified URL with an optional payload.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the PUT request.
###### payload?
Optional payload to be sent as the body of the PUT request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the PUT request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendPutRequest`](Vonage-Server-Client.md#client#sendputrequest)
##### sendRequest()
```ts
sendRequest(request): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:144
Sends a request adding necessary headers, handling authentication, and parsing the response.
###### Type Parameters
###### T
`T`
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The options defining the request, including URL, method, headers, and data.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The parsed response from the request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendRequest`](Vonage-Server-Client.md#client#sendrequest)
##### sendRequestWithData()
```ts
sendRequestWithData(
method,
url,
payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:135
Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.
###### Type Parameters
###### T
`T`
###### Parameters
###### method
The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).
[`POST`](Vonage-Vetch.md#httpmethods#post) | [`PUT`](Vonage-Vetch.md#httpmethods#put) | [`PATCH`](Vonage-Vetch.md#httpmethods#patch)
###### url
`string`
The URL endpoint for the request.
###### payload?
Optional payload to be sent as the body of the request, JSON-encoded.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendRequestWithData`](Vonage-Server-Client.md#client#sendrequestwithdata)
## Type Aliases
### ~~FraudCheck~~
```ts
type FraudCheck = object;
```
Defined in: [number-insight-v2/lib/types/fraudCheck.ts:10](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudCheck.ts#L10)
Represents the result of a fraud check request.
#### Deprecated
This service is deprecated and will be turned off.
#### Properties
##### ~~fraudScore?~~
```ts
optional fraudScore: FraudScore;
```
Defined in: [number-insight-v2/lib/types/fraudCheck.ts:29](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudCheck.ts#L29)
The result of the 'fraud_score' insight operation (optional).
##### ~~phone~~
```ts
phone: PhoneInfo;
```
Defined in: [number-insight-v2/lib/types/fraudCheck.ts:24](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudCheck.ts#L24)
An object containing information about the phone number used in the fraud check operation(s).
##### ~~requestId~~
```ts
requestId: string;
```
Defined in: [number-insight-v2/lib/types/fraudCheck.ts:14](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudCheck.ts#L14)
Unique UUID for this request for reference.
##### ~~simSwap?~~
```ts
optional simSwap: SimSwap;
```
Defined in: [number-insight-v2/lib/types/fraudCheck.ts:34](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudCheck.ts#L34)
The result of the 'sim_swap' insight operation (optional).
##### ~~type~~
```ts
type: "phone";
```
Defined in: [number-insight-v2/lib/types/fraudCheck.ts:19](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudCheck.ts#L19)
The type of lookup used in the request. Currently always 'phone'.
***
### ~~FraudCheckParameters~~
```ts
type FraudCheckParameters = object;
```
Defined in: [number-insight-v2/lib/types/parameters/fraudParameters.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/parameters/fraudParameters.ts#L8)
Represents the parameters for making a fraud check request.
#### Deprecated
This service is deprecated and will be turned off.
#### Properties
##### ~~insights~~
```ts
insights: Insight[];
```
Defined in: [number-insight-v2/lib/types/parameters/fraudParameters.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/parameters/fraudParameters.ts#L23)
The insight(s) you need, at least one of: 'fraud_score' and 'sim_swap'.
##### ~~phone~~
```ts
phone: string;
```
Defined in: [number-insight-v2/lib/types/parameters/fraudParameters.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/parameters/fraudParameters.ts#L18)
A single phone number that you need insight about in the E.164 format.
Don't use a leading + or 00 when entering a phone number, start with the country code, e.g., 447700900000.
##### ~~type~~
```ts
type: "phone";
```
Defined in: [number-insight-v2/lib/types/parameters/fraudParameters.ts:12](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/parameters/fraudParameters.ts#L12)
The type of lookup used in the request. Currently always 'phone'.
***
### FraudCheckRequest
```ts
type FraudCheckRequest = object;
```
Defined in: [number-insight-v2/lib/types/requests/fraudCheckRequest.ts:10](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/requests/fraudCheckRequest.ts#L10)
Represents a fraud check request.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
#### Properties
##### insights
```ts
insights: Insight[];
```
Defined in: [number-insight-v2/lib/types/requests/fraudCheckRequest.ts:25](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/requests/fraudCheckRequest.ts#L25)
The insight(s) you need, at least one of: 'fraud_score' and 'sim_swap'.
##### phone
```ts
phone: string;
```
Defined in: [number-insight-v2/lib/types/requests/fraudCheckRequest.ts:20](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/requests/fraudCheckRequest.ts#L20)
A single phone number that you need insight about in the E.164 format.
Don't use a leading + or 00 when entering a phone number, start with the country code, e.g., 447700900000.
##### type
```ts
type: "phone";
```
Defined in: [number-insight-v2/lib/types/requests/fraudCheckRequest.ts:14](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/requests/fraudCheckRequest.ts#L14)
The type of lookup used in the request. Currently always 'phone'.
***
### FraudCheckResponse
```ts
type FraudCheckResponse = object & Omit;
```
Defined in: [number-insight-v2/lib/types/responses/fraudCheckResponse.ts:12](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/responses/fraudCheckResponse.ts#L12)
Represents the response from a fraud check request.
#### Type declaration
##### fraud\_score
```ts
fraud_score: FraudScoreResponse;
```
The response data for the 'fraud_score' insight operation.
##### request\_id
```ts
request_id: string;
```
Unique UUID for this request for reference.
##### sim\_swap
```ts
sim_swap: SimSwap;
```
The response data for the 'sim_swap' insight operation.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### ~~FraudScore~~
```ts
type FraudScore = object;
```
Defined in: [number-insight-v2/lib/types/fraudScore.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudScore.ts#L8)
Represents the result of the fraud_score insight operation.
#### Deprecated
This service is deprecated and will be turned off.
#### Properties
##### ~~label~~
```ts
label: Label;
```
Defined in: [number-insight-v2/lib/types/fraudScore.ts:24](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudScore.ts#L24)
Mapping of risk score to a verbose description.
Must be one of the values from the 'Label' enum.
##### ~~riskRecommendation~~
```ts
riskRecommendation: RiskRecommendation;
```
Defined in: [number-insight-v2/lib/types/fraudScore.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudScore.ts#L18)
Recommended action based on the riskScore.
Must be one of the values from the 'RiskRecommendation' enum.
##### ~~riskScore~~
```ts
riskScore: string;
```
Defined in: [number-insight-v2/lib/types/fraudScore.ts:12](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudScore.ts#L12)
Score derived from evaluating fraud-related data associated with the phone number.
##### ~~status~~
```ts
status: Status;
```
Defined in: [number-insight-v2/lib/types/fraudScore.ts:30](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/fraudScore.ts#L30)
The status of the fraud_score call.
Must be one of the values from the 'Status' enum.
***
### FraudScoreResponse
```ts
type FraudScoreResponse = object & Omit;
```
Defined in: [number-insight-v2/lib/types/responses/fraudScoreResponse.ts:11](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/responses/fraudScoreResponse.ts#L11)
Represents the response data for the 'fraud_score' insight operation.
#### Type declaration
##### risk\_recommendation
```ts
risk_recommendation: RiskRecommendation;
```
Recommended action based on the risk_score.
Must be one of the values from the 'RiskRecommendation' enum.
##### risk\_score
```ts
risk_score: string;
```
Score derived from evaluating fraud-related data associated with the phone number.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### PhoneInfo
```ts
type PhoneInfo = object;
```
Defined in: [number-insight-v2/lib/types/phoneInfo.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/phoneInfo.ts#L4)
Represents information about a phone number.
#### Properties
##### carrier?
```ts
optional carrier: string;
```
Defined in: [number-insight-v2/lib/types/phoneInfo.ts:14](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/phoneInfo.ts#L14)
The name of the network carrier (optional).
Included if insights included 'fraud_score'.
##### phone
```ts
phone: string;
```
Defined in: [number-insight-v2/lib/types/phoneInfo.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/phoneInfo.ts#L8)
The phone number.
##### type?
```ts
optional type: string;
```
Defined in: [number-insight-v2/lib/types/phoneInfo.ts:20](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/phoneInfo.ts#L20)
Type of phone (optional). Examples include Mobile, Landline, VOIP, PrePaid, Personal, Toll-Free.
Included if insights included 'fraud_score'.
***
### SimSwap
```ts
type SimSwap = object;
```
Defined in: [number-insight-v2/lib/types/simSwap.ts:6](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/simSwap.ts#L6)
Represents the result of the sim_swap insight operation.
#### Properties
##### reason?
```ts
optional reason: string;
```
Defined in: [number-insight-v2/lib/types/simSwap.ts:21](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/simSwap.ts#L21)
The reason for a sim swap error response. Returned only if the sim swap check fails.
##### status
```ts
status: Status;
```
Defined in: [number-insight-v2/lib/types/simSwap.ts:10](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/simSwap.ts#L10)
The status of the sim_swap call. Must be one of the values from the 'Status' enum.
##### swapped?
```ts
optional swapped: boolean;
```
Defined in: [number-insight-v2/lib/types/simSwap.ts:16](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/number-insight-v2/lib/types/simSwap.ts#L16)
true if the sim was swapped in the last 7 days, false otherwise.
Returned only if the sim swap check succeeds.