Blacklists

Add Number

Allows you to add a single or multiple numbers to your Blacklist.

Definition

https:// www.voodooSMS.com/vapi/server/addToBlacklist

Methods

GET

Required Parameters

uid: System allocated username for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
pass: System password for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
CLI: Format: 447700900000 (where 44 is country code e.g. 44 is UK).
cc: Check & reformat destination number feature This is an optional field, if you choose to specify the country code in the sendSMS API Call, e.g. 44 and the API will check that the specified destination number Examples.
If dest=447700900000 and cc=44 - no change will be made.
If dest=07700900000 and cc=44 - dest will be changed to 447700900000.
If dest=7700900000 and cc=44 - dest will be changed to 447700900000.

Add a single or multiple CLI’s to your Blacklist

Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
     case "GET":
          $uid = htmlspecialchars($_GET["uid"]);
          $pass = htmlspecialchars($_GET["pass"]);
          $cc = htmlspecialchars($_GET["cc"]);
          $cli = htmlspecialchars($_GET["cli"]);
     break;
     case "POST":
          $uid = htmlspecialchars($_POST["uid"]);
          $pass = htmlspecialchars($_POST["pass"]);
          $cc = htmlspecialchars($_POST["cc"]);
          $cli = htmlspecialchars($_POST["cli"]);
    break;
}

$url = 'https://www.voodoosms.com/vapi/server/addToBlacklist?uid='.$uid.'&pass='.$pass.'&cc='
    .$cc.'&cli='.$cli;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output."   ".curl_error($ch);
 // Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>   
   <result>200</result>
   <message>Success</message>
   <numbers>
      <number>447700900600</number>
   </numbers>
</xml>

Delete Number

Allows you to remove a single or multiple numbers from your Blacklist.

Definition

https:// www.voodooSMS.com/vapi/server/removeBlacklistNumber

Methods

GET

Required Parameters

uid: System allocated username for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
pass: System password for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
CLI: Format: 447700900000 (where 44 is country code e.g. 44 is UK).

Remove a single or multiple CLI’s to your Blacklist

Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
     case "GET":
          $uid = htmlspecialchars($_GET["uid"]);
          $pass = htmlspecialchars($_GET["pass"]);
          $number = htmlspecialchars($_GET["number"]);
     break;
     case "POST":
          $uid = htmlspecialchars($_POST["uid"]);
          $pass = htmlspecialchars($_POST["pass"]);
          $number = htmlspecialchars($_POST["number"]);
    break;
}

$url = 'https://www.voodoosms.com/vapi/server/removeBlacklistNumber?uid='.$uid.'&pass='.$pass.'&number='.$number;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output."   ".curl_error($ch);
 // Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>   
   <result>200</result>
   <message>The blacklisted number has been removed</message>
</xml>

Retrieve all Numbers

API call which retrieves the current blacklist numbers. If the blacklist is empty, the response will not contain any <item> elements and the count will be 0.

Definition

https:// www.voodooSMS.com/vapi/server/getBlacklistNumbers

Methods

GET

Required Parameters

uid: System allocated username for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
pass: System password for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.

Retrieve all blacklisted numbers

Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
     case "GET":
          $uid = htmlspecialchars($_GET["uid"]);
          $pass = htmlspecialchars($_GET["pass"]);
     break;
     case "POST":
          $uid = htmlspecialchars($_POST["uid"]);
          $pass = htmlspecialchars($_POST["pass"]);
    break;
}

$url = 'https://www.voodoosms.com/vapi/server/getBlacklistNumber?uid='.$uid.'&pass='.$pass;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output."   ".curl_error($ch);
 // Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>
  <result>200 OK</result>
  <total_blacklisted_numbers>3</total_blacklisted_numbers>
  <blacklist>
    <number>
      <item>447000000000</item>
      <item>447000000001</item>
      <item>447000000002</item>
    </number>
  </blacklist>
</xml>