GOWA - WhatsApp Automation via REST API
Interact with WhatsApp through GOWA (Go WhatsApp Web Multi-Device) REST API for personal automation tasks.
Installation & Setup
GOWA is available at: https://github.com/aldinokemal/go-whatsapp-web-multidevice
Download
Go to the releases page and download the zip matching your OS and architecture.
Release files are named: whatsapp_VERSION_OS_ARCH.zip
Available platforms: linux (amd64/arm64/386), darwin (amd64/arm64), windows (amd64/386)
Run REST Server
./gowa rest
The server starts on http://localhost:3000 by default.
Login (First Time)
Open http://localhost:3000 in a browser, scan the QR code with WhatsApp on your phone to link the device.
Production Setup
GOWA runs in REST mode:
- Base URL:
http://localhost:3000
- GOWA auto-connects to the device stored in the database — no
X-Device-Id header needed for single-device setups.
⚠️ Important: Use REST API (port 3000) only. Do NOT use MCP mode - all schedulers and automation depend on REST.
Quick Examples
Ghost Mention (mention all without @)
curl -X POST http://localhost:3000/send/message \
-H "Content-Type: application/json" \
-d '{
"phone": "120363040656010581@g.us",
"message": "Important announcement",
"mentions": ["@everyone"]
}'
Send Text Message
curl -X POST http://localhost:3000/send/message \
-H "Content-Type: application/json" \
-d '{"phone": "628123456789", "message": "Hello!"}'
Send Image
curl -X POST http://localhost:3000/send/image \
-F "phone=628xxx" \
-F "caption=Photo" \
-F "image=@/path/to/image.jpg"
Check Status
curl http://localhost:3000/app/status | jq .
Complete API Operations
Messages
Send Text with Ghost Mention:
- Endpoint:
POST /send/message
- Body:
{"phone": "group@g.us", "message": "text", "mentions": ["@everyone"]}
- @everyone mentions all members without showing @ in text ✅
Reply to Message:
- Body:
{"phone": "...", "message": "...", "reply_message_id": "msg_id"}
Disappearing Message:
- Body:
{"phone": "...", "message": "...", "duration": 86400} (seconds)
Forward Message:
- Body:
{"phone": "...", "message": "...", "is_forwarded": true}
Media
Send Image:
- Endpoint:
POST /send/image
- Form data:
phone, caption, image (file), compress (bool)
Send Document:
- Endpoint:
POST /send/file
- Form data:
phone, caption, file
Send Video:
- Endpoint:
POST /send/video
- Form data:
phone, caption, video, compress (bool)
Send Audio:
- Endpoint:
POST /send/audio
- Form data:
phone, audio
Send Sticker:
- Endpoint:
POST /send/sticker
- Form data:
phone, sticker (auto-converts to WebP)
Send Contact:
- Endpoint:
POST /send/contact
- Body:
{"phone": "...", "contact_name": "...", "contact_phone": "..."}
Send Location:
- Endpoint:
POST /send/location
- Body:
{"phone": "...", "latitude": 0.0, "longitude": 0.0}
Send Link:
- Endpoint:
POST /send/link
- Body:
{"phone": "...", "link": "...", "caption": "..."}
Send Poll:
- Endpoint:
POST /send/poll
- Body:
{"phone": "...", "question": "...", "options": ["A", "B"]}
Connection & Status
Get Status:
GET /app/status
- Returns:
{"is_connected": true, "is_logged_in": true}
Reconnect:
Logout:
Get QR Code (for login):
GET /app/login
- Returns: PNG image (QR code to scan)
Login with Pairing Code:
GET /app/login-with-code?phone=628xxx
Groups
List My Groups:
GET /user/my/groups
- Returns:
{results: {data: [...]}} - groups array is at .results.data
- Example:
curl ... | jq '.results.data[] | {Name, JID, Members: .Participants | length}'
- Max 500 groups (WhatsApp protocol limit)
Get Group Info:
GET /group/info?group_jid=xxx@g.us
Create Group:
POST /group
- Body:
{"name": "Group Name", "participants": ["628xxx@s.whatsapp.net"]}
Get Group Participants:
GET /group/participants?group_jid=xxx@g.us
Add Participant:
POST /group/participants
- Body:
{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}
Remove Participant:
POST /group/participants/remove
- Body:
{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}
Promote to Admin:
POST /group/participants/promote
- Body:
{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}
Demote from Admin:
POST /group/participants/demote
- Body:
{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}
Leave Group:
POST /group/leave
- Body:
{"group_jid": "..."}
Set Group Photo:
POST /group/photo
- Form data:
group_jid, photo
Set Group Name:
POST /group/name
- Body:
{"group_jid": "...", "name": "..."}
Set Group Description:
POST /group/topic
- Body:
{"group_jid": "...", "topic": "..."}
Get Invite Link:
GET /group/invite-link?group_jid=xxx@g.us
Join via Link:
POST /group/join-with-link
- Body:
{"link": "https://chat.whatsapp.com/..."}
Contacts & Chats
List Contacts:
Get Chats:
Get User Info:
GET /user/info?phone=628xxx
Check if User Exists:
GET /user/check?phone=628xxx
Message Operations
Revoke/Delete Message:
POST /message/{message_id}/revoke
React to Message:
POST /message/{message_id}/reaction
- Body:
{"emoji": "👍"}
Edit Message:
POST /message/{message_id}/update
- Body:
{"message": "edited text"}
Mark as Read:
POST /message/{message_id}/read
Star Message:
POST /message/{message_id}/star
Download Media:
GET /message/{message_id}/download
Phone Number Format
- User JID:
628123456789@s.whatsapp.net
- Group JID:
120363040656010581@g.us
- Phone only:
628123456789 (without +)
Ghost Mention Feature
How it works:
- Use
"mentions": ["@everyone"] in /send/message
- All group members get notification
- No @ symbol shown in message text (true ghost mention)
- Tested and confirmed working ✅
Example for schedulers:
curl -s -X POST http://localhost:3000/send/message \
-H 'Content-Type: application/json' \
-d '{"phone": "120363040656010581@g.us", "message": "Reminder text", "mentions": ["@everyone"]}' | jq .
API Reference
Full OpenAPI 3.0 spec available at:
Notes
- Auto-compresses images and videos before sending
- Auto-converts images to WebP for stickers
- Max 500 groups can be retrieved (WhatsApp protocol limit)
- All media files can be sent as file upload or URL
- Supports disappearing messages with custom duration
- Multi-device support available via
X-Device-Id header when running multiple devices
- Built by @aldinokemal: https://github.com/aldinokemal/go-whatsapp-web-multidevice
1---2name: gowa3description: Interact with WhatsApp via GOWA (Go WhatsApp Web Multi-Device) REST API for personal automation. Supports sending messages with ghost mentions (@everyone), images, documents, group management, and more. Always use REST mode (http://localhost:3000) for production.4---56# GOWA - WhatsApp Automation via REST API78Interact with WhatsApp through GOWA (Go WhatsApp Web Multi-Device) REST API for personal automation tasks.910## Installation & Setup1112GOWA is available at: https://github.com/aldinokemal/go-whatsapp-web-multidevice1314### Download1516Go to the [releases page](https://github.com/aldinokemal/go-whatsapp-web-multidevice/releases) and download the zip matching your OS and architecture.1718Release files are named: `whatsapp_VERSION_OS_ARCH.zip`1920Available platforms: `linux` (amd64/arm64/386), `darwin` (amd64/arm64), `windows` (amd64/386)2122### Run REST Server2324```bash25./gowa rest26```2728The server starts on `http://localhost:3000` by default.2930### Login (First Time)3132Open `http://localhost:3000` in a browser, scan the QR code with WhatsApp on your phone to link the device.3334## Production Setup3536**GOWA runs in REST mode:**37- Base URL: `http://localhost:3000`38- GOWA auto-connects to the device stored in the database — no `X-Device-Id` header needed for single-device setups.3940**⚠️ Important:** Use REST API (port 3000) only. Do NOT use MCP mode - all schedulers and automation depend on REST.4142## Quick Examples4344### Ghost Mention (mention all without @)45```bash46curl -X POST http://localhost:3000/send/message \47 -H "Content-Type: application/json" \48 -d '{49 "phone": "120363040656010581@g.us",50 "message": "Important announcement",51 "mentions": ["@everyone"]52 }'53```5455### Send Text Message56```bash57curl -X POST http://localhost:3000/send/message \58 -H "Content-Type: application/json" \59 -d '{"phone": "628123456789", "message": "Hello!"}'60```6162### Send Image63```bash64curl -X POST http://localhost:3000/send/image \65 -F "phone=628xxx" \66 -F "caption=Photo" \67 -F "image=@/path/to/image.jpg"68```6970### Check Status71```bash72curl http://localhost:3000/app/status | jq .73```7475## Complete API Operations7677### Messages7879**Send Text with Ghost Mention:**80- Endpoint: `POST /send/message`81- Body: `{"phone": "group@g.us", "message": "text", "mentions": ["@everyone"]}`82- **@everyone** mentions all members without showing @ in text ✅8384**Reply to Message:**85- Body: `{"phone": "...", "message": "...", "reply_message_id": "msg_id"}`8687**Disappearing Message:**88- Body: `{"phone": "...", "message": "...", "duration": 86400}` (seconds)8990**Forward Message:**91- Body: `{"phone": "...", "message": "...", "is_forwarded": true}`9293### Media9495**Send Image:**96- Endpoint: `POST /send/image`97- Form data: `phone`, `caption`, `image` (file), `compress` (bool)9899**Send Document:**100- Endpoint: `POST /send/file`101- Form data: `phone`, `caption`, `file`102103**Send Video:**104- Endpoint: `POST /send/video`105- Form data: `phone`, `caption`, `video`, `compress` (bool)106107**Send Audio:**108- Endpoint: `POST /send/audio`109- Form data: `phone`, `audio`110111**Send Sticker:**112- Endpoint: `POST /send/sticker`113- Form data: `phone`, `sticker` (auto-converts to WebP)114115**Send Contact:**116- Endpoint: `POST /send/contact`117- Body: `{"phone": "...", "contact_name": "...", "contact_phone": "..."}`118119**Send Location:**120- Endpoint: `POST /send/location`121- Body: `{"phone": "...", "latitude": 0.0, "longitude": 0.0}`122123**Send Link:**124- Endpoint: `POST /send/link`125- Body: `{"phone": "...", "link": "...", "caption": "..."}`126127**Send Poll:**128- Endpoint: `POST /send/poll`129- Body: `{"phone": "...", "question": "...", "options": ["A", "B"]}`130131### Connection & Status132133**Get Status:**134- `GET /app/status`135- Returns: `{"is_connected": true, "is_logged_in": true}`136137**Reconnect:**138- `GET /app/reconnect`139140**Logout:**141- `GET /app/logout`142143**Get QR Code (for login):**144- `GET /app/login`145- Returns: PNG image (QR code to scan)146147**Login with Pairing Code:**148- `GET /app/login-with-code?phone=628xxx`149150### Groups151152**List My Groups:**153- `GET /user/my/groups`154- Returns: `{results: {data: [...]}}` - groups array is at `.results.data`155- Example: `curl ... | jq '.results.data[] | {Name, JID, Members: .Participants | length}'`156- Max 500 groups (WhatsApp protocol limit)157158**Get Group Info:**159- `GET /group/info?group_jid=xxx@g.us`160161**Create Group:**162- `POST /group`163- Body: `{"name": "Group Name", "participants": ["628xxx@s.whatsapp.net"]}`164165**Get Group Participants:**166- `GET /group/participants?group_jid=xxx@g.us`167168**Add Participant:**169- `POST /group/participants`170- Body: `{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}`171172**Remove Participant:**173- `POST /group/participants/remove`174- Body: `{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}`175176**Promote to Admin:**177- `POST /group/participants/promote`178- Body: `{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}`179180**Demote from Admin:**181- `POST /group/participants/demote`182- Body: `{"group_jid": "...", "participants": ["628xxx@s.whatsapp.net"]}`183184**Leave Group:**185- `POST /group/leave`186- Body: `{"group_jid": "..."}`187188**Set Group Photo:**189- `POST /group/photo`190- Form data: `group_jid`, `photo`191192**Set Group Name:**193- `POST /group/name`194- Body: `{"group_jid": "...", "name": "..."}`195196**Set Group Description:**197- `POST /group/topic`198- Body: `{"group_jid": "...", "topic": "..."}`199200**Get Invite Link:**201- `GET /group/invite-link?group_jid=xxx@g.us`202203**Join via Link:**204- `POST /group/join-with-link`205- Body: `{"link": "https://chat.whatsapp.com/..."}`206207### Contacts & Chats208209**List Contacts:**210- `GET /user/my/contacts`211212**Get Chats:**213- `GET /chats`214215**Get User Info:**216- `GET /user/info?phone=628xxx`217218**Check if User Exists:**219- `GET /user/check?phone=628xxx`220221### Message Operations222223**Revoke/Delete Message:**224- `POST /message/{message_id}/revoke`225226**React to Message:**227- `POST /message/{message_id}/reaction`228- Body: `{"emoji": "👍"}`229230**Edit Message:**231- `POST /message/{message_id}/update`232- Body: `{"message": "edited text"}`233234**Mark as Read:**235- `POST /message/{message_id}/read`236237**Star Message:**238- `POST /message/{message_id}/star`239240**Download Media:**241- `GET /message/{message_id}/download`242243## Phone Number Format244245- **User JID:** `628123456789@s.whatsapp.net`246- **Group JID:** `120363040656010581@g.us`247- **Phone only:** `628123456789` (without +)248249## Ghost Mention Feature250251**How it works:**252- Use `"mentions": ["@everyone"]` in `/send/message`253- All group members get notification254- **No @ symbol shown in message text** (true ghost mention)255- Tested and confirmed working ✅256257**Example for schedulers:**258```bash259curl -s -X POST http://localhost:3000/send/message \260 -H 'Content-Type: application/json' \261 -d '{"phone": "120363040656010581@g.us", "message": "Reminder text", "mentions": ["@everyone"]}' | jq .262```263264## API Reference265266Full OpenAPI 3.0 spec available at:267- OpenAPI: https://raw.githubusercontent.com/aldinokemal/go-whatsapp-web-multidevice/refs/heads/main/docs/openapi.yaml268- GitHub: https://github.com/aldinokemal/go-whatsapp-web-multidevice269270## Notes271272- Auto-compresses images and videos before sending273- Auto-converts images to WebP for stickers274- Max 500 groups can be retrieved (WhatsApp protocol limit)275- All media files can be sent as file upload or URL276- Supports disappearing messages with custom duration277- Multi-device support available via `X-Device-Id` header when running multiple devices278- Built by @aldinokemal: https://github.com/aldinokemal/go-whatsapp-web-multidevice