ID:
Status:
Phone:
QR Code not available. Try refreshing the session.
Scan with WhatsApp to connect
This session will be used for all actions below
Enter with country code
Current Status:
đĄ Use "List Chats" action first to load available chats
đĄ Use "List Chats" action first to load available chats
Leave empty to screenshot main screen, or select a chat
Screenshot Preview
Configure storage and webhooks for this session
Configure your Appwrite instance connection. These credentials are required for all Appwrite features.
Specify the database, collection, and bucket IDs for message storage.
âšī¸ Auto-Creation
If the database, collection, or bucket don't exist in your Appwrite instance, they will be created automatically when you send your first message.
Send webhook events to external URLs (like your own server, n8n, Zapier, etc.)
Local message storage is currently disabled. Enable "Save to Local Database" above to include temporary media download URLs (valid for 1 hour) in webhook payloads.
Enter the full URL where you want to receive webhook events (e.g., webhook.site, n8n, your own server)
Session:
No messages found
(Media not stored locally)
Note: Messages and media files are stored locally in the /data directory when local storage is enabled in webhook configuration.
â ī¸ This API key is different from your main API key. Use it exclusively for automation API calls.
Need a new key?
âšī¸ Appwrite connection (endpoint/project/API key) is automatically used from session configuration. Only specify target database/collection here.
Define which attributes to update and their new values (JSON format)
Example 1: Update single field
{"status": "activated"}
Example 2: Update multiple fields
{"status": "completed", "verified": true, "score": 95}
Example 3: Using dynamic timestamps
{"last_contact": "{{now}}", "contact_date": "{{date}}"}
Example 4: Complex update
{"status": "active", "last_message": "{{date}}", "response_count": 1, "priority": "high"}
Template Variables:
{{"{{"}}now{{"}}"}} - Current timestamp (ISO 8601 format){{"{{"}}date{{"}}"}} - Current date (YYYY-MM-DD format)Tip: Use {"{"}"{"now"}"{"}"} for current timestamp, {"{"}"{"date"}"{"}"} for current date
Send an automatic confirmation message to the user who triggered the automation
How many seconds to wait before sending the confirmation message (0 = instant)
Triggers:
Messages:
Target Collection:
Executions:
â Confirmation:
Triggers:
Messages:
Target Collection:
Executions:
â Confirmation:
Status: Disabled
| Automation | Trigger Number | Trigger Message | Documents Updated | Executed At |
|---|---|---|---|---|
No automations created yet. Create your first automation above!
Enable or disable the Swagger UI endpoint
Setting saved. Restart the server to apply changes.
Include your API key in request headers:
x-api-key: YOUR_API_KEY
Step 1: Set up Authentication
x-api-keyStep 2: Configure the Request
/api/send/text, not just /apiStep 3: Add Request Body
{
"sessionId": "session_123",
"chatId": "201234567890@c.us",
"text": "Hello from n8n!"
}
đĄ Tip: Replace session_123 with your actual session ID from the Sessions tab
/api/sessions
Create and start a new WhatsApp session
Request Body:
{ "name": "My Session" }
Response:
{ "success": true, "session": { "id": "session_123", "name": "My Session", "status": "INITIALIZING" } }
/api/sessions
List all active sessions
Response:
{ "sessions": [{ "id": "session_123", "name": "My Session", "status": "CONNECTED" }] }
/api/sessions/:id
Get detailed information about a specific session
Response:
{ "id": "session_123", "name": "My Session", "status": "CONNECTED", "phone_number": "+201234567890" }
/api/sessions/:id
Delete a session and its data
Response:
{ "success": true }
/api/sessions/:id/logout
Logout a session without deleting it
Response:
{ "success": true, "message": "Session logged out" }
/api/sessions/:id/regenerate-automation-key
â ī¸ Generate a new automation API key for the session (invalidates previous key)
Response:
{ "success": true, "automation_api_key": "auto_abc123..." }
/api/sessions/:id/qr
Get QR code for session authentication
Response:
{ "qr_code": "data:image/png;base64,..." }
/api/send/text
Send a text message
Request Body:
{ "sessionId": "session_123", "chatId": "201234567890@c.us", "text": "Hello!" }
Response:
{ "success": true, "messageId": "msg_id_123" }
/api/send/media
Send image, video, or document
Request Body:
{ "sessionId": "session_123", "chatId": "201234567890@c.us", "mediaUrl": "https://example.com/image.jpg", "caption": "Check this out!" }
Response:
{ "success": true, "messageId": "msg_id_123" }
/api/send/voice
Send a voice message
Request Body:
{ "sessionId": "session_123", "chatId": "201234567890@c.us", "voiceUrl": "https://example.com/voice.ogg" }
Response:
{ "success": true, "messageId": "msg_id_123" }
/api/send/poll
Send a poll message
Request Body:
{ "sessionId": "session_123", "chatId": "201234567890@c.us", "pollName": "How are you?", "options": ["Great", "Good", "Not bad"], "allowMultipleAnswers": false }
Response:
{ "success": true, "messageId": "msg_id_123" }
/api/send/link
Send a link with preview
Request Body:
{ "sessionId": "session_123", "chatId": "201234567890@c.us", "url": "https://example.com", "text": "Check this website!" }
Response:
{ "success": true, "messageId": "msg_id_123" }
/api/send/reaction
React to a message with emoji
Request Body:
{ "sessionId": "session_123", "messageId": "msg_id_here", "emoji": "đ" }
Response:
{ "success": true }
/api/check-number
Check if a number is registered on WhatsApp
Request Body:
{ "sessionId": "session_123", "phoneNumber": "201234567890" }
Response:
{ "registered": true, "phoneNumber": "201234567890" }
/api/sessions/:id/presence
Set presence status (online/offline)
Request Body:
{ "presence": "available" }
Values: "available" or "unavailable"
Response:
{ "success": true, "presence": "available" }
/api/sessions/:id/chats
Get all chats for a session
Response:
{ "chats": [{ "id": "201234567890@c.us", "name": "John Doe", "isGroup": false, "unreadCount": 0 }] }
/api/sessions/:id/chats/:chatId/messages?limit=50
Get messages from a specific chat
Response:
{ "messages": [{ "id": "msg_123", "body": "Hello!", "from": "201234567890@c.us", "timestamp": 1234567890 }] }
/api/sessions/:id/contacts/:contactId
Get contact information
Response:
{ "id": "201234567890@c.us", "name": "John Doe", "number": "201234567890", "isMyContact": true }
/api/webhooks
Create a new webhook
Request Body:
{ "sessionId": "session_123", "url": "https://your-server.com/webhook", "events": ["message"] }
Response:
{ "success": true, "webhookId": 1 }
/api/webhooks
List all webhooks
Response:
{ "webhooks": [{ "id": 1, "session_id": "session_123", "url": "https://your-server.com/webhook" }] }
/api/webhooks/:id
Delete a webhook
Response:
{ "success": true }
/api/webhook-config/:sessionId
Get webhook configuration for a session
Response:
{ "session_id": "session_123", "save_to_appwrite": 1, "save_to_local": 1, "appwrite_enabled": 1, "events": ["message"] }
/api/webhook-config/:sessionId
Update webhook configuration
Request Body:
{ "save_to_appwrite": 1, "save_to_local": 1, "appwrite_enabled": 1, "events": ["message", "message_reaction"] }
Response:
{ "success": true }
/api/messages?limit=100&offset=0
Get local messages from database
Response:
{ "messages": [{ "id": 1, "from_number": "201234567890", "body": "Hello!", "timestamp": 1234567890 }] }
Automation endpoints use a per-session automation API key (NOT your main API key).
Include the automation API key in the x-automation-api-key header.
Get your automation API key from the Automations tab in the dashboard after selecting a session.
Get all automations for the authenticated session
x-automation-api-key: your_automation_api_key
Create a new automation (session determined by API key)
x-automation-api-key: your_automation_api_key
Update an existing automation
Delete an automation and its history
Get automation execution history (session determined by API key)
x-automation-api-key: your_automation_api_key
This WhatsApp API sends webhook events to your URL using POST requests. It does NOT provide a GET endpoint to fetch events. Your webhook receiver must accept incoming POST requests.
â This will NOT work: Polling the webhook URL with GET requests to fetch events
â This will work: A server endpoint that receives POST requests from this API
https://yourdomain.com/webhook)X-Webhook-Key header for verificationhttps://your-n8n.com/webhook/abc123)X-Webhook-Key headerWhen a message is received, this API sends:
POST https://yourdomain.com/webhook
Headers:
Content-Type: application/json
X-Webhook-Key: whk_47b80ad07c0a03e6d4576e53d202b947...
Body:
{
"event": "message",
"sessionId": "session_123",
"from": "201234567890@c.us",
"body": "Hello!",
"timestamp": 1234567890,
"hasMedia": false
}
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhook', (req, res) => {
const apiKey = req.headers['x-webhook-key'];
const event = req.body;
console.log('Received webhook:', event);
console.log('API Key:', apiKey);
// Process the event here
// Store in database, trigger actions, etc.
res.json({ success: true });
});
app.listen(3000);
Since this API pushes events using POST requests (not GET polling), to display events in a web application you need:
đĄ Tip: For testing webhooks locally, use tools like ngrok or webhook.site to create a public URL that forwards to your local server.
Always use the format: COUNTRYCODE+NUMBER@c.us (without the + symbol)
Examples:
201234567890@c.us966512345678@c.us11234567890@c.us