Unique-Notify Developer Documentation
Unique-Notify is an enterprise-grade multi-gateway communication engine providing automated OTP delivery, transactional notifications, and marketing broadcasts via WhatsApp. The platform offers a unified REST API across both official Meta Cloud API and Baileys Multi-Device QR Socket gateways.
Zero account ban risk. Powered by Meta Graph API v21.0. Ideal for high-volume verified OTPs, template messages, and official business transactions.
Multi-Device persistent socket engine. Allows instant connectivity with existing phone numbers without Meta verification fees. Protected by our smart Anti-Ban engine.
Authentication
All API requests to Unique-Notify must include an active API Key. You can pass your key via either the x-api-key HTTP header or the standard Authorization: Bearer header.
// Recommended Header Formats
x-api-key: un_live_8f3a9b2c1d4e5f6a7b8c9d0e1f2a3b4c
Authorization: Bearer un_live_8f3a9b2c1d4e5f6a7b8c9d0e1f2a3b4c
Quick Start (cURL)
Send your first automated message in seconds with this minimal cURL request:
curl -X POST "http://localhost:3000/api/v1/messages/send-text" \
-H "Content-Type: application/json" \
-H "x-api-key: un_live_8f3a9b2c1d4e5f6a7b8c9d0e1f2a3b4c" \
-d '{
"phone": "8801700000000",
"message": "Hello! Your hosting invoice #10492 has been generated.",
"gateway": "meta"
}'
Response (200 OK):
{
"success": true,
"message": "Message sent successfully",
"gateway": "meta",
"logId": 482,
"metaMessageId": "wamid.HBgM..."
}
One-Time Password (OTP) API
Unique-Notify features an automated OTP generator with lifecycle tracking, custom expiration windows, and instant verification endpoints.
Generates a secure numeric OTP, sends it via WhatsApp, and stores the state.
{
"phone": "8801700000000",
"serviceName": "Star Hosting Login",
"length": 6,
"expiryMinutes": 5,
"gateway": "meta"
}
Validates the code entered by the user against database records.
{
"phone": "8801700000000",
"otp": "492015"
}
{ "success": true, "message": "OTP verified successfully", "phone": "8801700000000" }
Send Text & Media Messages
Send rich text notifications, invoices, PDF receipts, or promotional images with captions.
Sends an image or PDF document with an optional text caption.
{
"phone": "8801700000000",
"mediaUrl": "https://example.com/invoices/inv-1042.pdf",
"caption": "Your monthly web hosting invoice is attached.",
"mediaType": "document",
"fileName": "invoice-1042.pdf",
"gateway": "meta"
}
SMS Gateway & Android Dual-SIM Routing
Send SMS using your own physical Android smartphone (with Dual-SIM SIM 1 / SIM 2 selection) or via 3rd-party aggregators (Greenweb BD, BulkSMSBD, Custom HTTP Webhook).
Dispatches an SMS to a single recipient through the specified channel or SIM slot.
{
"recipient": "8801700000000",
"message": "Your verification code is 591024. Do not share this OTP with anyone.",
"gateway_type": "android_sim", // 'android_sim', 'greenweb', 'bulksmsbd', 'custom_http'
"sim_slot": 1 // 1 for SIM Slot 1, 2 for SIM Slot 2
}
// Response
{
"success": true,
"message": "SMS queued for Android SIM gateway dispatch",
"data": {
"job_id": "4",
"status": "queued",
"recipient": "8801700000000",
"gateway": "android_sim",
"sim_slot": 1
}
}
How to Connect Your Android Phone:
- Build and install the APK located in
/android-gatewayonto your Android device. - In Unique-Notify Web Dashboard, click SMS Gateway > Pair Android Device to get your 6-character code.
- In the phone app, enter your Server URL and 6-character code, then tap Pair & Connect Device.
- Enable the SMS Dispatch Worker switch. Your phone is now an online cellular SMS server.
WHMCS Hook Integration Guide
Unique-Notify includes a ready-to-use, zero-dependency WHMCS hook file located in integrations/whmcs/hooks/unique_notify.php.
Copy the Hook File
Copy integrations/whmcs/hooks/unique_notify.php to your WHMCS directory: /includes/hooks/unique_notify.php.
Configure Credentials
Open unique_notify.php and set your Unique-Notify endpoint URL and API Key:
define('UNIQUE_NOTIFY_API_URL', 'http://your-server:3000/api/v1');
define('UNIQUE_NOTIFY_API_KEY', 'un_live_8f3a9b2c1d4e5f6a7b8c9d0e1f2a3b4c');
define('UNIQUE_NOTIFY_GATEWAY', 'meta'); // or 'qr'
Supported WHMCS Automatic Events
- InvoiceCreated: Instant WhatsApp message with invoice number, due date, and payment URL.
- InvoicePaymentReminder: First, second, and overdue reminder dispatches.
- InvoicePaid: Payment confirmation receipt acknowledging invoice clearance.
- TicketOpen & TicketAdminReply: Instant notification when support staff responds.
- AfterModuleCreate: Service activation notice (cPanel/VPS ready notification).
Standalone PHP SDK
For custom PHP web applications, Laravel, or CodeIgniter, use our lightweight SDK from integrations/php-sdk/UniqueNotify.php:
require_once __DIR__ . '/integrations/php-sdk/UniqueNotify.php';
use UniqueNotify\UniqueNotify;
$client = new UniqueNotify([
'api_url' => 'http://localhost:3000/api/v1',
'api_key' => 'un_live_8f3a9b2c1d4e5f6a7b8c9d0e1f2a3b4c',
'gateway' => 'meta'
]);
// 1. Send OTP
$otpResponse = $client->sendOtp('8801700000000', 'Star Hosting Portal');
// 2. Verify OTP
$verifyResponse = $client->verifyOtp('8801700000000', '123456');
// 3. Send Text Notification
$client->sendText('8801700000000', 'Your order #5523 has been dispatched.');
// 4. Send Document / Invoice
$client->sendMedia('8801700000000', 'https://example.com/inv.pdf', 'Monthly Invoice', 'document');
Anti-Ban Engine & Spintax Guide
When sending through the QR gateway, Unique-Notify automatically implements multiple defensive behaviors to prevent WhatsApp spam flags.
Spintax Engine
Every message variation is dynamically computed so recipients receive distinct text phrasing.
Random Jitter Delay
Configurable 5 to 15 second intervals between messages to replicate natural human typing habits.
Typing Simulation
Dispatches WhatsApp presence "composing..." events before committing outbound payloads.
Spintax Example:
{Hello|Dear|Greetings} {name}, your bill of {amount} is {due|ready}.
Outcome 1: "Hello Alice, your bill of $50 is due."
Outcome 2: "Dear Bob, your bill of $75 is ready."
Outcome 3: "Greetings Charlie, your bill of $30 is due."
Interactive API Console
Test live API dispatches directly in your browser without leaving this documentation portal.
// API Response: