REST API powered by whatsmeow (Go) | Multi-device compatible
All API endpoints (except /docs, /qr, /health) require authentication via API key when API_KEY env var is set.
Send the key in one of these ways:
Header: X-API-Key: your-api-key
Query: ?api_key=your-api-key
Health check
Response: {"status": "ok"}
Get current connection status, device info
{
"connected": true,
"loggedIn": true,
"device": "573000000:00@s.whatsapp.net",
"pushName": "My Business",
"platform": "smba"
}
Get QR code for WhatsApp pairing
image (PNG), base64 (JSON with base64), omit for raw text
Disconnect and reconnect (generates new QR if needed)
Logout from WhatsApp (unpair device)
Send a text message
Request:
{
"phone": "573001234567",
"message": "Hello from wsgo!"
}
Response:
{
"status": "sent",
"messageID": "3EB0ABC123...",
"timestamp": "2026-06-09T12:00:00Z"
}
Send an image with optional caption
Request:
{
"phone": "573001234567",
"image_base64": "/9j/4AAQSkZJRg...",
"caption": "Check this out!",
"mime_type": "image/jpeg"
}
Send a document (PDF, XLSX, etc.)
Request:
{
"phone": "573001234567",
"document_base64": "JVBERi0xLjQ...",
"filename": "report.pdf",
"mime_type": "application/pdf",
"caption": "Monthly report"
}
Get all joined groups
[{
"jid": "120363000000@g.us",
"name": "Work Group",
"topic": "Project discussion",
"participants": 15,
"createdAt": "2024-01-15T10:00:00Z"
}]
Send a text message to a group
Request:
{
"group_jid": "120363000000@g.us",
"message": "Hello group!"
}
Get all contacts from the device
Check if phone numbers are on WhatsApp
Request: {"phones": ["+573001234567", "+573009876543"]}
Response:
[
{"query": "+573001234567", "jid": "573001234567@s.whatsapp.net", "isOnWhatsApp": true},
{"query": "+573009876543", "jid": "573009876543@s.whatsapp.net", "isOnWhatsApp": false}
]
Set webhook URL for incoming messages
{"url": "https://your-n8n.example.com/webhook/whatsapp"}
Get current webhook URL
{
"event": "message",
"data": {
"from": "573001234567@s.whatsapp.net",
"chat": "573001234567@s.whatsapp.net",
"messageID": "3EB0ABC...",
"pushName": "John",
"timestamp": "2026-06-09T12:00:00Z",
"text": "Hello!",
"isGroup": false
}
}
Get recent events (last 500: messages, connections, disconnections)
wsgo API v1.0 — Built with whatsmeow | Go