# Check a number is a real mobile before texting — Ravn

Canonical: https://askravn.com/use-cases/check-phone-before-texting

Use case

# Text real mobiles. Skip the landlines.

Run each number through validate_phone to get E.164 format and its number-plan line type, then run phone_to_carrier on the ones you plan to text to confirm the live carrier and real line type. Only text numbers that come back as mobile and that have opted in.
[Start free: 1,000 lookups](https://askravn.com/#start) [Read the docs](https://askravn.com/docs)

Playbook
## Two checks, cheap one first

- / 01
### Collect consent first
Texting needs the person's permission in most places. Only check numbers you have a right to message. Ravn checks the number; it does not grant consent.
- / 02
### Validate and format
Run validate_phone with the number and, if it has no country code, the `country`. You get the E.164 form, the national form, whether it is valid and the number-plan line type.
- / 03
### Drop the obvious
Remove invalid numbers. Remove numbers the plan marks as landline or toll_free if you only send SMS.
- / 04
### Confirm the real line type
The number-plan type tells you what range a number was issued in, not where it lives today; ported numbers can differ. validate_phone says `carrier_checked: false` for this reason. Run phone_to_carrier on what is left to get the live carrier and the real line type. It runs on your own Twilio key (connect it with `ravn keys add twilio`; no key returns 403 `provider_key_required`).
- / 05
### Store the result
Save the E.164 number, line type and the date you checked. Re-check before a big campaign, since numbers get ported and reassigned.
Run it
## Commands

```
# Step 1: number-plan check for a whole file (lookups)
npx ravn enrich phones.csv --tool validate_phone --column Phone --out phones-valid.csv

# Step 2: live carrier check, only on rows you kept (one lookup each, on your own Twilio key)
npx ravn enrich phones-keep.csv --tool phone_to_carrier --column Phone --out phones-carrier.csv

# Single number over REST
curl https://api.askravn.com/v1/tools/validate_phone \
-H "Authorization: Bearer $RAVN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "(415) 555-0132", "country": "US"}'

curl https://api.askravn.com/v1/tools/phone_to_carrier \
-H "Authorization: Bearer $RAVN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155550132"}'

# In Claude
Check these numbers with Ravn validate_phone. Drop invalid ones and anything
the number plan says is landline or toll-free. Then tell me how many lookups
phone_to_carrier would use on the rest, and wait for my go-ahead.
```

What it costs
## One lookup per check; carrier on your own Twilio key
validate_phone is one of our own checks: one lookup per number, no provider key needed. phone_to_carrier also uses one lookup per number, and runs on your own Twilio key, which bills you for the live carrier check.Worked example: you have 1,500 opted-in numbers. validate_phone on all of them takes 1,500 lookups, well inside the 10,000 lookups a month the plan includes. Say 700 are invalid, landline or toll-free and you drop them. Running phone_to_carrier on the remaining 800 takes another 800 lookups, against your Twilio key; running it on all 1,500 would have cost 1,500, which is why the number-plan check goes first.See the [phone validation API](https://askravn.com/features/phone-validation-api) for every field and [pricing](https://askravn.com/pricing) for plans.Before you reach out. Contact people only where you have a lawful basis, honour every opt-out, and never use this data for credit, employment, insurance or housing decisions (FCRA uses are forbidden by our [terms](https://askravn.com/terms)). People who opt out at [our opt-out page](https://askravn.com/privacy#optout) are never returned again. The full rules are on the [compliance page](https://askravn.com/compliance).
FAQ
## Common questions.
[All questions →](https://askravn.com/faq)Why is the line type from validate_phone not enough?It comes from the number plan, which tells you the range a number was first issued in. Numbers get ported between carriers and line types, so a number in a mobile range may now be VoIP or a landline. phone_to_carrier checks the live carrier.Does validate_phone need a country?Only when the number has no country code. Pass a country so a national number like (415) 555-0132 can be parsed and returned in E.164 form.Can I find a mobile number for a person?linkedin_to_mobile_phone returns a mobile on your own People Data Labs key, at one lookup per person, and only returns confirmed mobiles when carrier checks are on. You still need consent before you text.

## More in [use cases](https://askravn.com/use-cases)
Every page uses the same account, plan and tools. [See pricing →](https://askravn.com/pricing)
- [Build a B2B prospect list with ClaudeAsk Claude for companies that match your customer profile, the right people at each, and verified work emails, using Ravn through the MCP connector..](https://askravn.com/use-cases/build-prospect-list)
- [Clean and dedupe CRM contact dataExport your CRM contacts, dedupe on email, verify what is left, fill missing company fields and import the cleaned file back, with the Ravn CLI..](https://askravn.com/use-cases/clean-crm-data)
- [Enrich inbound sign-ups automaticallyWhen someone signs up, check their email, skip free-mail addresses and add company size, industry and location from the domain, all in one webhook step..](https://askravn.com/use-cases/enrich-inbound-leads)
- [Find decision makers at target accountsTurn target company domains into named decision makers with titles and work emails, using people search on your own provider key and a verified email finder..](https://askravn.com/use-cases/find-decision-makers)
- [Identify companies visiting your websiteMatch visitor IPv4 addresses from your logs to the organisation that owns the network with ip_to_company.](https://askravn.com/use-cases/identify-website-visitors)
- [Reduce email bounce rateCut hard bounces by verifying before every send, dropping D and F grades, sending to catch-all addresses with care and re-checking lists that have gone stale..](https://askravn.com/use-cases/reduce-bounce-rate)
- [Account research with ClaudeHave Claude read a company website, pull its firmographics and find the right people with scrape_website, domain_to_company and search_people, in one brief..](https://askravn.com/use-cases/research-accounts-with-claude)
- [Verify an email list before sendingCheck every address on a list before a campaign: run the CSV through validate_email, keep the A and B grades, and decide on catch-all addresses yourself..](https://askravn.com/use-cases/verify-email-list)
