Wapix Developer Documentation
Wapix provides high-reliability, low-latency REST endpoints to programmatically send WhatsApp OTP codes, 1-on-1 transactional alerts, and bulk broadcast campaigns. Pair your WhatsApp number once via QR code, generate an API key, and integrate directly with your backend in minutes.
5-Minute Quickstart Guide
Get up and running with Wapix in three straightforward steps:
Top Up Your Prepaid Balance
Register your account at /signup. Navigate to Add Credit and add wallet money (minimum ₹50) with instant Cashfree checkout (UPI, GPay, PhonePe, Cards).
Pair Your WhatsApp Number & Create API Key
Open Dashboard, click Start Session, and scan the QR code using WhatsApp > Linked Devices on your mobile phone. Once paired, switch to the API Keys tab to generate your secret key.
Make an API Call
Send a JSON POST request to /api/v1/send/otp or /api/v1/send/message with your API key and recipient number. The message arrives instantly on WhatsApp!
Authentication & API Keys
All public dispatch endpoints require your secret API key passed in the request body under the field api_key. Management actions performed through the browser use JWT authentication via the standard Authorization: Bearer <token> header.
Keys always begin with the WAPIX. prefix followed by a unique 24-character hexadecimal security hash.
vpn_keyHow to Generate Your Production API Key
Head to the dashboard and ensure your WhatsApp session is started & paired.
Go to the API Keys tab, enter a label (e.g. "Backend Server"), and click Generate.
Save it in server environment variables (WAPIX_API_KEY). Never expose client-side.
Send OTP API
Dispatches high-priority authentication codes directly to any valid WhatsApp number. The system concatenates your custom text prefix with the numeric OTP code. If delivery cannot be completed due to gateway downtime or invalid recipient, the ₹0.25 fee is automatically refunded to your wallet.
| Field | Type | Required | Description |
|---|---|---|---|
| service | string | Yes | Must be exactly "otp" |
| whatsaap_number | string | Yes | Phone number with country code without plus sign (e.g. 919876543210) |
| otp | string | number | Yes | Verification code (e.g. "492018") |
| text | string | Yes | Message prefix (e.g. "Your verification code is:") |
| api_key | string | Yes | Your secret Wapix API key |
curl -X POST https://api.wapix.sbs/api/v1/send/otp \
-H "Content-Type: application/json" \
-d '{
"service": "otp",
"whatsaap_number": "919876543210",
"otp": "492018",
"text": "Your verification code is:",
"api_key": "YOUR_WAPIX_API_KEY"
}'{
"success": true,
"message": "OTP message dispatched successfully",
"data": {
"chatId": "919876543210@c.us",
"id": "false_919876543210@c.us_3EB0...",
"timestamp": 1727914800
}
}Send Message API
Send 1-on-1 notifications, invoices, order updates, customer service replies, or rich messages to any WhatsApp user globally.
curl -X POST https://api.wapix.sbs/api/v1/send/message \
-H "Content-Type: application/json" \
-d '{
"service": "message",
"whatsaap_number": "919876543210",
"text": "Hello Arpit, your order #89201 has been dispatched!",
"api_key": "YOUR_WAPIX_API_KEY"
}'Send Bulk Campaign API
Dispatch promotional broadcasts or transactional blasts to up to 50 recipients per request. Includes built-in anti-spam protections.
Built-in delay between dispatches prevents WhatsApp spam flags and protects your connected number.
If any recipient numbers fail or are invalid, ₹0.50 per failed number is automatically credited back to your wallet.
curl -X POST https://api.wapix.sbs/api/v1/send/bulk/message \
-H "Content-Type: application/json" \
-d '{
"service": "bulk",
"whatsaap_number": [
"919876543210",
"919876543211",
"919876543212"
],
"text": "Exclusive flash sale! 30% off with coupon code WAPIX30: https://wapix.io",
"api_key": "YOUR_WAPIX_API_KEY"
}'{
"success": true,
"message": "Bulk campaign processed: 3 sent, 0 failed",
"data": {
"total_requested": 3,
"sent_count": 3,
"failed_count": 0,
"charged_amount": 1.50,
"refund_amount": 0.00,
"remaining_balance": 198.50
}
}Session Lifecycle & QR Pairing
Wapix maintains persistent WhatsApp Web client sessions on the gateway. Control session states seamlessly via the dashboard or through management endpoints:
1. Start Session
Spawns a headless browser session and generates a real-time QR code.
2. Link Device
Scan via WhatsApp > Linked Devices. The session transitions to READY.
3. Stop / Restart
Safely disconnect the session or restart when changing physical device numbers.
Webhooks & Real-time Inbound Events
Subscribe external HTTP URLs to capture instant event payloads whenever WhatsApp messages are delivered, read, received, or reacted to.
{
"event": "message",
"session": "sess_89f02a",
"data": {
"from": "919876543210@c.us",
"body": "CONFIRM 492018",
"type": "chat",
"timestamp": 1727914800,
"message_id": "true_919876543210@c.us_3EB0..."
}
}Prepaid Wallet & Cashfree Billing
Wapix operates with 100% pay-as-you-go transparency. No monthly commitments, contracts, or hidden platform fees. Top up using Cashfree checkout:
Error Codes & Handling
| Status | Reason | Resolution |
|---|---|---|
| 200 OK | Request dispatched successfully | Inspect data.id for reference |
| 400 Bad Request | Missing required payload fields or invalid phone format | Check country code prefix and required keys |
| 401 Unauthorized | Invalid or missing API key | Generate a new key from the dashboard |
| 402 Payment Required | Insufficient wallet balance | Top up via /add-credit |
| 503 Unavailable | WhatsApp session is offline or stopped | Start the session on dashboard and scan QR |