About this endpoint
What it does
Parses and validates a phone number, returning normalized formatting and country-related details when available. The request accepts a phone number in E.164 or national format, with an optional country hint for national-format inputs.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| phone | String | Yes | The phone number, either in E.164 format with + or in national format. |
| country | String | No | ISO alpha-2 country hint. Required for national-format numbers. |
Response
Returns a JSON object with these top-level fields: e164 string, input string, valid boolean, country string, calling_code string, country_code string, national_format string, national_number string, and international_format string.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| e164 | String | No | The normalized E.164 representation of the phone number. |
| input | String | No | The input phone number as received. |
| valid | Boolean | No | Whether the phone number is valid. |
| country | String | No | The resolved country, if available. |
| calling_code | String | No | The country calling code, if available. |
| country_code | String | No | The country code, if available. |
| national_format | String | No | The national formatting of the phone number, if available. |
| national_number | String | No | The national number portion, if available. |
| international_format | String | No | The international formatting of the phone number, if available. |