đ WhatsApp Multi-Session Manager
Manage multiple WhatsApp connections from a single dashboard
Active Sessions
| Session ID | Mobile Number | Authentication Token | Status | Connected At | Action |
|---|---|---|---|---|---|
|
No active sessions. Click "Connect New Session" to get started. |
|||||
đĄ API Documentation
Send messages via WhatsApp API using token-based authentication.
Authentication
All message endpoints require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_TOKEN_HERE
đ¤ Unified Endpoint
POST
/api/messages/send
Send Any Message Type
Single endpoint for all message types (text, image, video, document)
Common Parameters:
to- Recipient's WhatsApp number (required)type- Message type:text,image,video,document(required)message- Text content for text messages, or caption for media (optional for media)
Send Text Message
Request:
{
"to": "919876543210",
"type": "text",
"message": "Hello World!"
}
Send Image Message
Request:
{
"to": "919876543210",
"type": "image",
"mediaUrl": "https://example.com/photo.jpg",
"message": "Check this photo!"
}
Parameters:
mediaUrl- Image URL or local path (required)message- Image caption (optional)
Send Video Message
Request:
{
"to": "919876543210",
"type": "video",
"mediaUrl": "https://example.com/video.mp4",
"message": "Watch this!"
}
Parameters:
mediaUrl- Video URL or local path (required)message- Video caption (optional)
Send Document Message
Request:
{
"to": "919876543210",
"type": "document",
"mediaUrl": "https://example.com/file.pdf",
"fileName": "my-document.pdf",
"message": "Here's your document"
}
Parameters:
mediaUrl- Document URL or local path (required)fileName- Custom filename (optional, auto-detected from URL/path)message- Document caption (optional)
Response:
{
"success": true,
"messageId": "3EB0601DAAF2EF6BE85000"
}
đĄ Usage Examples
JavaScript / Node.js
const token = 'YOUR_TOKEN_HERE';
// Send text message
async function sendTextMessage(to, message) {
const response = await fetch('http://localhost:3000/api/messages/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ to, type: 'text', message })
});
return response.json();
}
// Send image with caption
async function sendImage(to, mediaUrl, caption) {
const response = await fetch('http://localhost:3000/api/messages/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ to, type: 'image', mediaUrl, message: caption })
});
return response.json();
}
await sendTextMessage('919876543210', 'Hello!');
await sendImage('919876543210', 'https://example.com/photo.jpg', 'Check this!');
Python
import requests
token = 'YOUR_TOKEN_HERE'
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
# Send text message
response = requests.post(
'http://localhost:3000/api/messages/send',
headers=headers,
json={'to': '919876543210', 'type': 'text', 'message': 'Hello!'}
)
print(response.json())
# Send image with caption
response = requests.post(
'http://localhost:3000/api/messages/send',
headers=headers,
json={
'to': '919876543210',
'type': 'image',
'mediaUrl': 'https://example.com/photo.jpg',
'message': 'Check this out!'
}
)
print(response.json())
cURL
# Send text message
curl -X POST http://localhost:3000/api/messages/send \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{"to": "919876543210", "type": "text", "message": "Hello!"}'
# Send image with caption
curl -X POST http://localhost:3000/api/messages/send \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"to": "919876543210",
"type": "image",
"mediaUrl": "https://example.com/photo.jpg",
"message": "Check this!"
}'
# Send document
curl -X POST http://localhost:3000/api/messages/send \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"to": "919876543210",
"type": "document",
"mediaUrl": "https://example.com/file.pdf",
"fileName": "report.pdf",
"message": "Here is the report"
}'
đ Phone Number Format
Always use country code + phone number (no + or spaces)
- India:
919876543210 - USA:
12345678900 - UK:
447911123456
âšī¸ Status Codes
200- Message sent successfully400- Bad request (missing fields)401- Unauthorized (invalid token)500- Server error