rmyndharis/OpenWAPublic

Free, Open Source, Self-Hosted WhatsApp API Gateway

AI summary: A free, self-hosted API gateway for automating WhatsApp interactions.

Stars
12.5K
+57 today
Forks
2.8K
Watchers
62
Open issues
9
Open PRs
1
Contributors
~51
Commits
978
Branches
1

TypeScriptMITCreated Feb 2, 2026Last push 1d agoLatest release v0.11.1+305 stars this week+305 this month

Star history

since Feb 1, 2026
05K10KFeb 2026Apr 2026Jun 2026Aug 2026
12.5K stars as of Aug 6, 2026, tracked back to Feb 1, 2026. Historical curve reconstructed from public GitHub event archives, calibrated to the current total.

Contribution activity

commits per day, last 52 weeks
AugSepOctNovDecJanFebMarAprMayJunJulMonWedFri2025-08-02: 0 commits2025-08-03: 0 commits2025-08-04: 0 commits2025-08-05: 0 commits2025-08-06: 0 commits2025-08-07: 0 commits2025-08-08: 0 commits2025-08-09: 0 commits2025-08-10: 0 commits2025-08-11: 0 commits2025-08-12: 0 commits2025-08-13: 0 commits2025-08-14: 0 commits2025-08-15: 0 commits2025-08-16: 0 commits2025-08-17: 0 commits2025-08-18: 0 commits2025-08-19: 0 commits2025-08-20: 0 commits2025-08-21: 0 commits2025-08-22: 0 commits2025-08-23: 0 commits2025-08-24: 0 commits2025-08-25: 0 commits2025-08-26: 0 commits2025-08-27: 0 commits2025-08-28: 0 commits2025-08-29: 0 commits2025-08-30: 0 commits2025-08-31: 0 commits2025-09-01: 0 commits2025-09-02: 0 commits2025-09-03: 0 commits2025-09-04: 0 commits2025-09-05: 0 commits2025-09-06: 0 commits2025-09-07: 0 commits2025-09-08: 0 commits2025-09-09: 0 commits2025-09-10: 0 commits2025-09-11: 0 commits2025-09-12: 0 commits2025-09-13: 0 commits2025-09-14: 0 commits2025-09-15: 0 commits2025-09-16: 0 commits2025-09-17: 0 commits2025-09-18: 0 commits2025-09-19: 0 commits2025-09-20: 0 commits2025-09-21: 0 commits2025-09-22: 0 commits2025-09-23: 0 commits2025-09-24: 0 commits2025-09-25: 0 commits2025-09-26: 0 commits2025-09-27: 0 commits2025-09-28: 0 commits2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 0 commits2025-10-02: 0 commits2025-10-03: 0 commits2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 1 commit2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 1 commit2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 7 commits2026-02-18: 31 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 3 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 5 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 1 commit2026-03-02: 1 commit2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 4 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 3 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 1 commit2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 6 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 11 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 28 commits2026-06-14: 3 commits2026-06-15: 12 commits2026-06-16: 9 commits2026-06-17: 66 commits2026-06-18: 42 commits2026-06-19: 23 commits2026-06-20: 16 commits2026-06-21: 26 commits2026-06-22: 22 commits2026-06-23: 22 commits2026-06-24: 23 commits2026-06-25: 15 commits2026-06-26: 10 commits2026-06-27: 3 commits2026-06-28: 28 commits2026-06-29: 40 commits2026-06-30: 19 commits2026-07-01: 13 commits2026-07-02: 27 commits2026-07-03: 17 commits2026-07-04: 0 commits2026-07-05: 7 commits2026-07-06: 15 commits2026-07-07: 4 commits2026-07-08: 8 commits2026-07-09: 10 commits2026-07-10: 6 commits2026-07-11: 10 commits2026-07-12: 24 commits2026-07-13: 3 commits2026-07-14: 1 commit2026-07-15: 10 commits2026-07-16: 0 commits2026-07-17: 26 commits2026-07-18: 10 commits2026-07-19: 17 commits2026-07-20: 20 commits2026-07-21: 10 commits2026-07-22: 10 commits2026-07-23: 44 commits2026-07-24: 35 commits2026-07-25: 2 commits2026-07-26: 2 commits2026-07-27: 64 commits2026-07-28: 12 commits2026-07-29: 16 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits
905 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    12,466 stars

  • Very active

    905 commits in 52 weeks

  • Well documented

    High community health score

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

  • Repeat trending

    3 trending appearances

What OpenWA does

