What is WAPI?
WAPI is a powerful framework for building WhatsApp bots with TypeScript/JavaScript. Built on top of Baileys, WAPI provides a clean, intuitive API that makes bot development fast and enjoyable.Fast Development
Get your bot running in minutes with an intuitive API and minimal boilerplate
Type-Safe
Built 100% in TypeScript with full type definitions for a better developer experience
Production Ready
Multiple authentication strategies including Local, Redis, and MongoDB
Feature Rich
Middleware system, command handling, context API, and rich message utilities
Key Features
Middleware System
WAPI includes a powerful middleware system similar to Express.js, allowing you to intercept and process messages before they reach command handlers:Command Handling
Define commands with a simple, declarative API. Commands support custom prefixes (/ and ! by default) and provide full access to message context:
Rich Context API
Every message comes with a rich context object providing:- Message details: Text content, media, quoted messages
- Sender information: Name, phone number, JID
- Chat information: Group or private chat details
- Utility methods:
reply(),replyWithImage(),replyWithVideo(), and more - Parsed data: Links, mentions, command arguments
Multiple Authentication Strategies
WAPI supports flexible authentication backends to suit your infrastructure:Flexible Login Methods
Choose between QR code or OTP (One-Time Password) authentication:Why Choose WAPI?
WAPI abstracts away the complexity of WhatsApp’s protocol while giving you full control over your bot’s behavior.
- Developer Experience First: Clean API, full TypeScript support, comprehensive error handling
- Battle Tested: Built on Baileys, the most reliable WhatsApp Web API library
- Scalable: Support for Redis and MongoDB means you can scale horizontally
- Active Development: Regular updates and compatibility with the latest WhatsApp features
Quick Example
Here’s a complete bot in just a few lines:What’s Next?
Installation
Install WAPI and set up your development environment
Quick Start
Build your first WhatsApp bot in under 5 minutes