๐Ÿ”‘
๐Ÿ“ก REST API v1

SMS API Reference

Send SMS messages programmatically via HTTP GET or POST. Built for speed, reliability, and developer ergonomics.

SMS Endpoint sms.vrittechnologies.com
Misc Endpoint sms.vrittechnologies.com/miscapi
Default Route ID 210 (VritTech-SMSBIT)
Default Campaign 7017

Authentication

The API supports two authentication methods. Using an API key is strongly recommended.

โœ“ Recommended โ€” API Key
key=YOUR_API_KEY

Pass your API key via the key parameter. More secure and easier to rotate than credentials.

Alternative โ€” Username & Password
username=YOUR_USERNAME&password=XXXXamp;password=YOUR_PASSWORD

Avoid special characters (&, #, /) in your password as they break query strings.

Text SMS API

Send plain text SMS to one or multiple recipients. Supports immediate and scheduled delivery.

GEThttps://sms.vrittechnologies.com/smsapi/index.php
POSThttps://sms.vrittechnologies.com/smsapi/index.php

Parameters

ParameterTypeStatusDescription
keystringrequired*Your API key
YOUR_API_KEY
usernamestringalt authLogin username (instead of key)
passwordstringalt authLogin password. Avoid &, #, / characters
campaignintegerrequiredCampaign ID
Default: 7017
routeidintegerrequiredRoute ID
Default: 210 (VritTech-SMSBIT)
typestringrequiredMust be text
contactsstringrequiredComma-separated 10-digit numbers
e.g. 9841XXXXXX,9801XXXXXX
senderidstringrequiredApproved Sender ID
msgstringrequiredURL-encoded SMS text. Max 720 characters
responsetypestringoptionalResponse format: http, json, or xml
timestringoptionalSchedule: YYYY-MM-DD H:I. Leave blank to send immediately

Code Examples

// HTTP GET โ€” API Key (PHP)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX,98012XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Hello People, have a great day');

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?key={$api_key}&campaign=7017&routeid=210"
         . "&type=text&contacts={$contacts}&senderid={$from}&msg={$msg}";

$response = file_get_contents($api_url);
echo $response;
?>
// HTTP GET โ€” Username & Password (PHP)
<?php
$username = 'YOUR_USERNAME';
$password = 'YOUR_PASSWORD';
$contacts = '98412XXXXX,98012XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Hello People, have a great day');

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?username={$username}&password={$password}"
         . "&campaign=7017&routeid=210&type=text"
         . "&contacts={$contacts}&senderid={$from}&msg={$msg}";

$response = file_get_contents($api_url);
echo $response;
?>
// HTTP POST โ€” API Key (PHP + cURL)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX,98012XXXXX,98812XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Hello People, have a great day');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://sms.vrittechnologies.com/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
    "key={$api_key}&campaign=7017&routeid=210&type=text"
  . "&contacts={$contacts}&senderid={$from}&msg={$msg}");

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
// HTTP POST โ€” Username & Password (PHP + cURL)
<?php
$username = 'YOUR_USERNAME';
$password = 'YOUR_PASSWORD';
$contacts = '98412XXXXX,98012XXXXX,98812XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Hello People, have a great day');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://sms.vrittechnologies.com/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
    "username={$username}&password={$password}"
  . "&campaign=7017&routeid=210&type=text"
  . "&contacts={$contacts}&senderid={$from}&msg={$msg}");

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
// Scheduled SMS (PHP)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Your scheduled message here');
$time     = urlencode('2026-03-01 09:30'); // YYYY-MM-DD H:I

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?key={$api_key}&campaign=7017&routeid=210&type=text"
         . "&contacts={$contacts}&senderid={$from}&msg={$msg}&time={$time}";

$response = file_get_contents($api_url);
echo $response;
?>

Flash SMS API

Flash SMS messages pop up directly on the recipient's screen without being saved to inbox. Same endpoint as Text SMS โ€” change type to flash. Note: Flash SMS does not use a campaign parameter.

GEThttps://sms.vrittechnologies.com/smsapi/index.php
POSThttps://sms.vrittechnologies.com/smsapi/index.php

