A lightweight self-hosted WhatsApp REST API built with Go.
WhatsSend allows you to send WhatsApp messages through a simple REST API while keeping your own WhatsApp account and session under your control.
Create a directory:
mkdir whatssend
cd whatssendCreate a file named docker-compose.yml:
services:
whatssend:
image: lbarreiro71/whatssend:latest
container_name: whatssend
restart: unless-stopped
ports:
- "8082:8082"
volumes:
- ./data:/app/data
environment:
TZ: Europe/LisbonStart the container:
docker compose up -dOpen your browser:
http://YOUR_SERVER_IP:8082
Scan the QR Code once.
Done.
Send a message:
POST /api/send
Example:
{
"to":"351912345678",
"message":"Hello from WhatsSend!"
}Example using curl:
curl -X POST http://localhost:8082/api/send \
-H "Content-Type: application/json" \
-d '{
"to":"351912345678",
"message":"Hello!"
}'rest_command:
whatssend:
url: "http://YOUR_SERVER_IP:8082/api/send"
method: POST
content_type: application/json
payload: >
{
"to": {{ to | to_json }},
"message": {{ message | to_json }}
}WhatsSend stores all data in:
data/
├── config.yaml
└── session.db
Keep this folder to preserve your WhatsApp session.
- Lightweight
- Self-hosted
- QR authentication
- Persistent session
- REST API
- Docker
- Home Assistant integration
https://github.com/lbarreiro/whatssend
MIT