Phone Validation E.164 Data Quality Developer Guide

How to Validate Phone Numbers Before You Send

By Nimana · Last updated November 23, 2026 · 3 min read

Bad phone numbers waste messages and money. Learn how to validate and normalise numbers at sign-up, spot landlines, and store everything in E.164 format.

Why This Matters

Phone numbers arrive in a mess. One customer types 0788 123 456, another types +250 788 123 456, a third adds dashes or brackets, and a fourth mistypes a digit. If you send to every one of them as they are, some messages fail, some go to the wrong place, and some are wasted on numbers that cannot receive them at all.

Validating numbers when you collect them is one of the cheapest ways to improve your delivery rate.

What Validation Should Tell You

A good validation step answers four questions:

  1. Is this a real, correctly formed number?
  2. What is its standard format? Ideally E.164, the international format with a plus sign and country code, such as +250788123456.
  3. Which country is it from?
  4. What kind of line is it? A mobile phone, a landline, or something else.

Why the Line Type Matters

Not every number can receive every kind of message:

  • Mobile numbers can receive SMS and are usually the ones on WhatsApp.
  • Landlines can only receive voice calls, so a text message to one is wasted.
  • VoIP numbers may not receive SMS in every region.
  • Unknown lines need a second look.

Knowing the type lets you choose a channel that will actually work, or ask the customer for a different number.

Five Tips for Clean Numbers

1. Validate at the point of entry

Check the number while the customer is still on the form. They can fix a typo in seconds, and you avoid a bad record in your database.

2. Accept any format, store one format

Customers should be able to type a number the way they like. Convert it to E.164 before you save it, and use that stored version everywhere.

3. Know the country

A number without a country code is ambiguous. Ask for the country with a selector next to the phone field, or detect it from the number.

4. Check the line type

If you plan to send SMS or WhatsApp messages, flag landlines straight away and ask for a mobile number instead.

5. Re-check old lists

People change numbers all the time. Before a big send to an old list, validate it again and remove the bad entries.

Common Mistakes

  • Storing numbers exactly as typed, in a dozen formats
  • Assuming every number can get SMS
  • Validating once and never again
  • Letting a mistyped number through, then paying to send to it

How SendAPI Helps

SendAPI includes a Phone Validation endpoint that does the checks above in one call. It accepts a number in any format:

curl "https://sendapi.co/v1/phone/validate?number=07700900000" \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"

A valid number returns the standard format, the country, the carrier, and the line type:

{
  "success": true,
  "data": {
    "valid": true,
    "formatted_e164": "+447700900000",
    "country": "GB",
    "carrier": "EE",
    "type": "mobile"
  }
}

A few details from the docs:

  • Line types: mobile numbers are eligible for SMS and WhatsApp, landline numbers can only receive voice calls, voip numbers may not receive SMS in all regions, and unknown means the type could not be determined.
  • Invalid numbers: the response comes back with valid: false and empty fields, so your code can reject them straight away.
  • Pre-validate before saving: the docs recommend validating and normalising numbers from user input before adding them to your database, because storing numbers in E.164 format ensures compatibility with all SendAPI endpoints.
  • SDK support: the Node.js and Python SDKs include a phone.validate method.

All of this comes with WhatsApp, SMS, OTP, and email under one API from $9.99 a month.