Parameters

ParameterTypeStatusDescription
keystringrequiredYour API key
YOUR_API_KEY
routeidintegerrequiredRoute ID
Default: 210
typestringrequiredMust be flash
contactsstringrequiredComma-separated 10-digit numbers
senderidstringrequiredApproved Sender ID
msgstringrequiredURL-encoded SMS text. Max 720 characters
timestringoptionalSchedule: YYYY-MM-DD H:I. Leave blank to send immediately

Code Examples

// Flash SMS โ€” HTTP GET (PHP)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX,98012XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Hello People, have a great day');

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?key={$api_key}&routeid=210&type=flash"
         . "&contacts={$contacts}&senderid={$from}&msg={$msg}";

$response = file_get_contents($api_url);
echo $response;
?>
// Flash SMS โ€” HTTP POST / cURL (PHP)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX,98012XXXXX,98812XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Hello People, have a great day');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://sms.vrittechnologies.com/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
    "key={$api_key}&routeid=210&type=flash"
  . "&contacts={$contacts}&senderid={$from}&msg={$msg}");

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
// Scheduled Flash SMS (PHP)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX,98012XXXXX';
$from     = 'SENDER_ID';
$msg      = urlencode('Flash message scheduled');
$time     = urlencode('2026-03-01 09:30');

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?key={$api_key}&campaign=7017&routeid=210&type=flash"
         . "&contacts={$contacts}&senderid={$from}&msg={$msg}&time={$time}";

$response = file_get_contents($api_url);
echo $response;
?>

WAP-Push API

Send a clickable link via SMS. The recipient sees a title and taps to open the URL on their device.

GEThttps://sms.vrittechnologies.com/smsapi/index.php
POSThttps://sms.vrittechnologies.com/smsapi/index.php

Parameters

ParameterTypeStatusDescription
keystringrequiredYour API key
YOUR_API_KEY
routeidintegerrequiredRoute ID
Default: 210
typestringrequiredMust be wap
contactsstringrequiredComma-separated 10-digit numbers
senderidstringrequiredApproved Sender ID
wap_titlestringrequiredURL-encoded title. Max 60 characters
wap_urlstringrequiredURL-encoded link (include protocol: http/wap). Max 100 characters
timestringoptionalSchedule: YYYY-MM-DD H:I

Code Examples

// WAP-Push โ€” HTTP GET (PHP)
<?php
$api_key   = 'YOUR_API_KEY';
$contacts  = '98412XXXXX,98012XXXXX';
$from      = 'SENDER_ID';
$wap_title = urlencode('Download Free Wallpapers');
$wap_url   = urlencode('http://www.mysite.net/wallpapers/');

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?key={$api_key}&routeid=210&type=wap"
         . "&contacts={$contacts}&senderid={$from}"
         . "&wap_title={$wap_title}&wap_url={$wap_url}";

$response = file_get_contents($api_url);
echo $response;
?>
// WAP-Push โ€” HTTP POST / cURL (PHP)
<?php
$api_key   = 'YOUR_API_KEY';
$contacts  = '98412XXXXX,98012XXXXX,98812XXXXX';
$from      = 'SENDER_ID';
$wap_title = urlencode('Download Free Wallpapers');
$wap_url   = urlencode('http://www.mysite.net/wallpapers/');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://sms.vrittechnologies.com/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
    "key={$api_key}&routeid=210&type=wap"
  . "&contacts={$contacts}&senderid={$from}"
  . "&wap_title={$wap_title}&wap_url={$wap_url}");

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>

vCard API

Send a contact card that recipients can save directly to their phone's address book.

GEThttps://sms.vrittechnologies.com/smsapi/index.php
POSThttps://sms.vrittechnologies.com/smsapi/index.php

Parameters

