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

# IPQS: Phone Validate

> Screen a known phone number for fraud score, DNC status, suspicious activity, carrier, and line-type risk after primary phone validation.

Screen a known phone number for fraud score, DNC status, suspicious activity, carrier, and line-type risk after primary phone validation.

> [!NOTE]
>
> Tool ID: `ipqs_phone_validate`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'ipqs_phone_validate',
  {
    "phone": "+14155550123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute ipqs_phone_validate --input '{
  "phone": "+14155550123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "status": "example",
  "result": {
    "data": {
      "valid": true,
      "active": true,
      "formatted": "example",
      "local_format": "example",
      "fraud_score": 123,
      "VOIP": true,
      "prepaid": true,
      "risky": true,
      "name": "Example",
      "carrier": "example",
      "line_type": "example",
      "country": "US",
      "region": "example",
      "do_not_call": true,
      "tcpa_blacklist": true,
      "active_status": "example",
      "request_id": "request_123"
    }
  }
}
```

Use `deepline describe ipqs_phone_validate --json` for the latest machine-readable contract.

## Input reference

Validate a single phone number for fraud risk, line type, and carrier metadata.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.phone` | `string` | Yes | — | Phone number to validate. Minimum length: 1. |
| `payload.country` | `array` | No | — | ISO-3166 country codes to bias lookup (e.g. \["US","CA"]). |
| `payload.strictness` | `0 \| 1 \| 2` | No | — | Strictness level 0-2. Higher = more false positives but catches more fraud. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Validate a single phone number for fraud risk, line type, and carrier metadata.",
    "properties": {
      "phone": {
        "type": "string",
        "description": "Phone number to validate.",
        "minLength": 1
      },
      "country": {
        "type": "array",
        "description": "ISO-3166 country codes to bias lookup (e.g. [\"US\",\"CA\"]).",
        "items": {
          "type": "string",
          "minLength": 1
        }
      },
      "strictness": {
        "description": "Strictness level 0-2. Higher = more false positives but catches more fraud.",
        "anyOf": [
          {
            "type": "number",
            "const": 0
          },
          {
            "type": "number",
            "const": 1
          },
          {
            "type": "number",
            "const": 2
          }
        ]
      }
    },
    "required": [
      "phone"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.status` | `string` | Yes | — | — |
| `result.result` | `object` | Yes | — | — |
| `result.result.data` | `object` | Yes | — | — |
| `result.result.data.valid` | `boolean` | Yes | — | — |
| `result.result.data.active` | `boolean` | Yes | — | — |
| `result.result.data.formatted` | `string` | Yes | — | — |
| `result.result.data.local_format` | `string` | Yes | — | — |
| `result.result.data.fraud_score` | `integer` | Yes | — | — |
| `result.result.data.VOIP` | `boolean` | Yes | — | — |
| `result.result.data.prepaid` | `boolean` | Yes | — | — |
| `result.result.data.risky` | `boolean` | Yes | — | — |
| `result.result.data.name` | `string` | Yes | — | — |
| `result.result.data.carrier` | `string` | Yes | — | — |
| `result.result.data.line_type` | `string` | Yes | — | — |
| `result.result.data.country` | `string` | Yes | — | — |
| `result.result.data.region` | `string` | Yes | — | — |
| `result.result.data.do_not_call` | `boolean` | Yes | — | — |
| `result.result.data.tcpa_blacklist` | `boolean` | Yes | — | — |
| `result.result.data.active_status` | `string` | Yes | — | — |
| `result.result.data.request_id` | `string` | Yes | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "valid": {
                "type": "boolean"
              },
              "active": {
                "type": "boolean"
              },
              "formatted": {
                "type": "string"
              },
              "local_format": {
                "type": "string"
              },
              "fraud_score": {
                "type": "integer"
              },
              "VOIP": {
                "type": "boolean"
              },
              "prepaid": {
                "type": "boolean"
              },
              "risky": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "carrier": {
                "type": "string"
              },
              "line_type": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "region": {
                "type": "string"
              },
              "do_not_call": {
                "type": "boolean"
              },
              "tcpa_blacklist": {
                "type": "boolean"
              },
              "active_status": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              }
            },
            "required": [
              "valid",
              "active",
              "formatted",
              "local_format",
              "fraud_score",
              "VOIP",
              "prepaid",
              "risky",
              "name",
              "carrier",
              "line_type",
              "country",
              "region",
              "do_not_call",
              "tcpa_blacklist",
              "active_status",
              "request_id"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.07` per pricing unit.

## Related documentation

* [IPQS provider guide](https://deepline.com/docs/providers/ipqs/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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