Why We Built WAPI: Overcoming High Messaging Costs
For small business owners, indie builders, and startups, setting up official WhatsApp Business API solutions often means wading through complex Facebook Business verification, high setup barriers, and expensive per-conversation billing rates that punish growing apps.
We created WAPI to give developers a straightforward, high-throughput REST API that connects directly to your own WhatsApp number via standard multi-device pairing. Within two minutes of pairing via QR code or numeric pairing code, you can trigger order confirmations, OTP verifications, and customer alerts with zero markup per message.
Built with intelligent anti-detection delays, automatic socket reconnection, and webhook callbacks, WAPI makes WhatsApp automation accessible to anyone with a few lines of code.
How WAPI Operates Under the Hood
Pair Your WhatsApp Device
Link your WhatsApp account in the dashboard using an instant 8-digit numeric pairing code or QR scan. Your device session is securely serialized in memory.
Obtain Your Secret Bearer Key
Generate an API key with configurable permissions and rate limits from your developer console.
Dispatch REST API Calls
Make a POST request to /api/send-message with the destination phone number and payload (text, PDF invoice, image, or poll).
Receive Real-Time Webhook Receipts
Configure a webhook URL to receive instant HTTP callbacks when messages are delivered, read, or when a customer replies.
Core Technical Capabilities
Multi-Device Session Stability
Employs Baileys v7 multi-device sockets with automated session keep-alive and self-healing reconnection protocols.
Rich Media & Document Invoices
Transmit dynamic PDF invoices, receipt images, audio voice notes, and stickers directly from external URLs or Base64 payloads.
Instant Two-Way Webhooks
Receive real-time JSON payloads for incoming customer replies to build automated support bots and chat reconciliation.
Anti-Spam Rate Control
Built-in pacing controls and dynamic jitter delays simulate human interaction to protect your connected phone numbers.
Technical Specifications & Latency Parameters
| Core Protocol | Baileys Multi-Device REST Gateway |
| Dispatch Latency | < 85ms median processing time |
| Supported Media | PDF, JPG, PNG, MP4, MP3, OGG, WebP |
| Pairing Mechanism | 8-Digit Numeric Code or Instant QR Scan |
| Webhook Retries | Exponential backoff up to 5 attempts |
Production Code Snippets
curl -X POST https://wapi.lushai.dev/api/send-message \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "919876543210",
"type": "text",
"message": "Your Lushai Dev verification code is: 489201. Valid for 5 minutes."
}'import axios from 'axios';
async function sendWhatsAppAlert(recipient: string, message: string) {
const response = await axios.post(
'https://wapi.lushai.dev/api/send-message',
{ number: recipient, type: 'text', message },
{ headers: { Authorization: `Bearer ${process.env.WAPI_KEY}` } }
);
return response.data;
}<?php
$payload = json_encode([
'number' => '919876543210',
'type' => 'text',
'message' => 'Hello! Your order has been dispatched with tracking code: LSH-8849.'
]);
$ch = curl_init('https://wapi.lushai.dev/api/send-message');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WAPI_KEY'),
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => $payload
]);
$result = curl_exec($ch);
curl_close($ch);Production Implementation Insights
Always Include Country Codes
Provide full international phone numbers without leading zeros or plus signs (for example, 91 for India followed by the 10-digit mobile number: 919876543210).
Respect Anti-Spam Delays
Space bulk transactional notifications by at least 1 to 2 seconds to keep your WhatsApp account in high reputational standing.
Frequently Asked Questions & Integration Details
Do I need an official Meta Business Verification to use WAPI?
No. WAPI uses the standard multi-device protocol. You connect your own WhatsApp number via an 8-digit numeric pairing code or QR scan, bypassing complex enterprise paperwork.
Are there hidden per-conversation or per-message charges?
No. Unlike traditional enterprise providers that charge per 24-hour conversation window, WAPI offers transparent subscription tiers with generous monthly message quotas.
What happens if my server experiences network hiccups?
WAPI maintains an active session buffer and automatically reconnects in the background so your webhook callbacks and queued dispatches remain intact.
Can I send PDF invoices and payment receipts with WAPI?
Yes! Set the message type to "media" and supply a publicly accessible HTTPS link to your PDF, receipt image, or invoice document.
