Enterprise-grade WhatsApp Business API integration for modern applications
https://api.messingin.com/v1
Authorization header as
Bearer YOUR_API_KEY
All API requests must include your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
/api/whatsapp/sessions
Creates a new WhatsApp session and returns a QR code for scanning.
{
"name": "My Session",
"webhook": "https://your-site.com/webhook"
}
{
"success": true,
"data": {
"sessionId": "session_123",
"qrCode": "data:image/png;base64,..."
}
}
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"My Session"}' \
https://api.messingin.com/api/whatsapp/sessions
/api/whatsapp/sessions/{sessionId}/messages
Sends a WhatsApp message to the specified number.
sessionId (string, required) - Session ID in URL pathto (string, required) - Recipient phone numbermessage (string, required) - Message text{
"to": "+1234567890",
"message": "Hello from WhatsApp API!"
}
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+1234567890","message":"Hello World!"}' \
https://api.messingin.com/api/whatsapp/sessions/session_123/messages
Receive real-time message events by configuring webhook URLs in your dashboard.
message.received - New message receivedmessage.sent - Message sent successfullymessage.delivered - Message deliveredsession.connected - Session connectedsession.disconnected - Session disconnected{
"event": "message.delivered",
"data": {
"id": "msg_001",
"sessionId": "session_123",
"to": "+1234567890",
"message": "Hello World!",
"timestamp": "2025-09-30T01:16:25Z"
}
}
API requests are subject to rate limiting based on your subscription plan:
| Plan | Messages/Day | API Calls/Minute | Sessions |
|---|---|---|---|
| Free | 100 | 100 | 1 |
| Basic | 10,000 | 1,000 | 5 |
| Pro | 100,000 | 10,000 | 25 |
| Enterprise | Unlimited | 20,000 | Unlimited |
The API uses standard HTTP status codes to indicate success or failure:
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request successful |
| 201 | Created | Resource created successfully |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Insufficient permissions |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error occurred |
// Send a WhatsApp message
const response = await fetch('/api/whatsapp/sessions/session_123/messages', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '+1234567890',
message: 'Hello from JavaScript!'
})
});
const result = await response.json();
console.log(result);
import requests
# Send a WhatsApp message
url = "https://api.messingin.com/api/whatsapp/sessions/session_123/messages"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"to": "+1234567890",
"message": "Hello from Python!"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
"+1234567890",
"message" => "Hello from PHP!"
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+1234567890","message":"Hello from cURL!"}' \
https://api.messingin.com/api/whatsapp/sessions/session_123/messages