Provero Logo

Phone - HLR

Phone - HLR returns a simple HLR summary by default: whether the number is live, dead, or out of network, plus the current and original network. Set detailed=true when you want the full HLR response instead.
  • HLR: Database checks that validate if a number is active and identify its operator.
  • MNP: Process to determine if a number has been ported and confirm the current carrier.
  • Delivery: Mechanism for routing messages or calls to the correct destination and confirming their status.

Endpoint

POST
https://api.provero.io/api/validate/phone

Headers

Authorization: Bearer REPLACE_WITH_API_TOKEN
Content-Type: application/json
Accept: application/json


Request Body

Field Type Required Description
phone string Yes The phone number to be validated.
roaming boolean No Set to "1" or "true" to include roaming checks.
msisdn boolean No When set to true (default), the MSISDN must be a valid E.164 number.
When set to false, non-canonical MSISDN formats may be accepted for routing determination only, including numbers containing a duplicated country code.
route string No Accepted values:
  • detailed: Runs the detailed HLR route.
  • standard (default): Runs the standard HLR route.
detailed boolean No Optional flag to return the full HLR payload. Omit it, or send false, to receive the default easy summary response.
Request Body example (JSON)
{
    "phone": "+441302778473",
    "roaming": true,
    "msisdn": true,
    "route": "standard",
    "detailed": "true"
}

Code Examples

import requests

userPhone = "REPLACE_WITH_PHONE"
roaming = "1"
route = "standard"

url = "https://api.provero.io/api/validate/phone"
payload = {"phone": userPhone, "roaming": roaming, "route": route}

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",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode(["phone" => $userPhone, "roaming" => true]),
    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;
const userPhone = "REPLACE_WITH_PHONE";

fetch("https://api.provero.io/api/validate/phone", {
    method: "POST",
    headers: {
        "Authorization": "Bearer REPLACE_WITH_API_TOKEN",
        "Content-Type": "application/json",
        "Accept": "application/json"
    },
    body: JSON.stringify({ phone: userPhone, roaming: true })
})
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.error("Error:", error));
userPhone="REPLACE_WITH_PHONE"

