Building an Open Source WhatsApp HTTP API for My Projects

Recently, I needed to integrate WhatsApp into one of my applications, and if you’ve ever gone down this road, you know it can be a real pain. I decided to try whatsapp-web.js. It’s not "official", and there’s a risk of account blocks if you abuse it for mass messaging, but for my needs, it was enough.
Sure, there’s the official API from Meta, but it’s not exactly developer-friendly. Between the approval process, restrictions, and... the fees. I wasn’t building a bulk marketing system, I just needed something lightweight to send and receive messages.
The Problem: My App Isn’t in JavaScript
My main application isn’t built in Node.js, so directly integrating whatsapp-web.js wasn’t going to be clean. And looking at the big picture, most of my projects that I wanted to integrate with Whatsapp aren't using JavaScript, most of using PHP, Java or Python, so instead, I came up with an idea to build that integration inside a service that exposes an HTTP API, so I could:
- Run that service in a Docker container.
- Let any of my apps talk to it via simple HTTP calls.
That way, any language, could integrate with WhatsApp without dealing with a different library.
From Hack to Project
At first, it was just a small utility service for myself. But the more I worked on it, the more I realized it could be usefull to other devs, so I kept improving it, added multi-session support, created more advanced endpoints, implemented webhooks for real-time updates, and documented everything with Swagger.
Eventually, I have made it open source so anyone could spin up their own WhatsApp integration in minutes.
What It Can Do
Right now, the WhatsApp HTTP API lets you:
- Send and receive text messages via WhatsApp Web
- Manage multiple sessions (perfect for multi-user or multi-account setups)
- Register a single webhook for each session to get message and status updates in real time
- Run it entirely in a Docker container
It’s built with Node.js + TypeScript + Express + whatsapp-web.js under the hood.
Here’s how easy it is to start:
docker run -d \
--name whatshttp \
-p 3000:3000 \
-v whatsapp-sessions:/app/data \
crazynds/whatshttp:latest
Then just head to http://localhost:3000/docs, and start using the endpoints. It need you to scan an QRCode to login, but after that, you can start to send messages.
What’s Next?
The project’s still young, but here’s what’s on my roadmap:
- Contact list management
- Sending media (images, videos, audio, etc.)
- Authentication support for the API
And of course, I’d love contributions from the community, whether it’s code, feedback, or ideas.
The project can be found at the following repository in github: crazynds/whatsapp-http.