OpenWA is an open-source alternative to official WhatsApp business APIs, designed for developers who need to automate WhatsApp without expensive platform fees. It acts as a self-hosted gateway, wrapping the WhatsApp Web protocol into a clean, easy-to-use REST API. This allows developers to programmatically send messages, read incoming chats, manage groups, and build complex chatbots using standard HTTP requests. It completely removes the need to interact directly with complex WebSockets or browser automation.

Developers and small businesses looking for a cost-effective, programmable way to integrate WhatsApp messaging into their applications.

  • REST API interface: Converts complex WhatsApp web protocols into standard HTTP endpoints.
  • Self-hosted control: Runs entirely on your own server, keeping chat data completely private.
  • No official API fees: Bypasses the costs associated with the official Meta WhatsApp API.
  • Group management: Provides endpoints to programmatically manage WhatsApp groups.
  • Media support: Allows sending and receiving images, videos, and documents via API.

Where teams use it

Building customer support bots

Integrating OpenWA into a custom CRM to automatically reply to customer inquiries on WhatsApp.

Automated notifications

Sending server outage alerts directly to a DevOps team's WhatsApp group.

Marketing broadcasts

Sending personalized promotional messages to a list of opted-in customers.

Getting started: Run via Docker or install dependencies with npm and start the server.

README

main branch

OpenWA Logo

OpenWA

Open Source WhatsApp API Gateway

FeaturesQuick StartDocsAPIContributing

CI Version License Node NestJS Docker TypeScript


✨ Why OpenWA?

OpenWA is a free, open-source WhatsApp API Gateway designed for developers who need full control over their messaging infrastructure—without vendor lock-in or hidden paywalls.

Built on a pluggable architecture, OpenWA lets you select database engines (SQLite/PostgreSQL), backup/migration storage backends (Local/S3), and cache layers (disabled/Redis) through configuration rather than application-code changes. Message media itself is returned inline to API and webhook consumers; it is not automatically persisted to the storage backend.

🔓 100% Open Source No licensing fees, no feature locks, full source code access
🏗️ Pluggable Architecture Swap adapters for database, storage, and cache via config
🖥️ Full Dashboard Modern React UI for session, webhook, and API key management
🔹 Multi-Session Ready Run multiple WhatsApp sessions concurrently on one instance
🐳 Docker Native Production-ready with zero configuration
🧩 Official Plugins Chatwoot, Typebot & more as sandboxed plugins on the Integration Fabric — OpenWA-plugins
🔗 n8n Integration Community nodes for workflow automation
🧩 Community Adapters Third-party integrations (e.g. ioBroker) — see docs

⚠️ Before you connect a number — please read

OpenWA is an unofficial, community-maintained gateway. It connects to WhatsApp through reverse-engineered clients (the whatsapp-web.js project and @whiskeysockets/baileys), not through Meta's official Cloud API. This has real consequences you should understand before you link a phone number.

What this means in practice

  • There is always a non-zero risk of account restriction or ban. WhatsApp's anti-abuse systems actively look for unofficial automation. No amount of code quality on our side can make that risk zero.

  • Pick the right number. Never connect your primary personal or business number to an automated gateway. Use a dedicated number you can afford to lose. If you're running this for paying clients, pass that guidance on to them.

  • The two engines trade off differently:

    Engine Ban-risk profile Resource cost
    whatsapp-web.js Lower — drives a real headless Chromium that looks like genuine WhatsApp Web traffic. High RAM (~300–500 MB / session).
    baileys Higher — speaks the multi-device WebSocket protocol directly and is easier for WhatsApp to fingerprint. Low RAM (~30–80 MB / session).

    If account safety is your top priority and you can afford the memory, prefer whatsapp-web.js. If you need density and accept the trade-off, use baileys.

Safe-sending guidelines

These are practical guardrails, not guarantees — but they materially reduce the chance of WhatsApp flagging the account:

  1. Warm up fresh numbers. For the first several days, behave like a normal human user: scan the QR, exchange a handful of messages with saved contacts, join a group or two, set a profile photo. Don't blast on day one.
  2. Don't cold-blast strangers. Sending the first-ever message to a large batch of numbers that have never messaged you is the single most reliable way to get restricted — on either engine.
  3. Rate-limit yourself. OpenWA ships with a configurable rate limiter (RATE_LIMIT_* env vars). Use it. A few messages per minute per session is sustainable; "thousands in an hour" is not.
  4. Use opted-in recipients. The safest workloads are replies and alerts to people who already expect to hear from you (OTP to your own users, order updates, support replies).
  5. Keep a fallback. For anything auth-critical or revenue-critical, keep an SMS / email / official-Cloud-API path. Do not bet a login flow solely on an unofficial client.
  6. Mind the hosting IP. Cheap datacenter IPs are flagged more aggressively than residential ones. A residential proxy (supported per-session via the proxy settings) can help; it is not a license to spam.

