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

# Check Number

> Takes one name and one number, from anywhere in the world, and says whether the number is worth calling and what to do next. A number that gets a priority costs 2 credits. One we could not check is free.

## Body

**first\_name** `string` *required*

Up to 128 characters.

**last\_name** `string` *required*

Up to 128 characters.

**phone** `string` *required*

Up to 32 characters, with its country code. A valid US or Canadian number without one is read as such. A national number that could be in several countries (a leading 0) is a 400 unless you send `default_country`.

**linkedin\_url** `string`

The contact's profile. Improves identity matching outside the US.

**source** `string` (default: supplied)

`supplied` or `enrichment`. Send `enrichment` when the number came from Find Mobile, so it is not confirmed against itself.

**default\_country** `string`

A two-letter country code, such as `GB`, to read a national number against.

**action\_vocabulary** `string` (default: legacy)

`legacy` or `priority`. See [Action wording](https://docs.willthispersonanswer.com/api-reference/priorities.md#action-wording).

**Idempotency-Key** `string`

Send the same value when retrying the same request and you are charged once. See [Retry safely](https://docs.willthispersonanswer.com/authentication.md#retry-safely).

## Response

**status** `string` *required*

`success` when the number got a priority, `unable_to_check` when it could not be checked.

**contact** `object` *required*

Who was asked about, and the number in its canonical form with its country.

**properties**

**first\_name** `string`

**last\_name** `string`

**phone\_number** `string`

The number with its country code.

**country** `string`

The two-letter country of the number.

**priority** `object`

The verdict. Present when `status` is `success`.

**properties**

**classification** `string`

`A1`, `A2`, `A3` or `X`. See [Priorities and signals](https://docs.willthispersonanswer.com/api-reference/priorities.md).

**label** `string`

High priority, Medium priority, Low priority or Bad data.

**next\_action** `string`

The one field to act on.

**signals** `object`

The evidence behind the verdict.

**properties**

**validity** `string`

**line\_type** `string`

**activity** `string`

**identity** `string`

**call\_compliance** `string`

See [Signals](https://docs.willthispersonanswer.com/api-reference/priorities.md#signals) for every value.

**result** `object`

Only on `unable_to_check`.

**properties**

**reason** `string`

Why the number could not be checked. See below.

**retryable** `boolean`

Whether a retry can help.

**credit\_cost** `integer` *required*

What this call charged, in credits.

## When a number can't be checked

It comes back as a normal 200 with `status: "unable_to_check"` and costs nothing.

| Reason | Retry | Meaning |
| - | - | - |
| `temporarily_unavailable` | Yes | The check could not run right now. Try again. |
| `check_failed` | No | We could not complete this check. |
| `unsupported_country` | No | We cannot check numbers in this region. |
| `insufficient_data` | No | Not enough information to classify the number. |
| `validity_unknown` | No | We could not tell whether the number is valid. |

```bash cURL theme={null}
curl -X POST \
  https://app.willthispersonanswer.com/api/v1/check-number \
  -H "Authorization: Bearer $WTPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Ada",
    "last_name": "Lovelace",
    "phone": "+12025550147"
  }'
```

```python Python theme={null}
import os, requests

res = requests.post(
    "https://app.willthispersonanswer.com/api/v1/check-number",
    headers={"Authorization": f"Bearer {os.environ['WTPA_API_KEY']}"},
    json={
        "first_name": "Ada",
        "last_name": "Lovelace",
        "phone": "+12025550147",
    },
)
print(res.json()["priority"]["next_action"])
```

```javascript JavaScript theme={null}
const res = await fetch("https://app.willthispersonanswer.com/api/v1/check-number", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WTPA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    first_name: "Ada",
    last_name: "Lovelace",
    phone: "+12025550147",
  }),
});
const { priority } = await res.json();
```

```json 200 theme={null}
{
  "status": "success",
  "contact": {
    "first_name": "Ada",
    "last_name": "Lovelace",
    "phone_number": "+12025550147",
    "country": "US"
  },
  "priority": {
    "classification": "A1",
    "label": "High priority",
    "next_action": "prioritise_calling"
  },
  "signals": {
    "validity": "valid",
    "line_type": "mobile",
    "activity": "strong",
    "identity": "matched",
    "call_compliance": "clear"
  },
  "credit_cost": 2
}
```

```json 200 unable to check theme={null}
{
  "status": "unable_to_check",
  "contact": {
    "first_name": "Ada",
    "last_name": "Lovelace",
    "phone_number": "+12025550186",
    "country": "US"
  },
  "result": {
    "reason": "temporarily_unavailable",
    "retryable": true
  },
  "credit_cost": 0
}
```

```json 400 theme={null}
{
  "error": {
    "code": "invalid_request",
    "message": "phone is a national number that could be in several countries. Send it with its country code, or send default_country."
  }
}
```


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