Menu
Introduction Getting started SMS Promotional - Large campaigns Transactional - Basic Transactional (Alerts) - Virtual Number Route Transactional (Alerts) - Priority Routing Transactional (OTPs & Alerts) - Special route International route to Nigeria International route to Other Countries SMS DLR SMS DLR Webhooks Voice Voice OTP Voice Broadcasts Voice DLR Units Transfer Units to Sub-Account Transfer Units to Other Account Check Units Balance Sender IDs Register Sender IDs Check Sender ID status Categories Add Customer Remove Customer Virtual Number Inbox webhook Carrier Billing Run USSD Query Run Shortcode Query Query Status Tools Create Sub-Account Check DND Status Check Service Status 3rd-party integrations ZOHO
Register Sender ID Register sender IDs automatically through the API.
POST
https://api.textng.xyz/register-sender-id/
💡 USAGE There is no limit to how many times you can call the API.
PHP code
<?php
  $key="YOUR-ACCOUNT-KEY";
  $senderid="SENDER-ID-TO-BE-REGISTERED";
  $type="SENDER-ID-TYPE";

  $response = httpPost("https://api.textng.xyz/register-sender-id/",array("key"=>"$key","sender_id"=>"$senderid","type"=>"$type"));

  function httpPost($url, $data){
      $curl = curl_init($url);
      curl_setopt($curl, CURLOPT_POST, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      $response = curl_exec($curl);
      curl_close($curl);

      echo $response;
  }
?>
jQuery code
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  var key="YOUR-ACCOUNT-KEY";
  var sender_id="SENDER-ID-TO-BE-REGISTERED";
  var type="type";
  var url = "https://api.textng.xyz/register-sender-id/";

  $.post(url, { key: key, sender_id: sender_id, type: type }, function (res) { 
      var data = JSON.parse(res);
      if (data.status === "SUCCESS") {
          // Do Success Work!
      } else {
          // Do Error Work!
      }
  });
</script>
Parameters
Parameter Example Description
Key * XXXXX-XXXX-XXXXX This can be found in the Developers page of your dashboard. The key authorizes the transaction.
sender_id* XXXXXX The sender ID you wish to register.
type * The sender ID type. Use the corresponding number to represent the sender ID type.

1 - PROMOTIONAL SMS ROUTE
2 - TRANSACTIONAL SMS ROUTE (NCC CORPORATE BIND)
3 - INTERNATIONAL ROUTE TO NIGERIA
4 - INTERNATIONAL ROUTE TO OTHER COUNTRIES
Responses
JSON - Success
{'status': 'SUCCESS', 'response': 'Successful, Processing Sender ID'}
JSON Error (Invalid key)
{'status': 'ERROR', 'response': 'ERROR Invalid Key'}
JSON Error (Incomplete parameters)
{'status': 'ERROR', 'response': 'ERROR Incomplete Parameters'}
JSON Error (Multiple requests)
{'status': 'ERROR', 'response': 'ERROR Sender ID Already Registered'}
JSON Error (Invalid type)
{'status': 'ERROR', 'response': 'ERROR Invalid Type, Refer To Documentation'}
Other Errors
{'status': 'ERROR', 'response': 'ERROR Could Not Register Sender ID'}