# Get started with the Phone-Check.app API

> From a new account to your first validated number in three steps.

The Phone-Check.app API validates a phone number and tells you its line type, carrier, place and time zones. Every lookup is one GET request per number, sent to `https://api.phone-check.app` with your API key in the `x-api-key` header.

## 1. Create an account and an API key

1. Sign up at [phone-check.app/signup](https://phone-check.app/signup) and open your workspace.
2. In the sidebar, open **API keys** and create a key. Give it a **Name** and keep the **Read** permission: it is enough for lookups.
3. Copy the key when it is shown. It is shown once, so store it in your server's environment variables or secrets manager.

See [Create and manage API keys](https://support.phone-check.app/getting-started/create-and-manage-api-keys) for permissions, expiry and revoking.

## 2. Validate a number

Send the number in international format (`+` and the country code) in the `phone` query parameter. URL-encode it, because a raw `+` in a query string reads as a space.

```bash
curl --get "https://api.phone-check.app/phone/details" \
  --data-urlencode "phone=+14155552671" \
  -H "x-api-key: $API_KEY"
```

From JavaScript or TypeScript on your server:

```ts
const response = await fetch('https://api.phone-check.app/phone/details?phone=' + encodeURIComponent('+14155552671'), {
  headers: { 'x-api-key': process.env.API_KEY ?? '' },
});
const phone = await response.json();
if (phone.valid && phone.type === 'MOBILE') {
  // safe to text
}
```

## 3. Read the answer

Check `valid` first: it is the one field every answer has. Then use `type` (the line type, such as `MOBILE`, `FIXED_LINE` or `VOIP`), `isDisposable`, `carrier`, `country`, `geo` and `timezones` for your own rules. Every field is listed in [Validate a number with GET /phone/details](https://support.phone-check.app/api-reference/validate-a-number).

A standard lookup spends 1 credit. Deeper lookups cost more; see [Choose the right lookup depth](https://support.phone-check.app/validation-and-fraud/choose-a-lookup-depth).

## Next steps

- Handle errors such as `402` and `429`: [Errors, credits and rate limits](https://support.phone-check.app/api-reference/errors-credits-and-rate-limits).
- Validate a whole list at once: [Validate a CSV list with the Bulk Checker](https://support.phone-check.app/bulk-validation/validate-a-csv-list).
- The full reference, generated from the API's own OpenAPI spec: [api.phone-check.app/developers/reference](https://api.phone-check.app/developers/reference).