Known platform behaviour (not bugs)

A few things that look like bugs but are actually server-side WhatsApp policy, not OpenWA defects — we track them separately so we can distinguish them from real bugs:

  • First message to a brand-new contact sometimes never arrives. The API returns success because the message leaves OpenWA, but WhatsApp's server-side reach-out / trust policy drops it at delivery. This is independent of OpenWA. We track it in #830.
  • Accounts that get restricted cannot be "unrestricted" by us. If WhatsApp disables a number, you need to appeal through their channels — OpenWA has no lever to pull.

Compliance

For any deployment where ethical, legal, or regulatory compliance matters (healthcare, finance, large-scale commercial messaging, anything touching end users in the EU/EEA under DMA/GDPR framings), treat OpenWA as not approved and use Meta's official WhatsApp Cloud API. OpenWA is an excellent fit for personal projects, internal tooling, automation hobbyists, and learning — it is not a drop-in replacement for the official API in regulated environments.

📖 For the deeper, maintainer-side risk analysis (protocol-change exposure, dependency strategy, security posture), see Risk Management (docs/16).


🎯 Features

Core Features

Feature Status Description
REST API Full WhatsApp API via HTTP endpoints
Multi-Session Manage multiple WhatsApp accounts
Webhooks Real-time events with HMAC signature and optional smart pre-dispatch filters
Web Dashboard Visual management interface
API Key Auth Secure API authentication
Swagger Docs Interactive API documentation

Messaging

Feature Status Description
Text Messages Send/receive text messages
Media Messages Images, videos, documents, audio
Message Reactions React to messages with emoji
Message Editing Send edits + live message.edited events on both engines
Bulk Messaging Send to multiple recipients
Message Status Track delivery and read receipts

Advanced

Feature Status Description
Groups API Create, manage, join (invite code), and configure groups
Profile Management Set own display name, about text, and profile picture
Call Handling call.received events, reject calls, per-session auto-reject
Channels/Newsletter WhatsApp Channels support
Labels Management Organize chats with labels
Proxy Support Per-session proxy configuration
Rate Limiting Configurable request limits
CIDR Whitelisting IP-based access control
Audit Logging Audit trail for API-key, session, integration-instance, and infra admin operations (message sends and webhook deliveries are tracked in their own tables, not the audit log)

Infrastructure

Feature Status Description
SQLite Zero-config embedded database
PostgreSQL Production-grade database
Redis Cache Optional performance caching
S3/MinIO Storage Media-directory backup/migration backend
Docker One-command deployment
Health Checks Kubernetes-ready probes
Data Migration Export/import between backends

🚀 Quick Start

Option A: Docker (Recommended)

# Clone and start
git clone https://github.com/rmyndharis/OpenWA.git
cd OpenWA
docker compose -f docker-compose.dev.yml up -d

# Access (the dashboard is bundled into the API image and served on the same port)
# Dashboard: http://localhost:2785
# API: http://localhost:2785/api
# Swagger: http://localhost:2785/api/docs

Using Podman instead of Docker? Podman rootless mode requires the socket to be running and DOCKER_HOST to be set:

systemctl --user start podman.socket
systemctl --user enable podman.socket
export DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock

Add the export line to your ~/.bashrc to make it permanent.

Option B: Local Development

# Clone repository
git clone https://github.com/rmyndharis/OpenWA.git
cd OpenWA

# Install the locked dependencies (includes dashboard)
npm ci

# Start API + Dashboard (config is auto-generated on first run)
npm run dev

# Access (in dev the dashboard runs on the Vite server with hot reload)
# Dashboard: http://localhost:2886
# API: http://localhost:2785/api
# Swagger: http://localhost:2785/api/docs

Use npm install instead when intentionally changing dependencies. OpenWA's committed lockfile uses registry artifacts only, so npm 12 works with its secure default that blocks Git dependencies; do not disable that policy globally.


🔒 Security Architecture

Docker Socket Proxy

The production stack never exposes /var/run/docker.sock directly to the application container. Instead, a dedicated docker-proxy sidecar (based on tecnativa/docker-socket-proxy) acts as the sole gateway to the Docker daemon:

openwa-api  ──TCP 2375──▶  docker-proxy  ──unix──▶  /var/run/docker.sock