curl -X POST https://api.provero.io/api/validate/phone \
  -H "Authorization: Bearer REPLACE_WITH_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d "{\"phone\": \"$userPhone\", \"roaming\": true}"

Response Examples

Success
{
    "results": [
        {
            "to": "+1234567890",
            "status": "Live",
            "live": true,
            "dead": false,
            "outOfNetwork": false,
            "currentNetwork": "Example",
            "originalNetwork": "Example"
        }
    ]
}
Detailed Success (detailed: true, route: standard)
{
    "results": [
        {
            "to": "+1234567890",
            "mccMnc": "123456",
            "imsi": "",
            "originalNetwork": {
                "networkName": "Example",
                "networkPrefix": "234",
                "countryName": "Example",
                "countryPrefix": "1",
                "networkId": ""
            },
            "status": {
                "groupId": 3,
                "groupName": "DELIVERED",
                "id": 5,
                "name": "DELIVERED_TO_HANDSET",
                "description": "Message delivered to handset"
            },
            "error": {
                "groupId": 0,
                "groupName": "Ok",
                "id": 0,
                "name": "DELIVERED_TO_HANDSET",
                "description": "No Error.",
                "permanent": false
            }
        }
    ]
}
Detailed Success (detailed: true, route: detailed) - Roaming Requested
{
    "results": [
        {
            "to": "+1234567890",
            "mccMnc": "123456",
            "imsi": "",
            "originalNetwork": {
                "networkName": "Example",
                "networkPrefix": "234",
                "countryName": "Example",
                "countryPrefix": "1",
                "networkId": ""
            },
            "status": {
                "groupId": 3,
                "groupName": "DELIVERED",
                "id": 5,
                "name": "DELIVERED_TO_HANDSET",
                "description": "Message delivered to handset"
            },
            "roaming": true,
            "roamingNetwork": {
                "networkName": "Example",
                "networkPrefix": "",
                "countryName": "Example",
                "countryPrefix": "1",
                "networkId": ""
            },
            "ported": true,
            "portedNetwork": {
                "networkName": "Example",
                "networkPrefix": "234",
                "countryName": "Example",
                "countryPrefix": "1",
                "networkId": ""
            },
            "error": {
                "groupId": 0,
                "groupName": "Ok",
                "id": 0,
                "name": "DELIVERED_TO_HANDSET",
                "description": "No Error.",
                "permanent": false
            }
        }
    ]
}
Detailed Success (detailed: true, route: detailed) - Roaming Not Requested
{
    "results": [
        {
            "to": "+1234567890",
            "mccMnc": "123456",
            "imsi": "",
            "originalNetwork": {
                "networkName": "Example",
                "networkPrefix": "234",
                "countryName": "Example",
                "countryPrefix": "1",
                "networkId": ""
            },
            "status": {
                "groupId": 3,
                "groupName": "DELIVERED",
                "id": 5,
                "name": "DELIVERED_TO_HANDSET",
                "description": "Message delivered to handset"
            },
            "ported": true,
            "portedNetwork": {
                "networkName": "Example",
                "networkPrefix": "234",
                "countryName": "Example",
                "countryPrefix": "1",
                "networkId": ""
            },
            "error": {
                "groupId": 0,
                "groupName": "Ok",
                "id": 0,
                "name": "DELIVERED_TO_HANDSET",
                "description": "No Error.",
                "permanent": false
            }
        }
    ]
}
Detailed Success (detailed: true, route: detailed) - Invalid phone number
{
    "results": [
        {
            "to": "+1234567890",
            "mccMnc": "123456",
            "imsi": "",
            "originalNetwork": {
                "networkName": "Example",
                "networkPrefix": "234",
                "countryName": "Example",
                "countryPrefix": "1",
                "networkId": ""
            },
            "status": {
                "groupId": 1,
                "groupName": "Handset errors",
                "id": 27,
                "name": "UNDELIVERABLE_NOT_DELIVERED",
                "description": "Absent Subscriber"
            },
            "ported": false,
            "error": {
                "groupId": 1,
                "groupName": "Handset errors",
                "id": 27,
                "name": "UNDELIVERABLE_NOT_DELIVERED",
                "description": "Absent Subscriber",
                "permanent": false
            }
        }
    ]
}
Application Error
{
    "requestError": {
        "serviceException": {
            "messageId": "Error message",
            "code": "400"
        }
    }
}
Payment Required - Insufficient Balance
{
    "message": "Insufficient balance for validation request.",
    "service": "phone",
    "required_amount": "0.0060000000",
    "current_balance": "0.0000000000"
}
Validation Error - Phone Not Provided
{
    "message": "The phone field is required.",
    "errors": {
        "phone": [
            "The phone field is required."
        ]
    }
}
Validation Error - Phone Number Too Long
{
    "message": "The phone field must not be greater than 15 characters.",
    "errors": {
        "phone": [
            "The phone field must not be greater than 15 characters."
        ]
    }
}
Validation Error - Phone Number Too Short
{
    "message": "The phone field must be at least 10 characters.",
    "errors": {
        "phone": [
            "The phone field must be at least 10 characters."
        ]
    }
}

Response Body

Success structure

Field Name Type Example Always Present Description
to string +1234567890 Yes The target phone number that was looked up.
mccMnc string 123456 Yes Concatenated Mobile Country + Network Code (MCC + MNC).
imsi string 123456 Yes Same as mccMnc.
originalNetwork.networkName string Phone carrier LTD Yes Name of the original network operator.
originalNetwork.networkPrefix string 234 Yes Prefix used by the original network.
originalNetwork.countryName string Canada Yes Name of the country where the original network is based.
originalNetwork.countryPrefix string 1 Yes International dialing prefix.
originalNetwork.networkId string Yes Internal identifier; may be empty.
ported boolean true Yes Whether the number has been ported to another network.
portedNetwork.networkName string Red phone carrier LTD No Name of the ported (current) network.
portedNetwork.networkPrefix string 234 No Prefix used by the ported network.
portedNetwork.countryName string Canada No Country of the ported network.
portedNetwork.countryPrefix string 1 No Dialing prefix.
portedNetwork.networkId string No Internal ID; may be empty.
roaming boolean true No Whether the device is roaming (connected to foreign network).
roamingNetwork.networkName string T-Mobile No Visited network name.
roamingNetwork.networkPrefix string 425 No Prefix used by roaming network.
roamingNetwork.countryName string US No Roaming country name.
roamingNetwork.countryPrefix string 1 No Roaming country dialing prefix.
roamingNetwork.networkId string No Roaming network internal ID.
status.groupId integer 3 Yes ID representing the status group.
status.groupName string DELIVERED Yes High-level classification (e.g., “DELIVERED”).
status.id integer 5 Yes Specific status ID.
status.name string DELIVERED_TO_HANDSET Yes Specific status name.
status.description string Message delivered to handset Yes Human-readable explanation of status.
error.groupId integer 0 Yes Error group ID.
error.groupName string Ok Yes Error group name.
error.id integer 0 Yes Error code.
error.name string NO_ERROR Yes Error name if any.
error.description string Valid Query Yes Explanation of the error.
error.permanent boolean false Yes True/false if error is permanent.

Error structure

Field Name Type Example Always Present Description
message string The phone field is required. No Top-level error message returned on validation failure, insufficient balance, or other request errors.
errors object {"phone": ["The phone field is required."]} No Object of validation services with validation failures.
requestError object {"serviceException": {"messageId": "Error message", "code": "400"}} No Object containing service exceptions for application errors.
service string phone No Service alias returned with a 402 insufficient-balance response.
required_amount string 0.0060000000 No Credit amount required to process the validation request.
current_balance string 0.0000000000 No Current available balance at the time the request was rejected.

Service Specific Error Codes

ID Error Group ID Group Name Always Present Description
0 NO_ERROR 0 Ok No Valid Query
1 EC_UNKNOWN_SUBSCRIBER 1 Handset errors Yes The phone number provided is not linked to a known user profile.
5 NUMBER_MISSING_FROM_NETWORK_REGISTRY 1 Handset errors No This number is missing from our extended network datasets.
5 UK_NUMBER_TRANSFER_RECORD_NOT_LOCATED 1 Handset errors Yes No transfer or porting history was found for this UK number.
5 NUMBER_UNLISTED_IN_CURRENT_DATABASE 1 Handset errors No We could not locate this number in our records. Please verify and retry.
5 EC_UNIDENTIFIED_SUBSCRIBER 1 Handset errors No The subscriber details are not recognized within our systems.
6 EC_ABSENT_SUBSCRIBER_SM 1 Handset errors No The device was unreachable. User is not currently available on this network.
32 EC_SM_DELIVERY_FAILURE 1 Handset errors No An error occurred while attempting to deliver the message.
34 EC_SYSTEM_FAILURE 1 Handset errors No An internal error was encountered while processing.
255 REJECTED_NETWORK 1 Handset errors Yes The number is outside the valid network range or is currently unassigned.
255 GENERAL_ROUTING_FAULT 1 Handset errors No A routing problem occurred while directing the request to its destination.
256 TARGET_CARRIER_OVERLOAD_DETECTED 1 Handset errors No Carrier is currently handling too many requests. Please try again soon.
500 TARGET_CARRIER_CONNECTIVITY_FAULT 1 Handset errors No A connectivity problem occurred with the carrier.
500 EC_PROVIDER_GENERAL_ERROR 1 Handset errors No A system or equipment issue prevented successful completion of this request.
502 EC_NO_RESPONSE 1 Handset errors No No response received from the destination network in the expected time.
502 EXTERNAL_LOOKUP_FAILED_NETWORK_REPLY_LOGGED 1 Handset errors No Lookup failed on an external system. A reply was logged.
502 TARGET_CARRIER_MOMENTARILY_INACCESSIBLE 1 Handset errors No The carrier’s network is not reachable at the moment. Please try again later.
502 EXTERNAL_GATEWAY_RESPONSE_ISSUE 1 Handset errors No An external network gateway provided an unexpected response.
1 EC_UNKNOWN_SUBSCRIBER 2 User errors Yes Unknown Subscriber
5 REGISTERED_NAME_DISCREPANCY_DETECTED 2 User errors Yes Name submitted does not match our records.
6 EC_ABSENT_SUBSCRIBER_SM 2 User errors No Phone Switched Off.
9 VALIDATION_TOKEN_MISSING 2 User errors Yes Validation token expired. Please request a new one.
9 UNDELIVERABLE_NOT_DELIVERED 2 Undeliverable Yes Wrong number length or format.
9 EC_SYSTEM_FAILURE 2 User errors No Subscriber Error (Temporary).
9 EC_SYSTEM_FAILURE 2 User errors No Subscriber Error.
9 EC_ILLEGAL_SUBSCRIBER 2 User errors Yes Subscriber is blocked or restricted from receiving messages.
9 VALIDATION_TOKEN_MISSING 2 User errors Yes Missing validation token in request.
9 VALIDATION_TOKEN_TIMEOUT 2 User errors No Validation token does not match this service.
9 VALIDATION_TOKEN_SERVICE_MISMATCH 2 User errors Yes Name does not align with records for this number.
9 EC_SYSTEM_FAILURE 2 User errors No Live Status Unavailable.
31 EC_SUBSCRIBER_BUSY_FOR_MT_SMS 2 User errors No Subscriber is currently busy and cannot receive messages.
31 REGION_PREFIX_UNRECOGNIZED 2 User errors Yes The region or country code is unrecognized. Check the number format.
323 VERIFICATION_PATHWAY_UNDEFINED 2 User errors Yes The request could not be completed due to missing or misconfigured service route.
507 REGISTERED_NAME_DISCREPANCY_DETECTED 2 User errors Yes Name does not exist. Review entered details.
5 DELIVERED_TO_HANDSET 3 DELIVERED No The message has reached the recipient’s device successfully.
15 NO_NETWORK_RESPONSE 4 Expired No No network response was received during validation.
8 EC_ROAMING_NOT_ALLOWED 5 Rejected No Roaming not permitted for this number or country.
9 ACCOUNT_CREDENTIALS_INSUFFICIENT 5 Rejected Yes This account does not have permission to access this feature.
11 EC_TELESERVICE_NOT_PROVISIONED 5 Rejected No Telephone service not active for this number.
11 EC_TELESERVICE_NOT_PROVISIONED 5 Rejected Yes Teleservice Not Provisioned.
13 EC_CALL_BARRED 5 Rejected No Call Barred.
21 EC_FACILITY_NOT_SUPPORTED 5 Rejected No Requested service is not supported.
21 EC_FACILITY_NOT_SUPPORTED 5 Rejected No The requested facility is not supported.
32 TRAFFIC_QUOTA_EXCEEDED 5 Rejected No Rate limit exceeded. Please try again later.
323 INTERNATIONAL_ROUTE_NOT_SUPPORTED 5 Rejected Yes International validation not supported for this country.