Send SMS from your own app, website or backend with a plain REST API. One endpoint covers Malaysia, Singapore, Hong Kong, South Korea and Japan; you pay per segment from a prepaid balance, with no monthly fee and no contract.
It is one REST endpoint for all five countries. Add country to the request (MY, SG, HK, KR or JP); leave it out and the message goes to Malaysia. Each request can carry up to 10,000 numbers, and send_at schedules it anywhere from 2 minutes to 30 days ahead.
We built it around the problems we kept seeing in SMS integrations. A request that times out can be repeated safely with the same Idempotency-Key, so nobody gets the message twice and you are not charged twice. Every number has its own status instead of a single "sent" total. Status changes can be pushed to your server by webhook, and money always comes back as whole cents, never as a floating-point ringgit amount.
The API itself is free. You pay per segment from a prepaid balance, at the same price as the web console.
curl https://hantarsms.com/api/v1/messages \
-H "X-API-Key: $HANTARSMS_KEY" \
-H "Content-Type: application/json" \
-d '{
"country": "HK",
"to": ["91234567"],
"text": "Your order has shipped."
}'
A successful send returns 201 Created with the message id, the segment count and the cost in cents.
import os, requests
r = requests.post(
"https://hantarsms.com/api/v1/messages",
headers={"X-API-Key": os.environ["HANTARSMS_KEY"],
"Idempotency-Key": f"order-{order_id}"},
json={"country": "SG", "to": ["91234567"],
"text": f"Your order #{order_id} has shipped."},
timeout=30,
)
print(r.status_code, r.json())
// Node 18+
const res = await fetch('https://hantarsms.com/api/v1/messages', {
method: 'POST',
headers: {
'X-API-Key': process.env.HANTARSMS_KEY,
'Content-Type': 'application/json',
'Idempotency-Key': `order-${orderId}`,
},
body: JSON.stringify({ country: 'JP', to: ['09012345678'], text: 'Your order has shipped.' }),
});
console.log(res.status, await res.json());
$ch = curl_init('https://hantarsms.com/api/v1/messages');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: ' . getenv('HANTARSMS_KEY'),
'Content-Type: application/json',
'Idempotency-Key: order-' . $orderId,
],
CURLOPT_POSTFIELDS => json_encode([
'to' => ['60123456789'], 'text' => 'Your order has shipped.',
]),
]);
$res = json_decode(curl_exec($ch), true);
Java, error handling and every field are in the full API documentation. Using WordPress? The free HantarSMS plugin needs no code.
| Method and path | What it does |
|---|---|
POST /api/v1/messages | Send or schedule a message to up to 10,000 numbers |
GET /api/v1/messages/{id} | Status and delivery counters of one send |
GET /api/v1/messages/{id}/recipients | Per-number delivery status |
GET /api/v1/messages | List your sends |
GET /api/v1/countries | Countries, prices, sending hours and sender IDs for your account |
GET /api/v1/balance | Current balance in cents |
| Country | country | Number example | Price per segment |
|---|---|---|---|
| Malaysia | MY (default) | 0123456789 | from RM0.20 |
| Singapore | SG | 91234567 | RM0.45 |
| Hong Kong | HK | 91234567 | RM0.38 |
| South Korea | KR | 01012345678 | RM0.085 |
| Japan | JP | 09012345678 | RM0.365 |
About 0.05, 0.112, 0.095, 0.021 and 0.091 USDT respectively at 1 USDT = RM4.01. Numbers can also be sent with the country code. Hong Kong lets you pick a sender from a list; Singapore sends 10:00–19:00 (UTC+8) and holds later requests until the next morning. Details on international SMS.
send_at.Set an HTTPS URL under API keys and we POST message.updated and message.completed events. Each request carries an X-HantarSMS-Signature header like t=1731315879,v1=…: compute HMAC-SHA256 of t + "." + raw body with your signing secret, compare it to v1 and reject anything older than 5 minutes. Reply 2xx within 8 seconds; failures are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours with the same event id.
| HTTP | Code | What to do |
|---|---|---|
| 400 | invalid_parameter, missing_parameter | Fix the request; nothing was sent |
| 401 | invalid_api_key, revoked_api_key | Check the key |
| 402 | insufficient_balance | Top up, then retry with the same Idempotency-Key |
| 409 | idempotency_key_in_progress | Retry in a few seconds |
| 422 | no_valid_recipients, content_blocked, unsupported_country | Fix numbers, text or country |
| 429 | rate_limit_exceeded | Wait for Retry-After, or batch more numbers per request |
We do not connect a route on the supplier's word. We put local SIM cards from the destination country into our own phones, send test traffic through the route and count the messages that actually show up on those phones. The supplier's delivery report is not part of that count.
In Malaysia we have sent well over 10,000 test messages this way. Singapore, Hong Kong, South Korea and Japan each received at least 1,000 before they opened in November 2026. A route goes live only if 90% or more of the test messages arrive. Some cheaper routes missed that mark and we turned them down, which is the main reason a few of our prices sit a little above the lowest quotes you will find.
If a route marks messages as delivered when they never arrived, or a large part of a send goes missing for a reason other than the carrier filtering your content, we refund the whole send. Send us the order ID and we will check it on our test phones and with the supplier.
We have done this before. A WhatsApp supplier we used to work with was reporting messages as delivered when they were not. By the time we caught it, one customer had spent about 1,300 USDT on those sends. We dropped the supplier that day and paid the customer back in full.
We decide by the message, not by the industry. Before your first large send, tell us what you plan to send, where the numbers came from and how people can opt out. If the content is legal and the people on your list agreed to hear from you, we take it, including many industries that other providers refuse outright.
| Usually accepted after a quick check | Never accepted |
|---|---|
| Lending and instalments | Scams or anything meant to mislead |
| Forex and investment | Impersonating banks, government or other companies |
| Crypto | Bought, scraped or unknown lists |
| Supplements and beauty | Marketing with no way to opt out |
| Debt collection, property, e-commerce, education |
The same rule applies in all five countries, and most of our routes accept messages with links. Every send is logged with the number, content and time, and we answer requests from law enforcement.
segments × recipients × rate when the request succeeds.refunded_cent shows how much.No. Anyone can sign up with an email address or a Google account and create an API key. Top up with USDT (TRC20) or a Visa/Mastercard card.
The same as sending from the web console: Malaysia from RM0.20 per segment (lower with volume), Singapore RM0.45, Hong Kong RM0.38, South Korea RM0.085, Japan RM0.365. There is no fee for the API itself.
There is no separate sandbox. Send a real message to your own phone from a new account; it costs one segment at the normal price.
Up to 10,000 numbers per request, all for one country. Duplicates are removed and charged once, and invalid numbers are dropped and never charged.
Send an Idempotency-Key header. Retrying the same request with the same key returns the original response and never sends or charges again. Keys are kept for 24 hours.
Poll GET /api/v1/messages/{id} or /recipients for per-number results, or set a webhook URL and we POST message.updated and message.completed events to you.
60 send requests per minute per key by default, 300 per minute for reads. OTP traffic that cannot be batched can have its limit raised.
Yes. A request with three numbers or fewer and no schedule skips the batch queue and goes to the carrier straight away.
Any that can send an HTTPS request with JSON. The documentation has PHP, Python, Node.js and Java examples, and WordPress sites can use the free plugin.
GET /api/v1/balance returns the balance in cents, your current rate and how many single-segment Malaysian SMS it covers.
No. One request sends to one country; make one request per country.
Written by the HantarSMS team in Malaysia. Prices and facts checked on 13 November 2026.