Status

The status API allows businesses to detect if a number is fake or has ported to a new network.

Endpoint : https://api.ng.termii.com/api/insight/number/query?phone_number=phone_number&api_key=api_key&country_code=NG

Request Type : GET

OptionsRequiredDescription
api_keyyesstring
Your API key (It can be found on your Termii dashboard).
phone_numberyesstring
Represents the phone number to be verified. Phone number must be in the international format (Example: 2348753243651)
country_codeyesstring
Represents short alphabetic codes developed to represent countries (Example: NG ) .
   {
    "api_key": "Your API key",
    "phone_number": "2348753243651",
    "country_code": "NG"
  }
var data = {
              "api_key": "Your API key",
              "phone_number": "2348753243651",
              "country_code": "NG"
          };

var data = JSON.stringify(data);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
  console.log(this.responseText);
}
});

xhr.open("GET", " https://api.ng.termii.com/api/insight/number/query");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Content-Type", "application/json");

xhr.send(data);

var request = require('request');
  var data = {
                "api_key": "Your API key",
                "phone_number": "2348753243651",
                "country_code": "NG"
              };
  var options = {
    'method': 'GET',
    'url': ' https://api.ng.termii.com/api/insight/number/query',
    'headers': {
      'Content-Type': ['application/json', 'application/json']
    },
    body: JSON.stringify(data)
  
  };
  request(options, function (error, response) { 
    if (error) throw new Error(error);
    console.log(response.body);
  });



import requests
url = "https://api.ng.termii.com/api/insight/number/query"
payload = {
         "api_key": "Your API key",
         "phone_number": "2348753243651",
         "country_code": "NG"
       }
headers = {
'Content-Type': 'application/json',
}
response = requests.request("GET", url, headers=headers, json=payload)
print(response.text)

RestClient restClient = new RestClient(" https://api.ng.termii.com/api/insight/number/query");

//Creating Json object
JObject objectBody = new JObject();
objectBody.Add("api_key","Your API Key");
objectBody.Add("phone_number","+2348753243651");
objectBody.Add("country_code","NG");

RestRequest restRequest = new RestRequest(Method.GET);

restRequest.AddHeader("Content-Type", "application/json");
restRequest.AddParameter("application/json", objectBody,  ParameterType.RequestBody);
IRestResponse restResponse = restClient.Execute(restRequest);
Console.WriteLine(restResponse.Content);
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get(" https://api.ng.termii.com/api/insight/number/query")
.header("Content-Type", "application/json")
.body("{\r\n \"api_key\": \"Your API Key\",\r\n \"phone_number\": \"2348753243651\"\r\n \"country_code\": \"NG"\"\r\n }")
.asString();
$curl = curl_init();
$data = array ( "api_key" => "Your API key","phone_number" => "+2348753243651", "country_code" => "NG");

$post_data = json_encode($data);

curl_setopt_array($curl, array(
 CURLOPT_URL => " https://api.ng.termii.com/api/insight/number/query",
 CURLOPT_RETURNTRANSFER => true,
 CURLOPT_ENCODING => "",
 CURLOPT_MAXREDIRS => 10,
 CURLOPT_TIMEOUT => 0,
 CURLOPT_FOLLOWLOCATION => true,
 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
 CURLOPT_CUSTOMREQUEST => "GET",
 CURLOPT_POSTFIELDS => $post_data,
 CURLOPT_HTTPHEADER => array(
   "Content-Type: application/json"
 ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


Response

   {
       "result": [
           {
               "routeDetail": {
                   "number": "2348753243651",
                   "ported": 0
               },
               "countryDetail": {
                   "countryCode": "234",
                   "mobileCountryCode": "621",
                   "iso": "NG"
               },
               "operatorDetail": {
                   "operatorCode": "ANG",
                   "operatorName": "Airtel Nigeria",
                   "mobileNumberCode": "20",
                   "mobileRoutingCode": "41",
                   "carrierIdentificationCode": "23433",
                   "lineType": "Mobile"
               },
               "status": 200
           }
       ]
   }
Updated at, Wednesday, January 10, 2024