explaingit

w3nder/multi-wa-api

19TypeScriptAudience · developerComplexity · 4/5Setup · hard

TLDR

A server-side API for controlling multiple WhatsApp accounts at once. Send messages, receive events, and manage sessions via standard web requests, no direct app interaction needed. Supports multi-tenant setups with PostgreSQL-backed session storage.

Mindmap

mindmap
  root((multi-wa-api))
    What it does
      Send WhatsApp messages
      Receive message events
      Manage sessions via API
    Tech stack
      TypeScript monorepo
      PostgreSQL storage
      Dual engine support
    Use cases
      Multi-tenant messaging
      Automated notifications
      Business WhatsApp bots
    Security
      API key auth
      Short-lived tokens
      Signed webhooks
    Setup
      QR code pairing
      Webhook URL config
      Client SDK included
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automate sending WhatsApp messages from your app or backend without touching the WhatsApp app manually.

USE CASE 2

Run separate WhatsApp accounts for multiple customers or teams from a single server.

USE CASE 3

Receive incoming WhatsApp messages as webhooks and trigger workflows or chatbot responses.

USE CASE 4

Switch between WhatsApp connection engines without re-scanning QR codes or losing session state.

Tech stack

TypeScriptPostgreSQLREST APIWebhooksMonorepoSDK

Getting it running

Difficulty · hard Time to first run · 1h+

Requires a running PostgreSQL database and WhatsApp mobile app for QR code pairing. README is written in Portuguese. Project is in early active development, expect rough edges.

License terms are not mentioned in the explanation.

In plain English

This is a server-side API for programmatically controlling multiple WhatsApp accounts at the same time. Developers can use it to send messages, receive events, and manage WhatsApp sessions through standard web requests, rather than interacting with the WhatsApp app directly. The project supports two underlying WhatsApp connection libraries, called engines, that can be chosen per session when it is created. Unusually, sessions can be switched from one engine to the other without going through the WhatsApp QR-code pairing process again. All session state for both engines is stored in a single PostgreSQL database, which means the data persists across restarts and is accessible from one place. The system is built for multi-tenant use, meaning multiple separate teams or customers can each have their own isolated set of sessions under one running server. Security features include two authentication methods: API keys for server-to-server communication and short-lived tokens for human-facing interfaces. Incoming webhooks are signed with a cryptographic checksum so you can verify they actually came from this server. When a new WhatsApp session is created, the API streams a QR code in real time that the user scans with the WhatsApp mobile app to link the account. After that, sending a message is a single web request. Events like incoming messages are delivered as webhooks to a URL you configure. The codebase is structured as a TypeScript monorepo with clear internal boundaries. The core business logic does not depend on either engine directly, both engines are separate packages injected at startup. A typed SDK package is included for client-side use that removes the need to manually construct message payloads. The README is written in Portuguese and the project appears to be in active early development.

Copy-paste prompts

Prompt 1
Using the multi-wa-api TypeScript SDK, show me how to create a new WhatsApp session, display the QR code, and send a text message once the session is active.
Prompt 2
How do I set up a webhook endpoint to receive incoming WhatsApp messages from multi-wa-api and verify the cryptographic signature to confirm the request is authentic?
Prompt 3
Show me how to configure multi-wa-api for a multi-tenant setup where each customer gets their own isolated WhatsApp sessions, using API key authentication for server-to-server calls.
Prompt 4
How do I switch a WhatsApp session from one engine to the other in multi-wa-api without going through the QR code pairing process again?
Prompt 5
Walk me through deploying multi-wa-api with a PostgreSQL database so that session state persists across server restarts.
Open on GitHub → Explain another repo

← w3nder on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.