Phone Validation API New!

The JSON API provides capability to verify your customers phone numbers, regardless of their country of origin.

It supports CORSopen in new window and can return data as JSON or JSONP.

Before creating a custom integration, please check our list of Data Validation Pluginsopen in new window. You might find something suitable for your platform there.

We also have a JavaScript library which implements a simple interface for forms and only takes a few minutes to integrate.

Request

https://api.craftyclicks.co.uk/phone/1.0/validate

The service accepts POST / GET requests.

Parameters

KeyTypeRequiredDescription
keystring✔️Your unique access token.
phone_numberstring✔️The phone number you wish to verify.
countrystring2 letter ISO 3166-2open in new window country code. Not required, if the provided phone number is an international number. (starting with +) If the supplied phone_number is an international number, the country field will be ignored.
get_networkbooleanSpecify if you need the carrier information. Default: false
{
	"key":"<<your access token>>",
	"country": "GB",
	"phone_number": "01628201254"
}

Response

KeyTypeDescription
resultbooleanIf the result is true, the queried phone number is valid. If it's false, none of the other values will exist in the response.
countrystring3 letter ISO 3166-1 alpha-3open in new window country code, matching the phone number
phone_numberstringThe valid phone number in an international format.
national_formatstringThe valid phone number in a national format.
carrierobjectContains the network information, if it was requested.
mobile_country_codestringIf the phone number is on a mobile network, this will contain the Mobile country codeopen in new window, otherwise it's null
mobile_network_codestringIf the phone number is on a mobile network, this will contain the mobile network code, otherwise it's null.
namestringThe name of the provider for the phone service.
typestringCan either be landline or mobile
{
    "result": true,
    "country": "gbr",
    "phone_number": "+441628201254",
    "national_format": "01628 201254",
    "carrier": {
        "mobile_country_code": null,
        "mobile_network_code": null,
        "name": "Jersey Telecom",
        "type": "landline",
        "error_code": null
    }
}