U

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

ParameterTypeDescription
api_keystringYour Master API Key (Required)
numberstringRecipient phone number (e.g. 01613545993)
messagestringSMS Text message body
simintegerOptional 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 CodeMeaningAction
1101SMS Successfully QueuedMessage sent to Android Gateway device queue.
OFFLINENo Online Device AvailableEnsure Android app is running and connected to internet.
INVALID_KEYInvalid Master API KeyCheck Master API Key in API Keys page.
EXPIRED_OR_NO_ACTIVE_PLANPlan Inactive or ExpiredActivate a plan from Deposit & Plans page.