Short URL

Create, update and delete Short URL’s from your account.





Required Parameters

uid: System allocated username for API user configured within the Portal in Send SMS>API SMS>HTTP API.
pass: System password for API user configured within the Portal in Send SMS>API SMS>HTTP API.
file: An external file URL.
Extensions: CSV, XLS, XLSX, PDF, Doc, DocX, TXT, JPG, JPEG, PNG.
Size: Less than 10MB.
expiry: How long the file will be valid for.
Example: 1h (1 hour)
Valid formats: s = seconds * | * m = minutes * | * h = hour * | * d = day * | * w = week.
method: How to handle your Short URL.
Options: add
suid: This is only used in conjunction with the update and delete methods.
The ID of your Short URL. This is generated with the add method.

Optional Parameters

format: The format you wish the return status to be in
Default: XML
Options: XML | JSON

Single textual message to single destinations

    case "GET":
        $uid = htmlspecialchars($_GET["uid"]);
        $pass = htmlspecialchars($_GET["pass"]);
        $file = htmlspecialchars($_GET["file"]);
        $expiry = htmlspecialchars($_GET["expiry"]);
        $method = htmlspecialchars($_GET["method"]);
        $suid = htmlspecialchars($_GET["suid"]);
    case "POST":
        $uid = htmlspecialchars($_POST["uid"]);
        $pass = htmlspecialchars($_POST["pass"]);
        $file = htmlspecialchars($_POST["file"]);
        $expiry = htmlspecialchars($_POST["expiry"]);
        $method= htmlspecialchars($_POST["method"]);
        $suid = htmlspecialchars($_POST["suid"]);

$url = ''.$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
   <resultText>Short URL generated Successfully</resultText>
   <name />

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.

SMS Response Details

Response Code
Code Type Response
200 int OK
400 int Required parameters are missing.
400 int Invalid file. You have given an invalid file extension. See documentation for valid extensions.
400 int Invalid expiry format. See documentation for valid formats.
400 int Expiry date cannot exceed 31 days.
400 int Invalid file. File cannot be validated, it may not be available.
400 int Invalid file. File size is greater than 10MB.
400 int Short URL could not be updated. Please try again, or contact
400 int There was a problem processing your link. Please try again, or contact
400 int Short URL could not be deleted. Please try again, or contact
400 int Invalid method. Use ‘add, update or delete.’
401 int Your API credentials are invalid.