Phone number validation and formatting API
Check whether a phone number is valid for its country and get E.164, national and international formats with the line type.
What it does
Checks a number's format and returns E.164, national, and international forms with the line type. An invalid number still returns 200 with valid: false.
- POST /v1/phones/validate
- GET /v1/phones/codes
Limits: Format only. It does not check whether the line is active or who owns it.
Use cases
- Store numbers in E.164 for SMS and WhatsApp providers.
- Reject malformed numbers at signup.
- Show numbers in the local national format.
Data sources and freshness
libphonenumber metadata (via libphonenumber-js).
Metadata is updated with library releases.
Pricing
Every new account gets 100 free calls. Packs of 10,000 ($5), 100,000 ($15) and 250,000 calls ($29) never expire, or choose Unlimited for $39 a month. Only successful responses use a call. See pricing.
FAQ
Does it check whether the line is active?
No. It validates the number's format and type with libphonenumber metadata. It does not do HLR lookups or check the owner.
What happens with an invalid number?
The API still returns 200 with valid: false and a reason, so a bad number does not look like a server error.