A WhatsApp Web-style inbox built with Next.js for the WhatsApp Cloud API. Send messages, templates, and interactive buttons with a familiar UI.
- Real-time messaging - Auto-polling keeps conversations updated
- Template messages - Full support for WhatsApp templates with parameters (header, body, buttons)
- Interactive messages - Send button messages with up to 3 custom actions
- Media support - Send images, videos, documents, and audio
- 24-hour window enforcement - Automatically restricts messaging outside WhatsApp's window
- Failed message indicators - Visual feedback for delivery failures
- WhatsApp-style UI - Familiar interface with read receipts, timestamps, and message bubbles
- Create account at app.kapso.ai
- Connect a WhatsApp number
- Get your credentials:
PHONE_NUMBER_IDKAPSO_API_KEYWABA_ID
git clone https://github.com/gokapso/whatsapp-cloud-inbox.git
cd whatsapp-cloud-inbox
npm installCreate .env:
PHONE_NUMBER_ID=your_phone_number_id
KAPSO_API_KEY=your_kapso_api_key
WABA_ID=your_business_account_idnpm run devSend WhatsApp-approved templates with dynamic parameters:
- Header + Body + Button parameters - Full template support
- Named and positional parameters - Automatic detection
- Two-step flow - Select template → Fill parameters → Send
Create button messages without templates:
- Header (optional) + Body (required) + Buttons (1-3)
- Each button gets a unique ID and title (max 20 chars)
- Ideal for quick replies, confirmations, menu selections
Automatically enforces WhatsApp's messaging policy:
- Within 24h - Send regular messages freely
- Outside 24h - Template-only mode with clear messaging
- No inbound messages - Guide users to send templates
- ✅ Text messages
- ✅ Images, videos, audio, documents
- ✅ Template messages (with all parameter types)
- ✅ Interactive button messages
- ✅ Failed message indicators
Issues and PRs welcome. Keep it simple.
MIT