-1003.🚀 Overview
Up to 50 recipients — each with its own personalised message — in a single request, with structured per-recipient results.
Form-encoded GET/POST with one shared message per call. Plain-text response.
Retrieve the remaining SMS credit balance for a prepaid account.
🔗 API Endpoint URLs
https://www.isms.com.my/isms_send_json.phpRecommendedhttps://ww3.isms.com.my/isms_send_json.phphttps://smtpapi.vocotext.com/isms_send_json.phphttps://smtpapi2.vocotext.com/isms_send_json.phphttps://www.isms.com.my/isms_balance_json.phphttps://www.isms.com.my/isms_send_all_id.phpRecommendedhttps://smtpapi2.vocotext.com/isms_send_all_id.phphttps://smtpapi.vocotext.com/isms_send_all_id.phphttps://ww3.isms.com.my/isms_send_all_id.phpPOST with Content-Type: application/json. The classic API accepts both GET and POST (form-encoded) with identical parameters.🔤 SMS Encoding Types
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.
✉️ Send SMS
POST a single JSON body. Each entry in messages is delivered with its own text, in the same order in the response.
Request Parameters (top level)
| Parameter | Type | Required | Description |
|---|---|---|---|
| un | String | Required | Your iSMS account username |
| pwd | String | Required | Your iSMS account password |
| type | String | Required | Encoding: 1 = ASCII (English/BM) · 2 = Unicode (Chinese/Arabic) |
| messages | Array | Required | Array of message objects (see below). Minimum 1, maximum 50 destination numbers total per request |
| agreedterm | String | Conditional | Set to YES to accept the iSMS Terms & Conditions, until the account has accepted the API terms. Otherwise rejected with -1013 |
| sendid | String | Optional | Sender ID shown to recipient. Max 11 alphanumeric characters, no spaces or special characters |
| fid | String | Optional | Feature ID for rate selection. Defaults to 5 when omitted |
| sendlater | String | Optional | Schedule for later delivery (date/time string). Leave empty to send immediately |
| imgurl | String | Optional | Image URL — WhatsApp gateway accounts only |
The messages Array
Each element carries its own destination and message body — enabling fully personalised content per recipient.
| Field | Type | Description |
|---|---|---|
| dstno | String | Destination number in international format, no + prefix (e.g. 6016xxxxxxx). Multiple numbers sharing one message may be separated by ; or , — every number counts toward the 50-number limit |
| msg | String | The SMS text body for this recipient |
-1010. For larger campaigns, split the list across multiple calls.Sample Request
POST /isms_send_json.php HTTP/1.1
Host: www.isms.com.myContent-Type: application/json
{
"un": "myusername",
"pwd": "mypassword",
"type": "1",
"sendid": "MyCompany",
"agreedterm": "YES",
"messages": [
{ "dstno": "6016xxxxxxx", "msg": "Hi Ali, your order #123 is ready for pickup" },
{ "dstno": "6019xxxxxxx", "msg": "Hi Siti, your appointment is confirmed at 3pm" },
{ "dstno": "6017xxxxxxx", "msg": "Hi Kumar, payment of RM150 received. Thank you" }
]
}PHP cURL Example
<?php $payload = [ "un" => "myusername", "pwd" => "mypassword", "type" => "1", // 1 = ASCII, 2 = Unicode "sendid" => "MyCompany", // Max 11 chars, optional "agreedterm" => "YES", "messages" => [ ["dstno" => "6016xxxxxxx", "msg" => "Hi Ali, your order #123 is ready"], ["dstno" => "6019xxxxxxx", "msg" => "Hi Siti, your appointment is at 3pm"] ] ]; $ch = curl_init("https://www.isms.com.my/isms_send_json.php"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload)); $result = curl_exec($ch); curl_close($ch); $response = json_decode($result, true); echo $response["message"]; // e.g. "2000 = SUCCESS" foreach ($response["results"] as $r) { // per-recipient outcome echo $r["dstno"] . " => " . $r["status"]; } ?>
Response Format
| Field | Type | Description |
|---|---|---|
| status | String | success — all sent · partial — some failed · error — rejected / nothing sent |
| code | Integer | Overall code — 2000 on success/partial, negative error code otherwise |
| message | String | Human-readable summary of the outcome |
| total_messages | Integer | Number of message entries processed |
| total_success | Integer | Entries accepted and pushed to the telco |
| total_failed | Integer | Entries that failed validation or sending |
| total_credits_used | Integer | Total SMS credits deducted for this request |
| results | Array | Per-recipient results — each item has dstno, code, status, and sms_id (the TRX_ID on success) |
-1004 and nothing is sent.Sample Responses
{
"status": "success",
"code": 2000,
"message": "2000 = SUCCESS",
"total_messages": 2,
"total_success": 2,
"total_failed": 0,
"total_credits_used": 2,
"results": [
{ "dstno": "6016xxxxxxx", "code": 2000, "status": "2000 = SUCCESS:1143007207|", "sms_id": "1143007207" },
{ "dstno": "6019xxxxxxx", "code": 2000, "status": "2000 = SUCCESS:1143007209|", "sms_id": "1143007209" }
]
}{
"status": "partial",
"code": 2000,
"message": "2000 = PARTIAL SUCCESS (1 SENT, 1 FAILED)",
"total_messages": 2,
"total_success": 1,
"total_failed": 1,
"total_credits_used": 1,
"results": [
{ "dstno": "6016xxxxxxx", "code": 2000, "status": "2000 = SUCCESS:1143007207|", "sms_id": "1143007207" },
{ "dstno": "016xxx", "code": -1008, "status": "-1008 = MISSING PARAMETER" }
]
}{
"status": "error",
"code": -1004,
"message": "-1004 = INSUFFICIENT CREDITS"
}Form-encoded parameters over GET or POST. One shared message per call; use ; to add recipients.
Request Parameters
| 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
GET /isms_send_all_id.php HTTP/1.1 Host: www.isms.com.my ?un=myusername &pwd=mypassword &dstno=601X-XXXXXXX &msg=Hello%20World &type=1 &sendid=MyCompany &agreedterm=YES
HTTP POST Request (PHP cURL)
POST is recommended for production — it avoids URL length limits and is more secure than GET.
<?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://www.isms.com.my/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 — all receive the same message $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://www.isms.com.my/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; ?>
msg for each dstno in one call.🏷️ Personalisation Tokens
"Hi %name%, your appointment is confirmed." becomes "Hi Ali, your appointment is confirmed."💰 Check Balance
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| un | String | Required | Your iSMS account username |
| pwd | String | Required | Your iSMS account password |
Sample Request
POST /isms_balance_json.php HTTP/1.1
Host: www.isms.com.myContent-Type: application/json
{
"un": "myusername",
"pwd": "mypassword"
}Sample Responses
{
"status": "success",
"code": 0,
"username": "myusername",
"balance": "1500"
}{
"status": "error",
"code": -1001,
"message": "-1001 = AUTHENTICATION FAILED"
}INVALID ACCOUNT TYPE response.✅ API Response Codes
2000 means the message was accepted and queued for delivery. All other codes indicate an error.type parameter is not 1 or 2agreedterm is not set to YES📬 Delivery Status Callback
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"; ?>
🔄 Migrating from the Classic API
| Aspect | Classic API | JSON API |
|---|---|---|
| Method | GET or POST (form-encoded) | POST only (application/json) |
| Recipients per call | Multiple numbers, one shared message | Up to 50 numbers, each with its own message |
| Personalised content | Tokens only (%name%, …) | Per-recipient message body + tokens |
| Response format | Plain text | Structured JSON with per-recipient results |
| URL encoding | Required for msg | Not required (JSON handles encoding) |
| Endpoint | isms_send_all_id.php | isms_send_json.php |
isms_send_json.php and switch to a JSON body. Existing credentials, sender IDs, and whitelisted IPs continue to work.Need SMS API Access or Integration Help?
Our developer team will whitelist your IP, provide test credentials, and guide you through your first integration.