Sender ID API

A Sender ID is the name or number that identifies the sender of an SMS message. This API allows businesses retrieve the status of all registered sender ID and request registration of sender ID through GET and POST request type respectively.

Fetch Sender ID

Endpoint : https://BASE_URL/api/sender-id?api_key=api-key

Request Type : GET

Sample Response:

  {
      "current_page": 1,
      "data": [
          {
              "sender_id": "ACME Key",
              "status": "unblock",
              "company": ACME,
              "usecase": null,
              "country": null,
              "created_at": "2021-03-29 16:51:53"
          },
          {
              "sender_id": "ACME Alert",
              "status": "unblock",
              "company": ACME,
              "usecase": null,
              "country": null,
              "created_at": "2021-03-29 16:51:09"
          },
          {
              "sender_id": "ACME Wall",
              "status": "unblock",
              "company": ACME,
              "usecase": null,
              "country": null,
              "created_at": "2021-03-29 16:50:38"
          },
          {
              "sender_id": "Hooli",
              "status": "unblock",
              "company": Hooli,
              "usecase": null,
              "country": null,
              "created_at": "2021-03-26 13:19:16"
          },
          {
              "sender_id": "Google",
              "status": "unblock",
              "company": null,
              "usecase": null,
              "country": null,
              "created_at": "2021-01-19 17:41:30"
          },
          {
              "sender_id": "Facebook",
              "status": "unblock",
              "company": null,
              "usecase": null,
              "country": null,
              "created_at": "2021-01-19 17:41:14"
          },
         
      ],
      "first_page_url": "https://BASE_URL/api/sender-id?page=1",
      "from": 1,
      "last_page": 47,
      "last_page_url": "https://BASE_URL/api/sender-id?page=47",
      "next_page_url": "https://BASE_URL/api/sender-id?page=2",
      "path": "https://BASE_URL/api/sender-id",
      "per_page": 10,
      "prev_page_url": null,
      "to": 15,
      "total": 704
  }

Request Sender ID

Endpoint : https://BASE_URL/api/sender-id/request

Request Type : POST

OptionsRequiredDescription
api_keyyesstring
Your API key (It can be found on your Termii dashboard).
sender_idyesstring
Represents the ID of the sender which can be alphanumeric or numeric. Alphanumeric sender ID length should be between 3 and 11 characters (Example:CompanyName)
usecaseyesstring
A sample of the type of message sent.
companyyesstring
Represents the name of the company with the sender ID.
{
  "api_key":"Your API key",
  "sender_id": "Acme",
  "usecase": "Your OTP code is zxsds",
  "company": "Acme Corp"
}
var data = {  "api_key":"Your API key",
              "sender_id": "Acme",
              "usecase": "Your OTP code is zxsds",
              "company": "Acme Corp" };

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("POST", "https://BASE_URL/api/sender-id/request");
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",
          "sender_id": "Acme",
          "usecase": "Your OTP code is zxsds",
          "company": "Acme Corp"};

var options = {
'method': 'POST',
'url': 'https://BASE_URL/api/sender-id/request',
'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://BASE_URL/api/sender-id/request"
payload = {
         "api_key":"Your API key",
         "sender_id": "Acme",
         "usecase": "Your OTP code is zxsds",
         "company": "Acme Corp"
       }
headers = {
'Content-Type': 'application/json',
}
response = requests.request("GET", url, headers=headers, json=payload)
print(response.text)
RestClient restClient = new RestClient("https://BASE_URL/api/sender-id/request");

//Creating Json object
JObject objectBody = new JObject();
objectBody.Add("api_key","Your API Key");
objectBody.Add("sender_id","Acme");
objectBody.Add("usecase","Acme Corp");


RestRequest restRequest = new RestRequest(Method.POST);

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.post("https://BASE_URL/api/sender-id/request")
 .header("Content-Type", "application/json")
 .body("   {\r\n \"api_key\":\"Your API key\",\r\n  \"sender_id\": \"Acme\",\r\n  \"usecase\": \"Your OTP code is zxsds\",\r\n   \"company\": \"Acme Corp\"\r\n    }")
 .asString();
$curl = curl_init();
$data = array("api_key" => "Your API key", "sender_id" => "Acme", 
"usecase" => "Your OTP code is zxsdc", "company" => "Acme Corp" );

$post_data = json_encode($data);

curl_setopt_array($curl, array(
CURLOPT_URL => "https://BASE_URL/api/sender-id/request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $post_data,
CURLOPT_HTTPHEADER => array(
  "Content-Type: application/json"
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response

{
    "code": "ok",
    "message": "Sender Id requested. You will be  contacted by your account manager."
  
  
}
Updated at, Wednesday, May 22, 2024