• Get Started >>

›Insights

Home

  • Introduction

Inbox

  • Incoming

Switch

  • Sender ID
  • Messaging
  • Number
  • Templates

Token

  • Send Token
  • Verify Token
  • In-App Token

Insights

  • Events and Reports
  • Balance
  • Search
  • Status
  • History

Status - Updated 11/20

Status

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

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

Request Type : GET

OptionsDescription
api_key*string
Your API key (It can be found on your Termii dashboard).
phone_number*string
Represents the phone number to be verified. Phone number must be in the international format (Example: 2348753243651)
country_code*string
Represents short alphabetic codes developed to represent countries (Example: NG) .
JSON
JavaScript
NodeJs
Python
C#
JAVA
PHP
   {
"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://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://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 http.client
import json
conn = http.client.HTTPSConnection(" https://termii.com/api/insight/number/query")
headers = {'Content-Type': 'application/json'}

data = {
"api_key": "Your API key",
"phone_number": "2348753243651",
"country_code": "NG"
}
conn.request("GET", "", data, headers)
response = conn.getresponse()
print(response.read().decode())

RestClient restClient = new RestClient(" https://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://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://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
           }
       ]
   }
← SearchHistory →