API Documentation
Introduction
Veriphone API is a REST-based phone number validator and carrier lookup service. It provides a set of stateless JSON endpoints that any program or web browser can call by sending a standard HTTP REST request. Use the API to check phone number validity, perform phone number lookup, and retrieve carrier data.
Authentication
Veriphone API uses API keys to authenticate requests. You can view and manage your API key in your control panel. Each authenticated request deducts 1 credit from your balance, so keep your key secure! Do not share it in publicly accessible areas such as GitHub or client-side code.
https://api.veriphone.io/v2/verify?key=YOUR_API_KEY
Errors
Veriphone uses standard HTTP status codes to indicate success or failure. Successful requests receive a 200 response, while 40x or 500 indicate a failure.
/v2/verify
The primary phone number validation endpoint. Takes a phone number and an optional default country as input, performs a number check, and returns whether the number is valid along with carrier and formatting data.
If the number does not start with a country prefix (indicated by a leading '+'), the number will be checked against the default country's numbering scheme. If no default country is provided, a country will be inferred from the IP address.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
phone |
string | Yes | The phone number to validate |
default_country |
string | No | Default country in 2-letter ISO code (e.g. US, RU). If not provided, inferred from IP address. |
key |
string | Yes | Your API key |
Output Parameters
| Field | Type | Description |
|---|---|---|
status |
string | "success" or "error" |
phone |
string | The phone number as submitted |
phone_valid |
boolean | Whether the phone number is valid |
phone_type |
string | fixed_line, mobile, toll_free, premium_rate, shared_cost, voip, unknown |
phone_region |
string | Region name (e.g. Germany) |
country |
string | Full country name |
country_code |
string | 2-letter ISO country code |
country_prefix |
string | Country dialing prefix |
international_number |
string | International format |
local_number |
string | Local format |
e164 |
string | E.164 format |
carrier |
string | Carrier name |
Example Request
GET https://api.veriphone.io/v2/verify?phone=%2B49-15123577723&key=YOUR_API_KEY
Example Response
{
"status": "success",
"phone": "+49-15123577723",
"phone_valid": true,
"phone_type": "mobile",
"phone_region": "Germany",
"country": "Germany",
"country_code": "DE",
"country_prefix": "49",
"international_number": "+49 1512 3577723",
"local_number": "01512 3577723",
"e164": "+4915123577723",
"carrier": "T-Mobile"
}
/v2/example
Returns an example (dummy) phone number for any country/phone-type combination. Useful for testing. The country and phone type are optional — if not specified, a country will be inferred from the IP address and 'mobile' will be used as the default type.
Example Request
GET https://api.veriphone.io/v2/example?type=fixed_line&country_code=FR&key=YOUR_API_KEY
Example Response
{
"status": "success",
"phone_type": "fixed_line",
"country_code": "FR",
"country_prefix": "33",
"international_number": "+33 1 23 45 67 89",
"local_number": "01 23 45 67 89",
"E164": "+33123456789"
}