Retailer magic: SMS strategies for Winter | On Demand Sign up for our webinar
Our HTTP API allows generating reports for both Short URL and Web SMS.
Here you can get a detailed report of an individual Short URL.
https://
www.voodoosms.com/vapi/server/surlrep
Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
case "GET":
$uid = htmlspecialchars($_GET["uid"]);
$pass = htmlspecialchars($_GET["pass"]);
$surlid = htmlspecialchars($_GET["surlid"]);
break;
case "POST":
$uid = htmlspecialchars($_POST["uid"]);
$pass = htmlspecialchars($_POST["pass"]);
$surlid = htmlspecialchars($_POST["surlid"]);
break;
}
$url = 'https://www.voodoosms.com/vapi/server/surlrep?uid='.$uid.'&pass='.$pass.
'&surlid='.$surlid;
$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>
<item>
<click_time>2017-05-05 14:01:22</click_time>
<ip_address>192.168.0.12</ip_address>
</item>
<item>
<click_time>2017-05-05 14:01:37</click_time>
<ip_address>192.168.12.55</ip_address>
</item>
</xml>
On success, the response header HTTP status code will be 200 OK
confirming that the message is sent. If you try to send a message without authorisation, an error code of 401 Unauthorized
will be received.
Response Code
Code | Type | Response |
---|---|---|
400 | int | BAD REQUEST required parameters missing |
401 | int | UNAUTHORIZED CHECK API USER |
204 | int | No Record Found. |
Here you can get a list of all the ShortURL’s setup on your account.
https://
www.voodoosms.com/vapi/server/surlist
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/surlist?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>
<item>
<short_url_id>1234</short_url_id>
<name>VoodooSMS</name>
<shorturl>vsms.co/3Sc</shorturl>
<longurl>https://www.voodoosms.com</longurl>
<created_date>2017-05-05 13:59:50</created_date>
<tracked>1</tracked>
<clicks>4</clicks>
</item>
</xml>
On success, the response header HTTP status code will be 200 OK
confirming that the message is sent. If you try to send a message without authorisation, an error code of 401 Unauthorized
will be received.
Response Code
Code | Type | Response |
---|---|---|
400 | int | BAD REQUEST required parameters missing |
401 | int | UNAUTHORIZED CHECK API USER |
204 | int | No Record Found. |
Here you can retrieve the statistics of your Web SMS campaigns.
https://
www.voodoosms.com/vapi/server/wsmsrep
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/wsmsrep?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>
<item>
<id>20162</id>
<SendTime>2017-04-05 13:55:00</SendTime>
<name>Web SMS Testing</name>
<originator>VoodooSMS</originator>
<sent>1</sent>
<delivered>1</delivered>
<pending>0</pending>
<failed>0</failed>
<body>Your message here</body>
<shorturlid>vsms.co/3Sc</shorturlid>
<shorturl></shorturl>
<longurl></longurl>
</item>
</xml>
On success, the response header HTTP status code will be 200 OK
confirming that the message is sent. If you try to send a message without authorisation, an error code of 401 Unauthorized
will be received.
Response Code
Code | Type | Response |
---|---|---|
400 | int | BAD REQUEST required parameters missing |
401 | int | UNAUTHORIZED CHECK API USER |
204 | int | No Record Found. |