The NumberValidation API validates any phonenumber.
It will tell you the formatting options and type of the number, and will determine the most likely carrier.
There are a few optional parameters available:
The mnp_lookup parameter (boolean) forces our system to look up the number in our Portability databases to provide a carrier as accurately as possible.
And the responsetype parameter (int) determines what properties are available in the returned object.
Your product-token authenticates your calls.
Provide it in the X-CM-PRODUCTTOKEN header for authentication.
The default Number Validation resource validates one phonenumber at a time.
Mobile Number Portability lookup is turned on by default to provide carrier determination that is as accurate as possible.
https://api.cmtelecom.com/v1.1/numbervalidation/{phonenumber}
Send one request with a phonenumber in the url, and receive the validation information as JSON object.
name | in | required | schema |
---|---|---|---|
X-CM-PRODUCTTOKEN | header | true | 0000000-0000-0000-0000-000000000000 |
phonenumber | path | true | 0031687654321 |
mnp_lookup | query | false | true (default) |
responsetype | query | false | 1 |
http status | content-type | description |
---|---|---|
200 | application/json | { |
curl -i https://api.cmtelecom.com/v1.1/numbervalidation/0031687654321 -H "X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $data = json_encode(array("phonenumber" => "string")); $url = 'https://api.cmtelecom.com/v1.1/numbervalidation/0031687654321'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000' ), CURLOPT_HEADER => TRUE, CURLOPT_RETURNTRANSFER => TRUE ) ); $result = curl_exec($ch); var_dump($result); curl_close($ch);
https://api.cmtelecom.com/v1.1/numbervalidation
Send one JSON object with a phonenumber property, and receive the validation information as JSON object.
name | in | required | schema |
---|---|---|---|
X-CM-PRODUCTTOKEN | header | true | 0000000-0000-0000-0000-000000000000 |
object | body | true | {"phonenumber" : "string"} |
object | body | false | {"mnp_lookup" : true} (default) |
object | body | false | {"responsetype" : 1} (default) |
http status | content-type | description |
---|---|---|
200 | application/json | { |
curl -i https://api.cmtelecom.com/v1.1/numbervalidation -X POST -H "Content-Type: application/json" -H "X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000" -d '{"phonenumber": "string"}'
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $data = json_encode(array("phonenumber" => "string")); $url = 'https://api.cmtelecom.com/v1.1/numbervalidation'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000' ), CURLOPT_HEADER => TRUE, CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => TRUE ) ); $result = curl_exec($ch); var_dump($result); curl_close($ch);
The Lookup method in the Number Verifier API will look up additional information for the given phonenumber.
Information like the Portation-state, the actual operator, if the number is roaming and even if the number is active on the network.
Collecting this data is not free, and you must contact your account manager before you can use this resource.
https://api.cmtelecom.com/v1.1/numberlookup/{phonenumber}
Send one request with a phonenumber in the url, and receive the validation information as JSON object, enriched with properties provided by the lookup result.
name | in | required | schema |
---|---|---|---|
X-CM-PRODUCTTOKEN | header | true | 0000000-0000-0000-0000-000000000000 |
phonenumber | path | true | 0031687654321 |
mnp_lookup | query | false | false (default) |
responsetype | query | false | 2 (default) |
http status | content-type | description |
---|---|---|
200 | application/json | { |
curl -i https://api.cmtelecom.com/v1.1/numberlookup/0031687654321 -H "X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $data = json_encode(array("phonenumber" => "string")); $url = 'https://api.cmtelecom.com/v1.1/numberlookup/0031687654321'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000' ), CURLOPT_HEADER => TRUE, CURLOPT_RETURNTRANSFER => TRUE ) ); $result = curl_exec($ch); var_dump($result); curl_close($ch);
https://api.cmtelecom.com/v1.1/numberlookup
Send one JSON object with a phonenumber property, and receive the validation information as JSON object, enriched with properties provided by the lookup result.
name | in | required | schema |
---|---|---|---|
X-CM-PRODUCTTOKEN | header | true | 0000000-0000-0000-0000-000000000000 |
object | body | true | {"phonenumber" : "string"} |
object | body | false | {"mnp_lookup": false} (default) |
object | body | false | {"responsetype": 2} (default) |
http status | content-type | description |
---|---|---|
200 | application/json | { |
curl -i https://api.cmtelecom.com/v1.1/numberlookup -X POST -H "Content-Type: application/json" -H "X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000" -d '{"phonenumber": "string"}'
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $data = json_encode(array("phonenumber" => "string")); $url = 'https://api.cmtelecom.com/v1.1/numberlookup'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000' ), CURLOPT_HEADER => TRUE, CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => TRUE ) ); $result = curl_exec($ch); var_dump($result); curl_close($ch);