HostNeko SMS Developer Documentation
Complete API reference for sending single, bulk, OTP, and WHMCS SMS notifications.
Your Master API Key:
YOUR_MASTER_API_KEY
POST / GET
/smsapi.php
WHMCS & Telecom SMS API
POST (JSON)
/alopay.php
AloPay JSON SMS API
POST (JSON)
/shared_api.php
Shared OTP Device API
POST
/api.php
Android Gateway App Sync
GET / POST
http://sms.hostneko.com/smsapi.php
Standard HTTP API for WHMCS, WooCommerce, and custom web applications.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your Master API Key (Required) |
| number | string | Recipient phone number (e.g. 01613545993) |
| message | string | SMS Text message body |
| sim | integer | Optional SIM Slot (1 or 2). Default: 1 |
Sample Code Snippets
// cURL Command
curl -X POST "http://sms.hostneko.com/smsapi.php" \ -d "api_key=YOUR_MASTER_API_KEY" \ -d "number=01613545993" \ -d "message=Hello from HostNeko SMS Gateway!" \ -d "sim=1"
// PHP cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://sms.hostneko.com/smsapi.php',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'api_key' => 'YOUR_MASTER_API_KEY',
'number' => '01613545993',
'message' => 'Your OTP Code is 9821',
'sim' => 1
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response; // Returns 1101 on success
?>
POST (JSON)
http://sms.hostneko.com/alopay.php
AloPay compatible JSON API endpoint for custom web platforms.
Response Example
{
"status": "success",
"message": "SMS Submitted Successfully",
"code": 202,
"data": {
"number": "01613545993",
"sms_id": 1042
}
}
SMS API Response Status Codes
| Response Code | Meaning | Action |
|---|---|---|
| 1101 | SMS Successfully Queued | Message sent to Android Gateway device queue. |
| OFFLINE | No Online Device Available | Ensure Android app is running and connected to internet. |
| INVALID_KEY | Invalid Master API Key | Check Master API Key in API Keys page. |
| EXPIRED_OR_NO_ACTIVE_PLAN | Plan Inactive or Expired | Activate a plan from Deposit & Plans page. |