Validate and parse phone numbers from any country using Google's libphonenumber. Returns country, line type (mobile/landline/VoIP), and E.164 / national / international formats.
POST /v1/phone/validatePer request| Field | Type | Description |
|---|---|---|
| phone_number* | string | Phone number — include + prefix for international format |
| default_region | string | null | ISO 3166-1 alpha-2 fallback region (e.g. PT, US, GB) |
| Field | Type | Description |
|---|---|---|
| valid | boolean | True if the number passes full libphonenumber validation |
| possible | boolean | True if the format is plausible (less strict than valid) |
| phone_number | string | Original input as submitted |
| national_format | string | null | Formatted for domestic dialling (e.g. 912 345 678) |
| international_format | string | null | Formatted for international dialling (e.g. +351 912 345 678) |
| country_code | integer | null | ITU-T country calling code (e.g. 351) |
| region_code | string | null | ISO 3166-1 alpha-2 region (e.g. PT) |
| line_type | string | null | MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, TOLL_FREE, PREMIUM_RATE, VOIP, UNKNOWN |
| e164 | string | null | E.164 canonical format (e.g. +351912345678) |
Request
{
"phone_number": "+351912345678"
}Response
{
"valid": true,
"possible": true,
"phone_number": "+351912345678",
"national_format": "912 345 678",
"international_format": "+351 912 345 678",
"country_code": 351,
"region_code": "PT",
"line_type": "MOBILE",
"e164": "+351912345678"
}