ParameterTypeStatusDescription
keystringrequiredYour API key
YOUR_API_KEY
routeidintegerrequiredRoute ID
Default: 210
typestringrequiredMust be vcard
contactsstringrequiredComma-separated 10-digit numbers
senderidstringrequiredApproved Sender ID
first_namestringrequiredFirst name of the contact
last_namestringrequiredLast name of the contact
companystringoptionalURL-encoded company name
job_titlestringoptionalURL-encoded job title
telephonestringoptionalPhone number with country code, no leading zeros or + sign
emailstringoptionalURL-encoded email address
timestringoptionalSchedule: YYYY-MM-DD H:I

Code Examples

// vCard โ€” HTTP GET (PHP)
<?php
$api_key    = 'YOUR_API_KEY';
$contacts   = '98412XXXXX,98012XXXXX';
$from       = 'SENDER_ID';
$first_name = 'Sam';
$last_name  = 'Walker';
$company    = urlencode('XYZ Pvt Ltd, CA');
$job_title  = urlencode('Senior Sales Executive');
$telephone  = urlencode('1-443-456-1675');
$email      = urlencode('sam.walker@xyz.com');

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?key={$api_key}&campaign=7017&routeid=210&type=vcard"
         . "&contacts={$contacts}&senderid={$from}"
         . "&first_name={$first_name}&last_name={$last_name}"
         . "&company={$company}&job_title={$job_title}"
         . "&telephone={$telephone}&email={$email}";

$response = file_get_contents($api_url);
echo $response;
?>
// vCard โ€” HTTP POST / cURL (PHP)
<?php
$api_key    = 'YOUR_API_KEY';
$contacts   = '98412XXXXX,98012XXXXX,98812XXXXX';
$from       = 'SENDER_ID';
$first_name = 'Sam';
$last_name  = 'Walker';
$company    = urlencode('XYZ Pvt Ltd, CA');
$job_title  = urlencode('Senior Sales Executive');
$telephone  = urlencode('1-443-456-1675');
$email      = urlencode('sam.walker@xyz.com');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://sms.vrittechnologies.com/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
    "key={$api_key}&campaign=7017&routeid=210&type=vcard"
  . "&contacts={$contacts}&senderid={$from}"
  . "&first_name={$first_name}&last_name={$last_name}"
  . "&company={$company}&job_title={$job_title}"
  . "&telephone={$telephone}&email={$email}");

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>

Unicode SMS API

Send SMS in Nepali, Hindi, Arabic, Chinese, Russian, or any Unicode script. The message text must be UTF-8 encoded before URL encoding.

GEThttps://sms.vrittechnologies.com/smsapi/index.php
POSThttps://sms.vrittechnologies.com/smsapi/index.php
โš ๏ธ Unicode SMS uses shorter segments (70 chars/segment vs 160 for ASCII). Always apply utf8_encode() before urlencode() on the message text.

Parameters

ParameterTypeStatusDescription
keystringrequired*Your API key
YOUR_API_KEY
usernamestringalt authLogin username (instead of key)
passwordstringalt authLogin password
campaignintegerrequiredCampaign ID
Default: 7017
routeidintegerrequiredRoute ID
Default: 210
typestringrequiredMust be unicode
contactsstringrequiredComma-separated 10-digit numbers
senderidstringrequiredApproved Sender ID
msgstringrequiredUTF-8 then URL-encoded text. Max 720 characters
timestringoptionalSchedule: YYYY-MM-DD H:I

Code Examples

// Unicode SMS โ€” HTTP GET / API Key (PHP)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX,98012XXXXX';
$from     = 'SENDER_ID';
$sms_text = 'เคจเคฎเคธเฅเคคเฅ‡, Hello in Nepali';  // UTF-8 string
$message  = urlencode(utf8_encode($sms_text));

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?key={$api_key}&campaign=7017&routeid=210&type=unicode"
         . "&contacts={$contacts}&senderid={$from}&msg={$message}";

$response = file_get_contents($api_url);
echo $response;
?>
// Unicode SMS โ€” HTTP GET / Username & Password (PHP)
<?php
$username = 'YOUR_USERNAME';
$password = 'YOUR_PASSWORD';
$contacts = '98412XXXXX,98012XXXXX';
$from     = 'SENDER_ID';
$sms_text = 'เคจเคฎเคธเฅเคคเฅ‡, Hello in Nepali';
$message  = urlencode(utf8_encode($sms_text));