Only the operations needed for container orchestration are enabled (CONTAINERS, IMAGES, VOLUMES, INFO, PING, plus the POST method switch). The application connects via the DOCKER_HOST=tcp://docker-proxy:2375 environment variable, which DockerService detects automatically. Note this is an operational gateway, not a fine-grained privilege boundary: with POST enabled the proxy admits every method to the enabled paths and cannot scope container-create payloads, so a compromised API container would be host-root-equivalent — see SECURITY.md for the full threat model, mitigations, and how to disable the proxy if you don't use the built-in datastore orchestration.

Non-root Container Execution

The production image never runs the Node.js process as root. On startup, the container follows this chain:

dumb-init (PID 1)
  └─ docker-entrypoint.sh (root — fixes named-volume ownership via chown)
       └─ gosu openwa node dist/main  (drops to the openwa user)
  • dumb-init is PID 1 and forwards signals (SIGTERM, etc.) for graceful shutdown.
  • docker-entrypoint.sh runs as root only long enough to chown the named-volume mount points so the openwa user can write to them.
  • gosu performs a clean exec-based privilege drop — no su or sudo wrappers, so the node process is the direct child of dumb-init.

Named volumes (e.g. openwa-data) get their ownership corrected automatically on every start, so no manual chown step is needed after volume creation.


🏭 Production Deployment

For production, use the main docker-compose.yml with optional services:

# Basic production (SQLite, local storage)
docker compose up -d

# With PostgreSQL database
docker compose --profile postgres up -d

# Full stack (PostgreSQL, Redis, MinIO)
docker compose --profile full up -d
Profile Services
postgres PostgreSQL database
redis Redis cache
minio S3-compatible storage
full All services above

The dashboard is bundled into the API image and served by NestJS on the API port, so it needs no profile — it is always available wherever openwa-api runs. For TLS/public exposure, put your own reverse proxy (nginx, Caddy, a cloud load balancer, or a k8s Ingress) in front; see the nginx example in docs/12-troubleshooting-faq.md.

Development vs Production

  • Development (docker-compose.dev.yml): SQLite, local storage, API serves the bundled dashboard
  • Production (docker-compose.yml): Configurable database, profiles for optional services

Official GHCR images are published as multi-arch manifests for:

  • linux/amd64
  • linux/arm64

🔌 Ports

Service Port Description
API & Dashboard 2785 REST API + bundled web dashboard (same port)
Swagger 2785/api/docs Interactive API docs
Dashboard (dev) 2886 Vite dev server with hot reload (npm run dev)

📡 API Examples

Create a Session

curl -X POST http://localhost:2785/api/sessions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"name": "my-bot"}'

Start Session & Get QR Code

# Start the session
curl -X POST http://localhost:2785/api/sessions/{sessionId}/start \
  -H "X-API-Key: YOUR_API_KEY"

# Get QR code (scan with WhatsApp)
curl http://localhost:2785/api/sessions/{sessionId}/qr \
  -H "X-API-Key: YOUR_API_KEY"

Send a Message

curl -X POST http://localhost:2785/api/sessions/{sessionId}/messages/send-text \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "chatId": "628123456789@c.us",
    "text": "Hello from OpenWA!"
  }'

Setup Webhook

curl -X POST http://localhost:2785/api/sessions/{sessionId}/webhooks \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "url": "https://your-server.com/webhook",
    "events": ["message.received", "session.status"],
    "secret": "your-hmac-secret"
  }'

Smart filters (optional): add a filters object to fire the webhook only when conditions match (AND), e.g. { "conditions": [{ "field": "sender", "operator": "is", "value": ["1234567890@c.us"] }] }. Fields: sender / recipient / body / type / mentions / fromMe / hasMedia / isGroup. A webhook with no filters behaves exactly as before. See the API specification for the full schema.

🤖 MCP Server (AI Agents)

OpenWA can expose a curated set of tools over the Model Context Protocol so AI agents (Claude, Cursor, …) can drive WhatsApp. It is off by default and additive — every REST route keeps working unchanged.

Set MCP_ENABLED=true to mount a stateless Streamable-HTTP transport at POST /mcp on the existing server (same port, no extra process). It exposes ~39 curated tools (sessions, messaging, contacts, basic group ops, webhook reads) — a focused surface rather than the full API, so agents aren't overwhelmed and destructive operations stay off the agent path.

MCP_ENABLED=true npm run start:prod   # or set MCP_ENABLED in your .env / compose

