> ## 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: Inputs, Cost & CLI Example

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

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=ipqs_phone_validate:{"phone":"{{phone}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                 | Type          | Required | Default | Description                                                                 |
| -------------------- | ------------- | -------- | ------- | --------------------------------------------------------------------------- |
| `payload.phone`      | `string`      | Yes      |         | Phone number to validate.                                                   |
| `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={null}
  {
    "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 Schema

| Name            | Type     | Required | Default | Description |
| --------------- | -------- | -------- | ------- | ----------- |
| `result.status` | `string` | Yes      |         |             |
| `result.result` | `object` | Yes      |         |             |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "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>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute ipqs_phone_validate --payload '{
  "phone": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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