$api_url = "https://sms.vrittechnologies.com/smsapi/index.php"
         . "?username={$username}&password={$password}"
         . "&campaign=7017&routeid=210&type=unicode"
         . "&contacts={$contacts}&senderid={$from}&msg={$message}";

$response = file_get_contents($api_url);
echo $response;
?>
// Unicode SMS โ€” HTTP POST / API Key (PHP + cURL)
<?php
$api_key  = 'YOUR_API_KEY';
$contacts = '98412XXXXX,98012XXXXX,98812XXXXX';
$from     = 'SENDER_ID';
$sms_text = 'เคจเคฎเคธเฅเคคเฅ‡, Hello in Nepali';
$message  = urlencode(utf8_encode($sms_text));

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://sms.vrittechnologies.com/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
    "key={$api_key}&campaign=7017&routeid=210&type=unicode"
  . "&contacts={$contacts}&senderid={$from}&msg={$message}");

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
// Unicode SMS โ€” HTTP POST / Username & Password (PHP + cURL)
<?php
$username = 'YOUR_USERNAME';
$password = 'YOUR_PASSWORD';
$contacts = '98412XXXXX,98012XXXXX,98812XXXXX';
$from     = 'SENDER_ID';
$sms_text = 'เคจเคฎเคธเฅเคคเฅ‡, Hello in Nepali';
$message  = urlencode(utf8_encode($sms_text));

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://sms.vrittechnologies.com/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
    "username={$username}&password={$password}"
  . "&campaign=7017&routeid=210&type=unicode"
  . "&contacts={$contacts}&senderid={$from}&msg={$message}");

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>

Credit Balance API

Check your remaining SMS credits per route. Uses a different URL pattern from the send APIs.

GET https://sms.vrittechnologies.com/miscapi/{API_KEY}/getBalance/true/

Parameters

ParameterDescription
API KEY (in URL)Your API key embedded in the URL path
YOUR_API_KEY

Response

json โ€” success
[
  {
    "ROUTE_ID": "210",
    "ROUTE":    "VritTech-SMSBIT",
    "BALANCE":  "1500"
  }
]

Code Example

php
// Credit Balance Check (PHP)
<?php
$api_key = 'YOUR_API_KEY';
$api_url = "https://sms.vrittechnologies.com/miscapi/{$api_key}/getBalance/true/";

$response = file_get_contents($api_url);
$balance  = json_decode($response);

foreach ($balance as $route) {
    echo "Route: {$route->ROUTE} | Balance: {$route->BALANCE}\n";
}
?>

DLR Fetch API

Retrieve delivery reports for a submitted SMS batch using the shoot ID returned from any send call.

GET https://sms.vrittechnologies.com/miscapi/{API_KEY}/getDLR/{SHOOT_ID}

Parameters

ParameterDescription
API KEY (in URL)Your API key
YOUR_API_KEY
SHOOT_ID (in URL)The alpha-numeric shoot ID from a previous send response
e.g. nick51fa4816d8043

Response

json โ€” success
[
  { "MSISDN": "98412XXXXX", "DLR": "Delivered", "DESC": "Message Delivered" },
  { "MSISDN": "98876XXXXX", "DLR": "Failed",    "DESC": "Absent Subscriber" }
]

Code Example

php
// DLR Fetch (PHP)
<?php
$api_key      = 'YOUR_API_KEY';
$sms_shoot_id = 'nick51fa4816d8043'; // replace with your shoot ID
$api_url      = "https://sms.vrittechnologies.com/miscapi/{$api_key}/getDLR/{$sms_shoot_id}";

$response  = file_get_contents($api_url);
$dlr_array = json_decode($response);

foreach ($dlr_array as $dlr) {
    echo "{$dlr->MSISDN}: {$dlr->DLR} โ€” {$dlr->DESC}\n";
}
?>

Fetch API Key

Retrieve your API key programmatically using your username and password. Useful for automated key rotation.

GET https://sms.vrittechnologies.com/getkey/{USERNAME}/{PASSWORD}
โš ๏ธ This endpoint requires username + password in the URL path. The API key cannot be used to fetch itself.

