Skip to content

Help center

How to clean a phone number list before sending SMS

Clean a phone list in four passes: normalize to E.164, remove invalid numbers, split mobile from landline, and drop duplicates, using a bulk CSV job.

Updated 2026-11-23

Clean a phone list in four passes: normalize every number to E.164, remove numbers that do not fit their country's plan, split them by line type, and remove duplicates. Run it as a bulk CSV job and read the result columns. It removes numbers that cannot work. It does not prove that anyone answers.

Before you start

  • Keep one column for the number, with a header. Add a country value for numbers written without +.
  • Remove duplicate rows first. Every row is a check and is billed.
  • Keep a copy of the original file. Results come back in a new file.

Free way, row by row

  1. Normalize with formulas: Excel or Google Sheets.
  2. Spot-check a sample of 20 numbers in the phone validator to see what kinds of mistakes your list has.
  3. Filter out rows your formula flagged as CHECK.

This catches typos and wrong lengths. It cannot tell a number the plan allows from one that cannot exist.

With the API, as a bulk job

  1. Export the list as CSV. If it holds numbers from one country, note the ISO code. If it mixes countries, make sure every number starts with +.
  2. Create the job:
bash
curl "https://api.qelka.com/v1/bulk?type=phone&column=phone&country=US&level=basic" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary @contacts.csv
  1. Wait for status to become completed. Poll GET https://api.qelka.com/v1/bulk/{id} or use the bulk.completed webhook. Bulk jobs need a live key and handle up to 2,000,000 rows or 100 MB.
  2. Download the file from download_url. It is valid for 24 hours.
  3. Read these columns:
Column What to do
result_status valid keep, invalid remove, unknown means the number had no + and no country was sent: fix and rerun those rows.
result_e164 Store this value instead of the original.
result_line_type mobile for SMS. landline to a voice list. voip, toll_free, premium_rate for review.
result_carrier, result_ported Filled at the live level only.
result_error Rows that could not be checked, not billed.

Credits are reserved for every row when the job is created and the unused part returns at the end. The upload and result files are deleted after 30 days. See bulk jobs.

Decide what to do with each group

  • Valid mobile: your SMS list.
  • Valid fixed_line_or_mobile (US and Canada): run a live lookup on these before texting, since the plan cannot tell. See Landline or mobile.
  • Valid landline: call, or ask for a mobile.
  • Invalid: ask for a correction at the next contact point, or drop.
  • Duplicates by result_e164: two spellings of one number. Merge them.

What cleaning cannot do

A valid mobile number may be unassigned, disconnected or reassigned since you collected it. A live lookup moves you closer, as Check if a phone number is active explains. Keep your own evidence: opt-in dates, delivery failures and replies. Remove numbers that fail delivery repeatedly.

Common mistakes

  • Uploading duplicates. Each costs a check.
  • Leaving out country. Numbers without + come back unknown.
  • Using -d in curl. It strips line breaks from the file. Use --data-binary.
  • Texting every valid number. Valid includes landlines.
  • Cleaning once and never again. Lists decay as numbers are reassigned. Re-run before a large send.

Frequently asked questions

What does cleaning a phone number list involve?
Four passes: put every number in E.164, remove those that do not fit their country's numbering plan, split them by line type so landlines and toll-free numbers stay out of SMS sends, and remove duplicates. A fifth, optional pass uses a live lookup to see the current carrier. None of it proves a person answers; it removes numbers that cannot work.
How many credits does a phone list cost to clean?
1 credit per row at the basic level and 3 credits per row for live lookups. A bulk job reserves credits for every row at creation and returns what went unused when it ends, since rows that fail are not billed. Remove duplicate rows first, because each duplicate costs a check.
Can I clean a phone list for free?
For a few numbers, yes: the free phone validator checks one number at a time. For a spreadsheet you can normalize with formulas and filter by length at no cost. Checking validity and line type across thousands of rows is a bulk job, which uses credits. Free plans include a monthly credit allowance, so a small list may cost nothing.

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