Skip to content

Screen signups by line type and disposable numbers

A simple, adjustable signup rule built on valid, type and isDisposable.

Last updated

One standard lookup at signup gives you what most screening rules need: valid, the line type in type, and isDisposable.

What the line types tell you#

  • MOBILE: can usually receive SMS, the usual choice for one-time codes.
  • FIXED_LINE: a landline; it can't receive SMS, so offer a voice call or another channel.
  • FIXED_LINE_OR_MOBILE: the numbering plan doesn't tell the two apart.
  • VOIP: a virtual number. They are easy to create in bulk, so many teams ask for extra verification or block them at signup.
  • TOLL_FREE, PAGER and others: rarely a person's own number.

isDisposable: true marks a known disposable or temporary number.

A starting rule#

ts
async function screenPhone(phone: string) {
  const response = await fetch('https://api.phone-check.app/phone/details?phone=' + encodeURIComponent(phone), {
    headers: { 'x-api-key': process.env.API_KEY ?? '' },
  });
  if (!response.ok) return 'retry-later'; // 402, 429, 5xx: not a verdict on the number
  const result = await response.json();
  if (!result.valid) return 'reject';
  if (result.isDisposable || result.type === 'VOIP') return 'extra-verification';
  return 'accept';
}

Tune it to your product: some businesses welcome VoIP numbers, others don't.

Tips#

  • Call the API from your server, never from the browser: your API key must stay secret.
  • Store country, carrier and type with the account so later risk checks can use them.
  • Don't treat an error status as an invalid number. See Errors, credits and rate limits.
  • For US numbers, isWholesaleHosted from the extended lookup adds a stronger signal; see Wholesale-hosted numbers and carrier identity.

Was this helpful?

Still need help?