📱 iSMS SMS Gateway API

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.

Version 2.0 Protocol: HTTPS GET & POST Base URL: smtpapi.vocotext.com Format: Plain Text / JSON
⚠️IP Whitelist Required — All API requests must originate from a whitelisted server IP address. Contact [email protected] to whitelist your IP before making API calls. Non-whitelisted IPs will be rejected with error code -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.

1 — Primaryhttps://smtpapi.vocotext.com/isms_send_all_id.phpRecommended
2 — Secondaryhttps://smtpapi2.vocotext.com/isms_send_all_id.phpRecommended
3 — Tertiaryhttps://www.isms.com.my/isms_send_all_id.php
4 — Fallbackhttps://ww3.isms.com.my/isms_send_all_id.php
ℹ️Both HTTP GET and POST methods are supported and accept identical parameters. POST is recommended for production — URLs have character length limits that may affect long messages.

🔤 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.

type = 1 — ASCII 153 chars

English, Bahasa Melayu, and other Latin-script languages. Maximum 153 characters per SMS credit. Messages longer than 153 characters are split into multiple parts.

type = 2 — Unicode 63 chars

Chinese, Japanese, Arabic, Korean, and other non-ASCII scripts. Maximum 63 characters per SMS credit. Unicode encoding allows full international character support.

⚠️Messages exceeding the per-part character limit are automatically split and billed as multiple SMS credits. A counter in the iSMS portal shows how many credits your message will consume.

📋 Request Parameters

All parameters apply to both GET and POST methods. URL-encode all values when using GET.

ParameterTypeRequiredDescriptionExample
unStringRequiredYour iSMS account usernamemyusername
pwdStringRequiredYour iSMS account passwordmypassword
dstnoStringRequiredDestination phone number in international format — no + prefix601X-XXXXXXX
msgStringRequiredSMS message text — URL-encoded for GET requestsHello%20World
typeIntegerRequiredEncoding: 1 = ASCII (English/BM) · 2 = Unicode (Chinese/Arabic)1
agreedtermStringRequiredMust be YES — confirms acceptance of iSMS Terms & Conditions. Requests without this will be filtered.YES
sendidStringOptionalSender 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.

HTTPGET Request
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

URLComplete 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.

HTTPPOST Request
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

PHPsend_sms.php
<?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)

PHPsend_multi.php
<?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.

Endpointhttps://ww3.isms.com.my/isms_send_bulk_json.php

The API returns an array of result codes — one per recipient in the same order as the request.

Sample Response

[ "2000 = SUCCESS:1143007207", "2000 = SUCCESS:1143007209", "2000 = SUCCESS:1143007205" ]
ℹ️Each element corresponds to the matching recipient in the request. A 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.

CodeDescription
2000SUCCESS:{TRX_ID} — Message submitted and pushed to Telco SMSC. TRX_ID is the unique transaction identifier. Note: does not confirm delivery to handset.
-1000Unknown Error — an unspecified server-side error occurred
-1001Authentication Failed — invalid username or password
-1002Account Suspended / Expired — the account is inactive or has expired
-1003IP Not Allowed — the originating IP address is not whitelisted for this account
-1004Insufficient Credits — the account does not have enough SMS credits
-1005Invalid SMS Type — the type parameter is not 1 or 2
-1006Invalid Body Length — message body exceeds the allowed character limit
-1007Invalid Hex Body — Unicode hex-encoded message body is malformed
-1008Missing Parameter — one or more required parameters are absent
-1009Invalid Destination Number — the dstno value is not a valid international format number
-1012Invalid Message Type — unrecognised method or message type field
-1013Invalid 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.

⚠️
Important — SMS Delivery Status Scope (Malaysia): All SMS delivery statuses (DELIVERED, ACCEPTED, SENT) reflect acknowledgement by the Telco SMSC (Short Message Service Centre) only — not delivery to the recipient's handset.

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.
ℹ️Configure your delivery callback URL in your iSMS account settings, or contact support to activate this feature.

Callback URL Format

https://{your-callbackurl}?msisdn={dstno}&trx_id={trx_id}&dn_status={status}

Example Callback

https://myapp.example.com/sms/status?msisdn=601X-XXXXXXX&trx_id=1143007207&dn_status=DELIVERED

Delivery Status Values

DELIVEREDAcknowledged by Telco SMSC. Does not confirm delivery to recipient's handset. Malaysia telcos do not provide handset DLR by default.
UNDELIVEREDDelivery failed — number invalid or unreachable
PENDINGSubmitted to iSMS platform — awaiting Telco SMSC acknowledgement.
ACCEPTED / SENTAccepted by Telco SMSC. Same scope as DELIVERED — confirms SMSC receipt only, not handset delivery.

PHP Callback Handler Example

PHPsms_callback.php
<?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.

📱 SMS Coverage — All Countries Worldwide

A B C D E F G H I J K L M N O P Q R S T U V Y Z