Parameters

ParameterDescription
USERNAME (in URL)Your login username
YOUR_USERNAME
PASSWORD (in URL)Your account password

Response

โœ“ Success
API-KEY/YOUR_API_KEY

The API key is the value after the slash.

โœ— Error
ERR: INVALID CREDENTIALS

Username or password is incorrect.

Code Example

php
// Fetch API Key (PHP)
<?php
$login_id = 'YOUR_USERNAME';
$password = 'YOUR_PASSWORD';
$api_url  = "https://sms.vrittechnologies.com/getkey/{$login_id}/{$password}";

$response = file_get_contents($api_url);

// Parse the key from "API-KEY/xxxxxxxx"
if (strpos($response, 'API-KEY/') === 0) {
    $api_key = substr($response, strlen('API-KEY/'));
    echo "Your API Key: {$api_key}";
} else {
    echo "Error: {$response}";
}
?>

Last Transaction API

Returns full details of the most recent SMS shoot from your account, including submission stats and credit usage.

GET https://sms.vrittechnologies.com/lasttran/index.php?key={API_KEY}

Parameters

ParameterDescription
keyYour API key
YOUR_API_KEY

Response

json โ€” success
{
  "response_code":    200,
  "response_message": "success",
  "data": {
    "submission_time":      "2026-02-27 13:45:00",
    "sms_shoot_id":        "nick51fa4816d8043",
    "sent_via":            "HTTP-API",
    "total_submitted":     "2",
    "duplicates_removed":  "0",
    "invalids_removed":    "0",
    "blacklisted_removed": "0",
    "charges_per_sms":     "1",
    "total_credits_deducted": "2",
    "sms_text":            "Hello People, have a great day"
  }
}

Code Example

php
// Last Transaction (PHP)
<?php
$api_key = 'YOUR_API_KEY';
$api_url = "https://sms.vrittechnologies.com/lasttran/index.php?key={$api_key}";

$response = file_get_contents($api_url);
$data     = json_decode($response, true);

if ($data['response_code'] === 200) {
    $tx = $data['data'];
    echo "Shoot ID: {$tx['sms_shoot_id']}\n";
    echo "Submitted: {$tx['total_submitted']} | Deducted: {$tx['total_credits_deducted']}\n";
    echo "Message: {$tx['sms_text']}\n";
}
?>

API Responses

โœ“ Success
SMS-SHOOT-ID/a7f3b2c1d9e0

SMS submitted. Save the alphanumeric ID after the slash to pull delivery reports via DLR API.

โœ— Error
ERR: INVALID API KEY

An error occurred. The message is human-readable โ€” check credentials, parameters, and credit balance.

Common Errors

ErrorCause & Fix
ERR: INVALID API KEYKey expired or wrong. Re-fetch via the Fetch API Key endpoint.
ERR: INSUFFICIENT CREDITNot enough SMS credits. Top up account balance.
ERR: INVALID SENDER IDSender ID not approved. Use only whitelisted Sender IDs.
ERR: NO CONTACTSMissing or empty contacts parameter.
ERR: EMPTY MESSAGEThe msg parameter is missing or blank.
ERR: INVALID CREDENTIALSWrong username or password (Fetch API Key endpoint).

Quick Reference

ConstantValue
SMS Endpointhttps://sms.vrittechnologies.com/smsapi/index.php
Balance Endpointhttps://sms.vrittechnologies.com/miscapi/{key}/getBalance/true/
DLR Endpointhttps://sms.vrittechnologies.com/miscapi/{key}/getDLR/{shoot_id}
Fetch Key Endpointhttps://sms.vrittechnologies.com/getkey/{username}/{password}
Last Transactionhttps://sms.vrittechnologies.com/lasttran/index.php?key={key}
API KeyYOUR_API_KEY
UsernameYOUR_USERNAME
Default Campaign ID7017
Default Route ID210 (VritTech-SMSBIT)
Schedule Time FormatYYYY-MM-DD H:I
Max Message Length720 chars (text/flash) ยท 70 chars/segment (unicode)