Point an MCP client at it (e.g. for Claude Code, a .mcp.json at your project root):

{
  "mcpServers": {
    "openwa": {
      "type": "http",
      "url": "http://localhost:2785/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

The key can be passed as Authorization: Bearer … or X-API-Key: …. Every tool call goes through the same API-key auth, role, and per-session scoping as REST.

Security guidance:

  • Mint a dedicated, least-privilege key for the agent — a non-admin, session-scoped key (OPERATOR role at most). The plaintext key is shown only once on creation; to rotate, create a new key and delete the old one.
  • The key must not carry an IP allow-list (allowedIps) — there is no genuine client IP over MCP, so such a key is rejected.
  • Set MCP_READONLY=true to mount only the read tools (no sends/writes).
  • Set MCP_RATE_LIMIT_MAX (default 60) to limit tool calls per API key per window.
  • Set MCP_RATE_LIMIT_WINDOW_MS (default 60000) to control the sliding window size in milliseconds.
  • Do not expose /mcp to the public internet without a fronting auth proxy. For a self-hosted, locally-reached deployment the static API key is appropriate; public exposure should use OAuth 2.1 (not yet built).

🛠 Tech Stack

Layer Technology
Runtime Node.js 22 LTS
Framework NestJS 11.x
Language TypeScript 6.x
WA Engine whatsapp-web.js (default) / baileys — set ENGINE_TYPE
Database SQLite / PostgreSQL
Cache Redis (optional)
Storage Local / S3 / MinIO
ORM TypeORM
Container Docker + Docker Compose

📁 Project Structure

openwa/
├── src/
│   ├── main.ts                 # Application entry point
│   ├── app.module.ts           # Root module
│   ├── config/                 # Configuration
│   ├── common/                 # Shared utilities
│   │   ├── cache/              # Redis caching
│   │   └── storage/            # File storage (Local/S3)
│   ├── core/                   # Core systems
│   │   ├── hooks/              # Plugin hooks
│   │   └── plugins/            # Plugin system
│   ├── engine/                 # WhatsApp engine abstraction
│   └── modules/
│       ├── session/            # Session management
│       ├── message/            # Message handling
│       ├── webhook/            # Webhook management
│       ├── group/              # Groups API
│       ├── contact/            # Contacts API
│       ├── auth/               # API key authentication
│       ├── infra/              # Infrastructure management
│       └── health/             # Health checks
├── dashboard/                  # React web dashboard
├── docs/                      # Documentation
├── docker-compose.yml
├── Dockerfile
└── package.json

📚 Documentation

Comprehensive documentation is available in the docs/ folder:

Document Description
Project Overview Introduction and goals
Requirements Feature specifications
Architecture System design
Security Security implementation
Database Data models and migrations
API Spec Complete API reference
Development Coding standards
Migration Guide Database & storage migration

🤝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please read our Development Guidelines for coding standards and best practices.


📄 License

This project is licensed under the MIT License – free for personal and commercial use.

See LICENSE for details.


OpenWA – Free, Open Source WhatsApp API Gateway

📖 Documentation · 🔌 API Docs · 🐛 Report Bug · 💡 Request Feature


Made with ❤️ by Yudhi Armyndharis and the OpenWA Community

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

87 total
  1. v0.11.1v0.11.1Jul 28, 2026

    ### Added - **The Baileys engine now honors the per-session egress proxy** (#859). `proxyUrl` — http, https, socks4 or socks5, credentialed form included — is applied through a Node-layer agent on both the WhatsApp WebSocket and media up/downloads (`https-proxy-agent` / `socks-proxy-agent`, now direct dependencies). Previously the engine warned `baileys_proxy_unsupported` and connected direct, silently exposing the host's real egress IP for exactly the deployments that configured a proxy. An unusable proxy value now fails the session start instead of falling back to a direct connection. Credentials authenticate on the socket itself, so the Chromium first-CONNECT 407 limitation that can bite the wwjs engine's proxy-auth path does not apply to this engine. - **The OpenAPI spec now declares a templated default server.** `servers` was empty; it now carries `http://{host}:{port}` with `localhost`/`2785` defaults, so Swagger UI's "Try it" works out of the box and stays usable on real deployments via the host/port variables, and static consumers of the published `openapi.json` get a concrete base URL to display. ### Fixed - **The published OpenAPI spec no longer a

  2. v0.11.0v0.11.0Jul 27, 2026

    ### Added - **All five SDKs gain poll sending, batch profile pictures, and status media downloads, and their webhook filter types now match the server's polymorphic contract.** New `sendPoll`, `profilePictures` (batch lookup returning `{id: url|null}`), and status `media` (binary bytes + content type) methods in the JavaScript, Python, Go, PHP, and Java SDKs — the binary path is a new `byte[]` end-to-end transport in Java. The webhook filter `value` is now `string | string[] | boolean` with `caseSensitive` support in the typed SDKs (Go already matched), `mentions` is accepted on send-text everywhere, and Java/Go non-JSON 2xx responses behave like the other three SDKs (raw text / verbatim bytes instead of leaking parser errors). (#947) ### Fixed - **S3 storage no longer silently stays on the local fallback after a boot-time miss, the Baileys engine no longer reports READY while its socket is in reconnect backoff, and the dashboard no longer serves cached state across logout.** Four correctness fixes: if S3 was unreachable at boot, `StorageService` fell back to local and never re-probed, so after S3 recovered writes kept landing in `./data/media` while reads

  3. v0.10.10v0.10.10Jul 24, 2026

    ### Added - **Text statuses keep their posted look.** The background color and font of a text status are now captured on ingest (from the Baileys engine, which carries them on the wire) and rendered in the dashboard viewer — colored bubble with white text and an approximated font family — instead of every text story looking identical. The fields already existed on the API and SDK `StatusRecord` shapes; whatsapp-web.js does not expose styling, so statuses from that engine render as before. - **New statuses now appear in the dashboard in real time.** A freshly ingested contact status is broadcast over the websocket as `status.received` (same payload as the webhook), and the Status tab refreshes immediately instead of waiting for a focus refetch — including while a contact's viewer is already open. ### Changed - **Status font selection now follows the real WhatsApp font enum.** `POST /sessions/:id/status/send-text` accepts the font indices that actually exist on the wire — 0 (default), 1, 2, 6 (system bold), 7, 8, 9, 10 — instead of a 0–5 range that included non-existent indices 3–5 and rejected the valid 6–10. The dashboard viewer renders the full enum (bol

  4. v0.10.9v0.10.9Jul 24, 2026

    ### Added - **Statuses (stories) are now readable on both engines and retained for 24 hours.** Contact status updates land in a dedicated 24-hour store as they arrive — so a status posted while the dashboard was closed is still there — and `GET /sessions/:id/status` now serves them on the Baileys engine too (previously whatsapp-web.js only). A new `GET /sessions/:id/status/:statusId/media` streams a stored status image or video. - **New opt-in `status.received` webhook.** Subscribe a webhook to `status.received` to be notified when a contact posts a status; the payload carries the contact, type, caption, and media flags (no media blob — fetch it from the media endpoint). Off by default, though a webhook subscribed to `*` (all events) receives it automatically. - **The dashboard Status tab is now functional.** It lists contacts with active statuses, opens a read-only viewer for a contact's updates (image and video), and can post a text or image status, with a recipient picker on the Baileys engine. - **Group chats now show who sent each message.** In a group conversation the dashboard labels each incoming message with the sender's name — coloured per partici

  5. v0.10.8v0.10.8Jul 23, 2026

    ### Added - **Release images are now also published to Docker Hub.** Every release image is dual-published, bit-identical, to `docker.io/rmyndharis/openwa` alongside `ghcr.io/rmyndharis/openwa` — the same `X.Y.Z` / `X.Y` / `latest` tags, with provenance and SBOM attestations, and both registries are verified publicly pullable before the release completes. - **German (`de`) dashboard translation.** The dashboard now ships a full German locale and offers "Deutsch" in the language switcher. All translation keys are covered, so German users get a fully localized UI instead of the English fallback. Thanks @rjsebening. - **Audit-log coverage for sensitive infrastructure operations.** The admin-only infrastructure endpoints that save configuration, restart the server, and export/import the full database or stored media now record an audit-log entry — attributing the operation to the calling API key and client IP, with non-sensitive context only (section names, row counts; secret values are never logged). Previously these operations, several of which expose or replace credential-bearing data, left no audit trail. The audit-vocabulary coverage gate is extended to the

Code frequency

additions and deletions
+65.3K-65.3KWeek of 2026-02-01: +65,337 linesWeek of 2026-02-01: -0 linesWeek of 2026-02-08: +3 linesWeek of 2026-02-08: -0 linesWeek of 2026-02-15: +4,138 linesWeek of 2026-02-15: -2,136 linesWeek of 2026-02-22: +2,325 linesWeek of 2026-02-22: -2,086 linesWeek of 2026-03-01: +6 linesWeek of 2026-03-01: -6 linesWeek of 2026-03-08: +0 linesWeek of 2026-03-08: -0 linesWeek of 2026-03-15: +0 linesWeek of 2026-03-15: -0 linesWeek of 2026-03-22: +0 linesWeek of 2026-03-22: -0 linesWeek of 2026-03-29: +7 linesWeek of 2026-03-29: -7 linesWeek of 2026-04-05: +0 linesWeek of 2026-04-05: -0 linesWeek of 2026-04-12: +0 linesWeek of 2026-04-12: -0 linesWeek of 2026-04-19: +0 linesWeek of 2026-04-19: -0 linesWeek of 2026-04-26: +1,922 linesWeek of 2026-04-26: -2,517 linesWeek of 2026-05-03: +0 linesWeek of 2026-05-03: -0 linesWeek of 2026-05-10: +608 linesWeek of 2026-05-10: -608 linesWeek of 2026-05-17: +3,557 linesWeek of 2026-05-17: -3,205 linesWeek of 2026-05-24: +0 linesWeek of 2026-05-24: -0 linesWeek of 2026-05-31: +0 linesWeek of 2026-05-31: -0 linesWeek of 2026-06-07: +2,545 linesWeek of 2026-06-07: -1,233 linesWeek of 2026-06-14: +36,093 linesWeek of 2026-06-14: -5,390 linesWeek of 2026-06-21: +44,463 linesWeek of 2026-06-21: -13,802 linesWeek of 2026-06-28: +24,447 linesWeek of 2026-06-28: -5,102 linesWeek of 2026-07-05: +15,215 linesWeek of 2026-07-05: -1,962 linesWeek of 2026-07-12: +22,180 linesWeek of 2026-07-12: -2,898 linesWeek of 2026-07-19: +24,139 linesWeek of 2026-07-19: -7,166 linesWeek of 2026-07-26: +33,131 linesWeek of 2026-07-26: -6,834 linesFeb 1, 2026Jul 26, 2026
+280.1K lines added, -55K removed over the last year.

Commits per week

last 52 weeks
1710Week of 2025-08-02: 0 commitsWeek of 2025-08-09: 0 commitsWeek of 2025-08-16: 0 commitsWeek of 2025-08-23: 0 commitsWeek of 2025-08-30: 0 commitsWeek of 2025-09-06: 0 commitsWeek of 2025-09-13: 0 commitsWeek of 2025-09-20: 0 commitsWeek of 2025-09-27: 0 commitsWeek of 2025-10-04: 0 commitsWeek of 2025-10-11: 0 commitsWeek of 2025-10-18: 0 commitsWeek of 2025-10-25: 0 commitsWeek of 2025-11-01: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 1 commitsWeek of 2026-02-08: 1 commitsWeek of 2026-02-15: 38 commitsWeek of 2026-02-22: 8 commitsWeek of 2026-03-01: 2 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 4 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 0 commitsWeek of 2026-04-26: 3 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 1 commitsWeek of 2026-05-17: 17 commitsWeek of 2026-05-24: 0 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 28 commitsWeek of 2026-06-14: 171 commitsWeek of 2026-06-21: 121 commitsWeek of 2026-06-28: 144 commitsWeek of 2026-07-05: 60 commitsWeek of 2026-07-12: 74 commitsWeek of 2026-07-19: 138 commitsWeek of 2026-07-26: 94 commitsAug 2, 2025Jul 26, 2026
905 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 2 commitsSun 1:00 — 7 commitsSun 2:00 — 1 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 3 commitsSun 7:00 — 1 commitsSun 8:00 — 0 commitsSun 9:00 — 2 commitsSun 10:00 — 8 commitsSun 11:00 — 9 commitsSun 12:00 — 1 commitsSun 13:00 — 9 commitsSun 14:00 — 6 commitsSun 15:00 — 3 commitsSun 16:00 — 6 commitsSun 17:00 — 5 commitsSun 18:00 — 9 commitsSun 19:00 — 14 commitsSun 20:00 — 10 commitsSun 21:00 — 5 commitsSun 22:00 — 10 commitsSun 23:00 — 3 commitsMon 0:00 — 2 commitsMon 1:00 — 1 commitsMon 2:00 — 1 commitsMon 3:00 — 1 commitsMon 4:00 — 1 commitsMon 5:00 — 1 commitsMon 6:00 — 0 commitsMon 7:00 — 6 commitsMon 8:00 — 13 commitsMon 9:00 — 9 commitsMon 10:00 — 25 commitsMon 11:00 — 16 commitsMon 12:00 — 8 commitsMon 13:00 — 19 commitsMon 14:00 — 22 commitsMon 15:00 — 9 commitsMon 16:00 — 7 commitsMon 17:00 — 7 commitsMon 18:00 — 6 commitsMon 19:00 — 6 commitsMon 20:00 — 7 commitsMon 21:00 — 3 commitsMon 22:00 — 11 commitsMon 23:00 — 3 commitsTue 0:00 — 7 commitsTue 1:00 — 1 commitsTue 2:00 — 2 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 5 commitsTue 8:00 — 5 commitsTue 9:00 — 5 commitsTue 10:00 — 5 commitsTue 11:00 — 1 commitsTue 12:00 — 10 commitsTue 13:00 — 5 commitsTue 14:00 — 2 commitsTue 15:00 — 5 commitsTue 16:00 — 3 commitsTue 17:00 — 3 commitsTue 18:00 — 3 commitsTue 19:00 — 1 commitsTue 20:00 — 1 commitsTue 21:00 — 2 commitsTue 22:00 — 9 commitsTue 23:00 — 10 commitsWed 0:00 — 12 commitsWed 1:00 — 2 commitsWed 2:00 — 2 commitsWed 3:00 — 2 commitsWed 4:00 — 1 commitsWed 5:00 — 4 commitsWed 6:00 — 3 commitsWed 7:00 — 10 commitsWed 8:00 — 10 commitsWed 9:00 — 7 commitsWed 10:00 — 15 commitsWed 11:00 — 8 commitsWed 12:00 — 18 commitsWed 13:00 — 13 commitsWed 14:00 — 7 commitsWed 15:00 — 5 commitsWed 16:00 — 11 commitsWed 17:00 — 14 commitsWed 18:00 — 14 commitsWed 19:00 — 5 commitsWed 20:00 — 7 commitsWed 21:00 — 8 commitsWed 22:00 — 11 commitsWed 23:00 — 3 commitsThu 0:00 — 1 commitsThu 1:00 — 2 commitsThu 2:00 — 5 commitsThu 3:00 — 1 commitsThu 4:00 — 0 commitsThu 5:00 — 1 commitsThu 6:00 — 0 commitsThu 7:00 — 6 commitsThu 8:00 — 3 commitsThu 9:00 — 3 commitsThu 10:00 — 17 commitsThu 11:00 — 16 commitsThu 12:00 — 12 commitsThu 13:00 — 3 commitsThu 14:00 — 8 commitsThu 15:00 — 4 commitsThu 16:00 — 8 commitsThu 17:00 — 15 commitsThu 18:00 — 2 commitsThu 19:00 — 5 commitsThu 20:00 — 16 commitsThu 21:00 — 7 commitsThu 22:00 — 3 commitsThu 23:00 — 6 commitsFri 0:00 — 9 commitsFri 1:00 — 9 commitsFri 2:00 — 5 commitsFri 3:00 — 0 commitsFri 4:00 — 1 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 7 commitsFri 8:00 — 3 commitsFri 9:00 — 7 commitsFri 10:00 — 5 commitsFri 11:00 — 11 commitsFri 12:00 — 4 commitsFri 13:00 — 17 commitsFri 14:00 — 5 commitsFri 15:00 — 8 commitsFri 16:00 — 4 commitsFri 17:00 — 5 commitsFri 18:00 — 3 commitsFri 19:00 — 5 commitsFri 20:00 — 0 commitsFri 21:00 — 2 commitsFri 22:00 — 6 commitsFri 23:00 — 1 commitsSat 0:00 — 2 commitsSat 1:00 — 2 commitsSat 2:00 — 3 commitsSat 3:00 — 1 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 2 commitsSat 9:00 — 3 commitsSat 10:00 — 3 commitsSat 11:00 — 1 commitsSat 12:00 — 2 commitsSat 13:00 — 3 commitsSat 14:00 — 9 commitsSat 15:00 — 9 commitsSat 16:00 — 2 commitsSat 17:00 — 3 commitsSat 18:00 — 2 commitsSat 19:00 — 9 commitsSat 20:00 — 1 commitsSat 21:00 — 2 commitsSat 22:00 — 6 commitsSat 23:00 — 4 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits806 (84%)
Community commits156 (16%)

962 commits in total over the last year.

DateListRankStars gained
May 20, 2026daily#25+40
May 19, 2026daily#8+67
May 18, 2026daily#12+77
  • public-apis/public-apis

    A collective list of free APIs

    454.9K stars · Python

  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    453.6K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    385.5K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript