SMS Gateway API Reference
Integrate SMS messaging directly into your applications. Supports HTTP GET and POST — transactional alerts, OTP delivery, bulk campaigns, and notification systems.
Table of Contents
-1003.📡 API Endpoint URLs
Four redundant endpoints are provided. Endpoints 1 and 2 are recommended for production. Configure your integration to fall back to alternative URLs if the primary is unavailable.
https://smtpapi.vocotext.com/isms_send_all_id.phpRecommendedhttps://smtpapi2.vocotext.com/isms_send_all_id.phpRecommendedhttps://www.isms.com.my/isms_send_all_id.phphttps://ww3.isms.com.my/isms_send_all_id.php🔤 SMS Encoding Types
The type parameter controls character encoding. Use type 1 for Latin-script languages and type 2 for Chinese, Japanese, Arabic, and other non-ASCII scripts.
English, Bahasa Melayu, and other Latin-script languages. Maximum 153 characters per SMS credit. Messages longer than 153 characters are split into multiple parts.
Chinese, Japanese, Arabic, Korean, and other non-ASCII scripts. Maximum 63 characters per SMS credit. Unicode encoding allows full international character support.
📋 Request Parameters
All parameters apply to both GET and POST methods. URL-encode all values when using GET.
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| un | String | Required | Your iSMS account username | myusername |
| pwd | String | Required | Your iSMS account password | mypassword |
| dstno | String | Required | Destination phone number in international format — no + prefix | 601X-XXXXXXX |
| msg | String | Required | SMS message text — URL-encoded for GET requests | Hello%20World |
| type | Integer | Required | Encoding: 1 = ASCII (English/BM) · 2 = Unicode (Chinese/Arabic) | 1 |
| agreedterm | String | Required | Must be YES — confirms acceptance of iSMS Terms & Conditions. Requests without this will be filtered. | YES |
| sendid | String | Optional | Sender ID displayed to recipient. Max 11 alphanumeric characters. No spaces or special characters. | MyCompany |
🔗 HTTP GET Request
Append all parameters as URL query strings. All values must be URL-encoded.
GET /isms_send_all_id.php HTTP/1.1 Host: smtpapi.vocotext.com ?un=myusername &pwd=mypassword &dstno=601X-XXXXXXX &msg=Hello%20World &type=1 &sendid=MyCompany &agreedterm=YES
Full Single-Line GET URL
https://smtpapi.vocotext.com/isms_send_all_id.php?un=myusername&pwd=mypassword &dstno=601X-XXXXXXX&msg=Hello%20World&type=1&sendid=MyCompany&agreedterm=YES
📮 HTTP POST Request (PHP cURL)
POST parameters as application/x-www-form-urlencoded. Recommended for production — avoids URL length limits and is more secure.
POST /isms_send_all_id.php HTTP/1.1 Host: smtpapi.vocotext.com Content-Type: application/x-www-form-urlencoded un=myusername&pwd=mypassword&dstno=601X-XXXXXXX&msg=Hello%20World &type=1&sendid=MyCompany&agreedterm=YES
PHP cURL Example
<?php $params = [ "un" => "myusername", "pwd" => "mypassword", "dstno" => "601X-XXXXXXX", // International format, no + "msg" => "Hello World! Your OTP is 123456.", "type" => "1", // 1 = ASCII, 2 = Unicode "sendid" => "MyCompany", // Max 11 chars, optional "agreedterm" => "YES" ]; $ch = curl_init("https://smtpapi.vocotext.com/isms_send_all_id.php"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); $result = curl_exec($ch); curl_close($ch); // Result format: "2000 = SUCCESS:1143007207" or "-1001" for errors echo $result; ?>
Multiple Recipients (Semicolon-Separated)
<?php // Separate multiple recipients with semicolons (max recommended: 30 per request) $params = [ "un" => "myusername", "pwd" => "mypassword", "dstno" => "601X-XXXXXXX;601X-XXXXXXX;601X-XXXXXXX", "msg" => "Your appointment reminder for tomorrow at 9am.", "type" => "1", "sendid" => "ClinicABC", "agreedterm" => "YES" ]; $ch = curl_init("https://smtpapi.vocotext.com/isms_send_all_id.php"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); $result = curl_exec($ch); curl_close($ch); echo $result; ?>
📦 Bulk SMS — JSON Format
For sending to multiple recipients in a single API call with individual message control, use the bulk JSON endpoint.
https://ww3.isms.com.my/isms_send_bulk_json.phpThe API returns an array of result codes — one per recipient in the same order as the request.
Sample Response
2000 code indicates successful submission to the telco. The number after SUCCESS: is the unique Transaction ID (TRX_ID) for delivery tracking.✅ API Response Codes
Every API request returns a response code. 2000 means the message was accepted and queued for delivery. All other codes indicate an error.
| Code | Description |
|---|---|
| 2000 | SUCCESS:{TRX_ID} — Message submitted and pushed to Telco SMSC. TRX_ID is the unique transaction identifier. Note: does not confirm delivery to handset. |
| -1000 | Unknown Error — an unspecified server-side error occurred |
| -1001 | Authentication Failed — invalid username or password |
| -1002 | Account Suspended / Expired — the account is inactive or has expired |
| -1003 | IP Not Allowed — the originating IP address is not whitelisted for this account |
| -1004 | Insufficient Credits — the account does not have enough SMS credits |
| -1005 | Invalid SMS Type — the type parameter is not 1 or 2 |
| -1006 | Invalid Body Length — message body exceeds the allowed character limit |
| -1007 | Invalid Hex Body — Unicode hex-encoded message body is malformed |
| -1008 | Missing Parameter — one or more required parameters are absent |
| -1009 | Invalid Destination Number — the dstno value is not a valid international format number |
| -1012 | Invalid Message Type — unrecognised method or message type field |
| -1013 | Invalid Term and Agreement — agreedterm is not set to YES |
📬 Delivery Status Callback (HTTP Push)
iSMS supports server-side delivery status notifications via HTTP Push. When a telco delivery update is received, the iSMS platform makes an HTTPS GET request to your callback URL with status parameters as query strings.
Malaysian telcos do not provide handset-level DLR by default. Handset delivery confirmation is available at extra cost per SMS charged by the telco. If you require confirmed Sent → Received → Read tracking at the handset level, we recommend using WhatsApp Business API (WABA) — which natively supports full message status callbacks including Sent, Delivered (received at handset), and Read.
Callback URL Format
Example Callback
Delivery Status Values
PHP Callback Handler Example
<?php // iSMS Delivery Status Callback Handler $msisdn = $_GET['msisdn'] ?? ''; // Destination number $trx_id = $_GET['trx_id'] ?? ''; // Transaction ID $dn_status = $_GET['dn_status'] ?? ''; // DELIVERED / UNDELIVERED / PENDING if ($trx_id && $dn_status) { // Log to database $query = "UPDATE sms_log SET status='%s', updated_at=NOW() WHERE trx_id='%s'"; // Execute $query with $dn_status and $trx_id ... // Handle delivery outcomes if ($dn_status === 'DELIVERED') { // Mark as delivered in your system } elseif ($dn_status === 'UNDELIVERED') { // Alert or retry logic } } // Return 200 OK to acknowledge receipt http_response_code(200); echo "OK"; ?>
Need SMS API Access or Integration Help?
Our developer team will whitelist your IP, provide test credentials, and guide you through your first integration.