💬
WhatsApp Business API — Billing Overview
All WABA messages are charged per message by Meta, except for Service messages (user-initiated conversations) which are charged per 24-hour session — meaning unlimited messages within that window at one session fee.
Message categories: Marketing (per message) · Utility (per message) · Authentication/OTP (per message) · Service/Customer Service (per 24-hour session, user-initiated only). Pricing varies by destination country. Contact us for a quote.
💬 WhatsApp Business API

WABA API Developer Reference

Send template messages, custom messages, and files via WhatsApp channel through the iSMS platform. Viber and Messenger coming soon.

Version 2.0 Last Updated: March 5, 2026 Protocol: HTTPS POST / JSON
ℹ️This API is available to all registered iSMS customers with an active WABA account. Contact our team to get your AppId and AppSecret credentials.

📡 Base URLs

Three endpoint URLs are provided. We recommend using Resource URL 2 or 3 for optimal performance and reliability in production.

URL 1https://ww3.isms.com.my/isms_send_waba.php
URL 2https://smtpapi.vocotext.com/isms_send_waba.phpRecommended
URL 3https://smtpapi2.vocotext.com/isms_send_waba.phpRecommended
POST application/json
⚠️All request bodies must be valid JSON. Ensure your HTTP client sets the Content-Type: application/json header in every request.

📱 Supported Channels

whatsapp✓ Available
viber⏳ Under Development
messenger⏳ Under Development

💬 Message Types

The Send Message API supports three message types. Template messages (Marketing, Utility, Authentication/OTP) are charged per message and can be sent anytime. Custom/free-text messages and files are only available within an active 24-hour user-initiated window — this is the Service message category, charged per session (not per message).

template

Send pre-approved Meta message templates with dynamic variable substitution.

✓ Available anytime
message

Send custom free-text messages to users who have recently messaged your WABA number.

⏱ Within 24-hour window
file

Send images, PDFs, documents, and other files via a direct publicly accessible URL.

⏱ Within 24-hour window

📋 Request Parameters

Complete parameter reference for the Send Message API. Required parameters must be in every request. Conditional parameters depend on message type.

ParameterTypeRequiredDescriptionExample
AppIdStringRequiredApplication ID from iSMS console8671971xxx
AppSecretStringRequiredApplication secret from iSMS console0b34b7cc...
unStringRequiredYour iSMS account usernameiSMS
pwdStringRequiredYour iSMS account passwordiSMS123
agreedtermStringRequiredMust be set to "YES" — confirms acceptance of iSMS TermsYES
ChannelTypeStringRequiredMessage channel. Currently supported: whatsapp. Viber and Messenger coming soon.whatsapp
TypeStringRequiredMessage type: template, message, or filetemplate
FromStringRequiredSender phone number — must be registered WABA number604642xxxx
ToStringRequiredRecipient phone number in international format6018222xxxx
TemplateCodeStringConditionalTemplate code — required when Type = template744c4b5c...
LanguageStringConditionalTemplate language code — required when Type = templateen
TemplateParamsObjectConditionalTemplate variable values as JSON — when Type = template{"param1":"val"}
ContentStringConditionalMessage text body — required when Type = messageHello World
fileUrlStringConditionalDirect public URL to file — required when Type = filehttps://...
fileNameStringConditionalDisplay name for the file — required when Type = fileinvoice.pdf
⚠️The fileUrl must be a direct, publicly accessible URL. URLs behind Cloudflare or similar proxy services may not be accessible by the WABA delivery system.

📤 Send Template Message

Template messages (Marketing, Utility, Authentication/OTP) are pre-approved by WhatsApp and can be sent anytime — ideal for notifications, OTP, reminders, and transactional alerts. These are charged per message regardless of session status.

JSON Request Body

JSONRequest Body
{
  "AppId": "8671971xxxxxxx",
  "AppSecret": "0b34b7cc0cbxxxxxc",
  "un": "your_username",
  "pwd": "your_password",
  "agreedterm": "YES",
  "Type": "template",
  "TemplateCode": "90934259xxxxxx",
  "TemplateParams": {
    "param1": "your value here"
  },
  "Language": "en",
  "From": "604xxxxxxx",
  "To": "601X-XXXXXXX"
}

