Phone format validation API
Is this a valid number? Structure only, no network check.
Phone format validation provides a lightweight phone validation check without requiring an HLR lookup. It returns number validity, country details, standard number formats, and assigned network data when available from number range metadata.
Endpoint
POST
https://api.provero.io/api/validate/phone-basic
Headers
Authorization:
Content-Type: application/json
Accept: application/json
Request Body
Request Payload Example (JSON)
{
"phone": "+447700900123"
}
Request Examples
Choose language Bash (cURL) 5 examples
userPhone="REPLACE_WITH_PHONE"
curl -X POST https://api.provero.io/api/validate/phone-basic \
-H "Authorization: Bearer REPLACE_WITH_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{\"phone\": \"$userPhone\"}"
import requests
userPhone = "REPLACE_WITH_PHONE"
url = "https://api.provero.io/api/validate/phone-basic"
payload = {"phone": userPhone}
headers = {
"Authorization": "Bearer REPLACE_WITH_API_TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.text)
<?php
$userPhone = "REPLACE_WITH_PHONE";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.provero.io/api/validate/phone-basic",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode(["phone" => $userPhone]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer REPLACE_WITH_API_TOKEN",
"Content-Type: application/json",
"Accept: application/json"
],
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
}
curl_close($curl);
echo $response;
$userPhone = "REPLACE_WITH_PHONE";
$response = Http::withToken('REPLACE_WITH_API_TOKEN')
->acceptJson()
->post('https://api.provero.io/api/validate/phone-basic', [
'phone' => $userPhone,
]);
return $response->json();
const userPhone = "REPLACE_WITH_PHONE";
fetch("https://api.provero.io/api/validate/phone-basic", {
method: "POST",
headers: {
"Authorization": "Bearer REPLACE_WITH_API_TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify({ phone: userPhone })
})
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.error("Error:", error));
Response Examples
Choose response example Success 4 examples
{
"input": "+447700900123",
"valid": true,
"country": {
"code": "GB",
"name": "United Kingdom of Great Britain and Northern Ireland",
"callingCode": "44"
},
"format": {
"e164": "+447700900123",
"international": "+44 7700 900123",
"national": "07700 900123",
"rfc3966": "tel:+44-7700-900123"
},
"assignedNetwork": "Vodafone UK"
}
{
"message": "The phone field is required.",
"errors": {
"phone": [
"The phone field is required."
]
}
}
{
"message": "The phone provided is invalid.",
"errors": {
"phone": [
"The phone provided is invalid."
]
}
}
{
"message": "Insufficient balance for validation request.",
"service": "basic_phone",
"required_amount": "0.0060000000",
"current_balance": "0.0000000000"
}