Skip to content

Use cases

SMS deliverability: validate numbers before you send

Check line type, country and carrier before sending SMS, so messages go to numbers that can receive them and one-time codes stop feeding fraud.

Updated 2026-11-23

Every SMS you send costs money, whether or not the message arrives. Sending to a number that does not exist, to a landline, or to a premium-rate range chosen by a bot is a direct loss. Validating the number first turns that loss into a small check fee, and gives you the clean e164 format that SMS providers expect.

The problem

Three separate problems hide under "SMS deliverability":

  • Bad input. People type numbers without a country code, with spaces and brackets, or with a digit missing. A provider either rejects them, charges for the attempt, or sends to the wrong number.
  • Wrong line type. Landlines and some special ranges cannot receive a text message. Sending to them wastes budget and inflates your failure rate.
  • Abuse. SMS pumping, also called artificially inflated traffic, is a fraud in which bots submit numbers to forms that send a one-time code, choosing numbers on expensive routes. You pay for every message. Premium-rate numbers and unserved countries are the signature.

Validation addresses the first two directly and the third in part.

The flow

  1. Normalize at entry. When a user types a number, send it with the country the form knows. Store the e164 value from the response, never the raw input. See E.164.
  2. Check before every send that costs money. Run the phone check before the first code is sent, not after a failure.
  3. Filter by line type. Allow mobile. Treat landline as not able to receive SMS. Treat voip according to your risk tolerance. Refuse premium_rate.
  4. Check the country. Compare country.code with the list of countries you serve and refuse the rest.
  5. Use a live lookup when routing matters. At the live level carrier.name is the carrier currently serving the number and ported says whether it left its original carrier. Use it to pick a route.
  6. Rate limit around the check. Cap codes per number, per IP and per account, and add the IP signals of the IP lookup for requests from hosting networks.
  7. Re-validate stale lists. Before a large campaign, run the list through a bulk job.

Decision table

Signal Field Action
Number cannot be read status: unknown Step up: ask for the country, retry with country
Number does not fit its plan status: invalid Block the send, ask the person to check
Country not served country.code outside your list Block
Premium-rate range line_type: premium_rate Block
Landline line_type: landline Do not send SMS, offer a voice call or another channel
Mobile line_type: mobile Allow
North American number line_type: fixed_line_or_mobile Allow, accept that the plan cannot say more
Internet telephony line_type: voip Step up: email confirmation or review for high-value actions
Ported number ported: true (live level) Allow, route through the current carrier
Request from hosting or Tor flags.datacenter or flags.tor: true on the IP Step up, lower the send limit

A valid number exists in the numbering plan, which is not proof that someone answers it. The basic level cannot see disconnected numbers.

Example

A login form is about to send a one-time code. The server asks for a live lookup of the number first:

bash
curl https://api.qelka.com/v1/phone \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+14155550123", "level": "live"}'

The part of the response that drives the decision:

json
{
  "object": "phone",
  "valid": true,
  "status": "valid",
  "e164": "+14155550123",
  "country": { "code": "US", "name": "United States", "calling_code": "1" },
  "line_type": "mobile",
  "carrier": { "name": "Example Wireless", "mcc": "310", "mnc": "000", "source": "live" },
  "ported": false
}

Values are illustrative. The number is valid, mobile, in a country on the allowed list, and not ported. The server sends the code to +14155550123 through the route that matches the carrier.

At the basic level the same call returns carrier.source: "numbering_plan", ported: null and, for a North American number, fixed_line_or_mobile. That is enough for most signup flows and costs less.

What it costs

A basic phone check costs 1 credit and a live lookup 3. Errors and failed provider calls (502 upstream_unavailable) are not billed, and results are cached for 7 days unless you send fresh: true. A live lookup sends the number to our lookup provider, as data and privacy describes, while the basic level does not. Test keys return simulated answers and spend nothing. The free plan includes 100 credits a month. Prices are on the pricing page.

Frequently asked questions

Why do SMS messages fail to arrive?
Common causes are numbers that do not exist, numbers written without a country code, landlines that cannot receive text messages, numbers that have been disconnected, and routes that filter your traffic. Validation removes the first three before you pay for a send. It cannot see disconnected numbers at the basic level, and it cannot predict carrier filtering, which depends on your sender and message content.
How do I know if a number is mobile or a landline?
Read line_type in the phone response. mobile is a mobile number, landline a fixed line, and voip a range assigned to internet telephony. In the North American plan the answer is fixed_line_or_mobile, because the plan does not separate the two. A live lookup asks the network and can replace that with a more precise type when the provider returns one.
Does phone validation stop SMS pumping?
It reduces it, and does not remove it alone. Refusing invalid numbers, premium-rate numbers and countries you do not serve cuts the cheapest abuse before a message is sent. You still need rate limits per number and per IP, and a cap on messages per signup. Use IP flags to add friction when the request comes from a hosting or anonymizing network.
What does it cost to validate a number before sending?
A basic check costs 1 credit and reads the numbering plan. A live lookup costs 3 credits and asks the network for the current carrier and porting status. Errors are not billed, and results are cached for 7 days, so checking the same number twice in that window is served from the cache. Compare that with the price of your SMS route per message.

Put this check in your product

Get an API key in under a minute. 100 free credits every month, no card required.

  • 100 free credits a month
  • No card
  • Test keys spend nothing
  • Cancel any time