SMS API Reference
Send SMS messages programmatically via HTTP GET or POST. Built for speed, reliability, and developer ergonomics.
Authentication
The API supports two authentication methods. Using an API key is strongly recommended.
Pass your API key via the key parameter. More secure and easier to rotate than credentials.
Avoid special characters (&, #, /) in your password as they break query strings.
API Types
All send endpoints share the same base URL and accept both GET and POST. Account endpoints use a separate URL pattern.
Text SMS
Standard SMS, up to 720 chars
Flash SMS
Pop-up on recipient's screen
WAP-Push
Send clickable URL links
vCard
Send contact card information
Unicode SMS
Multi-language & emoji support
Credit Balance
Check remaining credits
DLR
Delivery reports by shoot ID
Fetch API Key
Retrieve key via credentials
Last Transaction
Most recent SMS shoot details
Text SMS API
Send plain text SMS to one or multiple recipients. Supports immediate and scheduled delivery.
Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| key | string | required* | Your API key YOUR_API_KEY |
| username | string | alt auth | Login username (instead of key) |
| password | string | alt auth | Login password. Avoid &, #, / characters |
| campaign | integer | required | Campaign ID Default: 7017 |
| routeid | integer | required | Route ID Default: 210 (VritTech-SMSBIT) |
| type | string | required | Must be text |
| contacts | string | required | Comma-separated 10-digit numbers e.g. 9841XXXXXX,9801XXXXXX |
| senderid | string | required | Approved Sender ID |
| msg | string | required | URL-encoded SMS text. Max 720 characters |
| responsetype | string | optional | Response format: http, json, or xml |
| time | string | optional | Schedule: 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.
Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| key | string | required | Your API key YOUR_API_KEY |
| routeid | integer | required | Route ID Default: 210 |
| type | string | required | Must be flash |
| contacts | string | required | Comma-separated 10-digit numbers |
| senderid | string | required | Approved Sender ID |
| msg | string | required | URL-encoded SMS text. Max 720 characters |
| time | string | optional | Schedule: 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.
Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| key | string | required | Your API key YOUR_API_KEY |
| routeid | integer | required | Route ID Default: 210 |
| type | string | required | Must be wap |
| contacts | string | required | Comma-separated 10-digit numbers |
| senderid | string | required | Approved Sender ID |
| wap_title | string | required | URL-encoded title. Max 60 characters |
| wap_url | string | required | URL-encoded link (include protocol: http/wap). Max 100 characters |
| time | string | optional | Schedule: 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.
Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| key | string | required | Your API key YOUR_API_KEY |
| routeid | integer | required | Route ID Default: 210 |
| type | string | required | Must be vcard |
| contacts | string | required | Comma-separated 10-digit numbers |
| senderid | string | required | Approved Sender ID |
| first_name | string | required | First name of the contact |
| last_name | string | required | Last name of the contact |
| company | string | optional | URL-encoded company name |
| job_title | string | optional | URL-encoded job title |
| telephone | string | optional | Phone number with country code, no leading zeros or + sign |
| string | optional | URL-encoded email address | |
| time | string | optional | Schedule: 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.
utf8_encode() before urlencode() on the message text.
Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| key | string | required* | Your API key YOUR_API_KEY |
| username | string | alt auth | Login username (instead of key) |
| password | string | alt auth | Login password |
| campaign | integer | required | Campaign ID Default: 7017 |
| routeid | integer | required | Route ID Default: 210 |
| type | string | required | Must be unicode |
| contacts | string | required | Comma-separated 10-digit numbers |
| senderid | string | required | Approved Sender ID |
| msg | string | required | UTF-8 then URL-encoded text. Max 720 characters |
| time | string | optional | Schedule: 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.
Parameters
| Parameter | Description |
|---|---|
| API KEY (in URL) | Your API key embedded in the URL path YOUR_API_KEY |
Response
[
{
"ROUTE_ID": "210",
"ROUTE": "VritTech-SMSBIT",
"BALANCE": "1500"
}
]
Code Example
// 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.
Parameters
| Parameter | Description |
|---|---|
| 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
[
{ "MSISDN": "98412XXXXX", "DLR": "Delivered", "DESC": "Message Delivered" },
{ "MSISDN": "98876XXXXX", "DLR": "Failed", "DESC": "Absent Subscriber" }
]
Code Example
// 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.
Parameters
| Parameter | Description |
|---|---|
| USERNAME (in URL) | Your login username YOUR_USERNAME |
| PASSWORD (in URL) | Your account password |
Response
The API key is the value after the slash.
Username or password is incorrect.
Code Example
// 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.
Parameters
| Parameter | Description |
|---|---|
| key | Your API key YOUR_API_KEY |
Response
{
"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
// 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
SMS submitted. Save the alphanumeric ID after the slash to pull delivery reports via DLR API.
An error occurred. The message is human-readable โ check credentials, parameters, and credit balance.
Common Errors
| Error | Cause & Fix |
|---|---|
| ERR: INVALID API KEY | Key expired or wrong. Re-fetch via the Fetch API Key endpoint. |
| ERR: INSUFFICIENT CREDIT | Not enough SMS credits. Top up account balance. |
| ERR: INVALID SENDER ID | Sender ID not approved. Use only whitelisted Sender IDs. |
| ERR: NO CONTACTS | Missing or empty contacts parameter. |
| ERR: EMPTY MESSAGE | The msg parameter is missing or blank. |
| ERR: INVALID CREDENTIALS | Wrong username or password (Fetch API Key endpoint). |
Quick Reference
| Constant | Value |
|---|---|
| SMS Endpoint | https://sms.vrittechnologies.com/smsapi/index.php |
| Balance Endpoint | https://sms.vrittechnologies.com/miscapi/{key}/getBalance/true/ |
| DLR Endpoint | https://sms.vrittechnologies.com/miscapi/{key}/getDLR/{shoot_id} |
| Fetch Key Endpoint | https://sms.vrittechnologies.com/getkey/{username}/{password} |
| Last Transaction | https://sms.vrittechnologies.com/lasttran/index.php?key={key} |
| API Key | YOUR_API_KEY |
| Username | YOUR_USERNAME |
| Default Campaign ID | 7017 |
| Default Route ID | 210 (VritTech-SMSBIT) |
| Schedule Time Format | YYYY-MM-DD H:I |
| Max Message Length | 720 chars (text/flash) ยท 70 chars/segment (unicode) |