A professional, multi-session WhatsApp Gateway, Dashboard, and Automation System.
Built with Next.js 15 and Baileys for high-performance messaging automation.
[!TIP] Looking for the latest features? Check out the beta branch or our pre-releases for experimental sources.
Features • User Guide • API Documentation • Database Setup • Installation
- Master Project Documentation: Architecture, database, and logic flow.
- API Documentation: Comprehensive guide for all 86 endpoints.
- Environment Variables: Configuration and security guide.
WA-AKG transforms your WhatsApp into a fully programmable RESTful API. It's designed for scale, reliability, and ease of use, making it the perfect bridge between your business logic and WhatsApp's global reach.
graph LR
User([User / App]) -->|REST API| API[WA-AKG Gateway]
API -->|Baileys| WhatsApp[[WhatsApp Server]]
API -->|Real-time| DB[(Prisma / DB)]
WhatsApp -.->|Webhook| API
API -.->|Event| Webhook([External CRM / API])
- 📱 Multi-Session Management: Connect and manage unlimited accounts via QR code.
- ⚡ Pro WhatsApp Engine: Powered by Baileys for high-speed, stable connections.
- 📅 Advanced Scheduler: Precise message planning with Media Support (Images, Video, Docs).
- 📢 Safe Broadcast: Built-in anti-ban mechanisms with randomized delays (10-30s).
- 🤖 Smart Auto-Reply: Keywords matching with Context Support (Group/Private/All) and Media Attachments.
- 🛡️ Granular Access Control: Full Whitelist & Blacklist support for both Bot Commands and Auto Replies.
- 🔗 Enterprise Webhooks: Robust event forwarding for messages, connections, and group updates.
- 📇 Advanced Contacts: Rich contact management with LID, verified names, and profile pictures.
- 🎨 Creative Tools: Built-in Sticker Maker with background removal (remove.bg integration).
📂 View Webhook Payload Example
{
"event": "message.received",
"sessionId": "xgj7d9",
"timestamp": "2026-01-17T05:33:08.545Z",
"data": {
"key": { "remoteJid": "6287748687946@s.whatsapp.net", "fromMe": false, "id": "3EB0B78..." },
"from": "6287748687946@s.whatsapp.net",
"sender": "100429287395370@lid",
"remoteJidAlt": "100429287395370@lid",
"type": "TEXT",
"content": "saya sedang reply",
"isGroup": false,
"quoted": {
"type": "IMAGE",
"caption": "Ini caption dari reply",
"fileUrl": "/media/xgj7d9-A54FD0B6F..."
}
}
}- Node.js 20+
- PostgreSQL or MySQL
- Git
# Clone and install
git clone https://github.com/mrifqidaffaaditya/WA-AKG.git
cd WA-AKG
npm install
# Configure environment
cp .env.example .env
# Edit .env with your DATABASE_URL and AUTH_SECRET
# Push schema and create admin
npm run db:push
npm run make-admin admin@example.com password123# Development
npm run dev
# Production
npm run build && npm startWA-AKG provides a comprehensive REST API. Full details in API_DOCUMENTATION.md.
Tip
Use the built-in Swagger UI for interactive exploration at /docs.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/messages/{sessionId}/{jid}/send |
Send text, media, or stickers |
POST |
/api/messages/{sessionId}/broadcast |
Scalable bulk messaging |
PATCH |
/api/sessions/{id}/settings |
Update session configuration |
GET |
/api/groups/{sessionId} |
List all available groups |
POST |
/api/webhooks/{sessionId} |
Register real-time event listeners |
POST |
/api/autoreplies/{sessionId} |
Create context-aware auto-replies |
PUT |
/api/sessions/{id}/bot-config |
Configure Access Control (Blacklist/Whitelist) |
curl -X POST http://localhost:3000/api/messages/session_01/62812345678@s.whatsapp.net/send \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"message": { "text": "Hello from WA-AKG!" }
}'Warning
Status Update Feature (POST /api/status/update)
The WhatsApp status/story update feature is currently experiencing known issues and should be avoided in production:
- Text statuses with custom background colors may not display correctly
- Media statuses (images/videos) may fail to upload to WhatsApp servers
- The feature is under active development
We recommend waiting for the next release before using this endpoint in critical workflows.
- API Key Auth: Secured endpoints using
X-API-Key. - RBAC: Multi-role support (
SUPERADMIN,OWNER,STAFF). - Encrypted Storage: Sensitive credentials are secure.