PHP Example

PHPsend_template.php
<?php
$url = "https://smtpapi.vocotext.com/isms_send_waba.php";

$data = [
    "AppId"       => "your_app_id",
    "AppSecret"   => "your_app_secret",
    "un"          => "your_username",
    "pwd"         => "your_password",
    "agreedterm"  => "YES",
    "Type"        => "template",
    "TemplateCode" => "your_template_code",
    "TemplateParams" => ["param1" => date("Y-m-d H:i:s")],
    "Language"    => "en",
    "From"        => "your_waba_number",
    "To"          => "recipient_number"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo "cURL error: " . curl_error($ch);
} else {
    $result = json_decode($response, true);
    echo "Status: " . $result['statusCode'];
    echo " | MessageId: " . $result['messageId'];
}

curl_close($ch);
?>

✉️ Send Custom Message

Send free-form text messages. Only available within the active 24-hour Service session — triggered when a user messages your WABA number first. This session type is charged per 24-hour window, not per individual message.

JSONRequest Body
{
  "AppId": "867197xxxx",
  "AppSecret": "0b34b7ccxxxx",
  "un": "your_username",
  "pwd": "your_password",
  "agreedterm": "YES",
  "Type": "message",
  "Content": "Hello! Your appointment is confirmed for tomorrow at 10am.",
  "From": "604xxxxxxx",
  "To": "601X-XXXXXXX"
}
PHPsend_message.php
<?php
$url = "https://smtpapi.vocotext.com/isms_send_waba.php";

$data = [
    "AppId"      => "your_app_id",
    "AppSecret"  => "your_app_secret",
    "un"         => "your_username",
    "pwd"        => "your_password",
    "agreedterm" => "YES",
    "Type"       => "message",
    "Content"    => "Hello! Your appointment is confirmed for tomorrow at 10am.",
    "From"       => "your_waba_number",
    "To"         => "recipient_number"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

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

📎 Send File

Send images, PDFs, and other documents via a direct public URL. The file must be accessible by our servers without authentication.

JSONRequest Body
{
  "AppId": "8671971xxxxx",
  "AppSecret": "0b34b7cc0cbxxxxx",
  "un": "your_username",
  "pwd": "your_password",
  "agreedterm": "YES",
  "Type": "file",
  "fileUrl": "https://www.isms.com.my/marketing.png",
  "fileName": "marketing_brochure",
  "From": "604xxxxxxx",
  "To": "601X-XXXXXXX"
}
PHPsend_file.php
<?php
$url = "https://smtpapi.vocotext.com/isms_send_waba.php";

$data = [
    "AppId"      => "your_app_id",
    "AppSecret"  => "your_app_secret",
    "un"         => "your_username",
    "pwd"        => "your_password",
    "agreedterm" => "YES",
    "Type"       => "file",
    "fileUrl"    => "https://www.isms.com.my/marketing.png",
    "fileName"   => "marketing_brochure",
    "From"       => "your_waba_number",
    "To"         => "recipient_number"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

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

✅ Response Format

Success Response

{ "requestId": "C9122953-C329-3D9A-9191-7EB5D70D54FC", "statusCode": "OK", "messageId": "202311882856605014114304" }
ParameterTypeDescription
requestIdStringUnique identifier for the API request — use for support enquiries
statusCodeStringOK or 0 = success. Any other value indicates failure. See Error Codes.
messageIdStringUnique identifier for the sent message — use for delivery status tracking

❌ Error Codes

General Errors

CodeDescription
0 / OKRequest successful
-1The system is busy — retry after a short delay
1000Unknown error
1001Authentication failed — check username and password
1002Account suspended or expired
1003IP address not allowed
1004Insufficient credits
1008Missing required parameter

WABA-Specific Errors

CodeDescription
50500Invalid destination phone number
70500Invalid WABA account
70501Invalid WABA API key
70502Insufficient WABA credits

Application & Session Errors

CodeDescription
40001Invalid AppSecret or AccessToken
40008Invalid message type
41000Required parameter not specified
42001Access token expired
45001API call limit exceeded
45010Reply time limit exceeded (outside 24h window)
47001JSON parsing error — check request body format
48001Not authorized to call this API

Template Errors

CodeDescription
60005templateCode parameter not specified
60006Template code does not exist
60012Invalid parameter format
70001Scenario sending policy not configured

📥 Inbound Messages (Webhook)

Receive incoming WhatsApp messages from users via a webhook URL. Contact iSMS support to configure your inbound message callback URL. All parameters are base64 encoded.

ℹ️Contact [email protected] to register your webhook URL for inbound messages.
MessageId

Unique identifier for the inbound message

From

Sender's phone number in international format

To

Your WABA receiver phone number

Timestamp

Unix timestamp in milliseconds

DisplayName

Display name of the sender

Name

End user's WhatsApp name

Type

Media type: TEXT, LOCATION, DOCUMENT, VIDEO, AUDIO, REPLY, IMAGE, CONTACTS

Message

Message content (format depends on Type)

📬 Delivery Status (Webhook)

Receive real-time delivery status updates via webhook. WhatsApp Business API provides true handset-level delivery tracking — unlike SMS which only confirms Telco SMSC receipt, WABA reports actual message status at the recipient's device.

MessageId

Unique identifier for the sent message

From

Sender phone number (your WABA number)

To

Recipient phone number

Status

Message status: Sent (submitted to WhatsApp), Delivered (confirmed received at recipient's handset), or Read (recipient opened the message). Unlike SMS DLR, WhatsApp delivery status reflects true handset-level confirmation.

ErrorDescription

Error description if message failed to deliver

📄 Template List API

Endpointhttps://smtpapi.vocotext.com/api_waba_list_template.php
POST or GET application/json

Fetch all WhatsApp message templates associated with your account — including type, name, approval status, language, and components. The component field is base64 encoded.

ParameterTypeRequiredDescription
unStringRequiredYour iSMS account username
pwdStringRequiredYour iSMS account password

Success Response

{ "status": "success", "data": [ { "templateType": "PROMOTIONAL", "name": "New Year Offer", "auditStatus": "approved", "language": "en", "templateCode": "1XXXXXXXXX90", "last_updated_on": "2024-07-21T14:55:30Z", "component": "eyJ0eXBlIjogIkJPRFki...", "status_code": "200", "status_message": "Approved" } ] }
ℹ️The component field is base64 encoded. Use a base64 decoder (or PHP's base64_decode()) to read template component data.

PHP Example (POST)

PHPlist_templates.php
<?php
$url  = "https://smtpapi.vocotext.com/api_waba_list_template.php";
$data = json_encode(["un" => "your_username", "pwd" => "your_password"]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$response = curl_exec($ch);
$templates = json_decode($response, true);

if ($templates['status'] === 'success') {
    foreach ($templates['data'] as $tpl) {
        echo $tpl['name'] . " — " . $tpl['auditStatus'] . "\n";
    }
}
curl_close($ch);
?>

💰 Balance API

Endpointhttps://smtpapi.vocotext.com/api_waba_balance.php
POST or GET application/json

Check your WABA account credit balance. Each WABA account may have multiple phone numbers — the balance for each registered number is returned separately.

Success Response

{ "status": "success", "data": [ { "waba_number": "601X-XXXXXXX", "waba_status": "1", "waba_credit_balance": "100.00", "waba_credit_currency": "MYR", "expiry_date": "2026-12-31" } ] }
PHPcheck_balance.php
<?php
$url  = "https://smtpapi.vocotext.com/api_waba_balance.php";
$data = json_encode(["un" => "your_username", "pwd" => "your_password"]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$response = curl_exec($ch);
$result   = json_decode($response, true);

if ($result['status'] === 'success') {
    foreach ($result['data'] as $acct) {
        echo $acct['waba_number'] . ": MYR " . $acct['waba_credit_balance'];
    }
}
curl_close($ch);
?>

Need API Access or Integration Help?

Contact our developer support team — we'll get your AppId, AppSecret, and WABA number configured.

💬 Contact Developer Support →

📧 [email protected]  ·  📞 +603-2780 3880

📱 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