Developer Documentation

Enterprise-grade WhatsApp Business API integration for modern applications

RESTful Architecture
Webhook Events
Rate Limiting

Quick Start

Base URL:
https://api.messingin.com/v1
Authentication: Include your API key in the Authorization header as Bearer YOUR_API_KEY
Login to get your API key

Authentication

All API requests must include your API key in the Authorization header.

Header Format:
Authorization: Bearer YOUR_API_KEY
Keep your API key secret. Rotate immediately if exposed.

Sessions

Create Session
POST /api/whatsapp/sessions

Creates a new WhatsApp session and returns a QR code for scanning.

Request Body:
{
  "name": "My Session",
  "webhook": "https://your-site.com/webhook"
}
Response:
{
  "success": true,
  "data": {
    "sessionId": "session_123",
    "qrCode": "data:image/png;base64,..."
  }
}
cURL Example:
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

Messages

Send Message
POST /api/whatsapp/sessions/{sessionId}/messages

Sends a WhatsApp message to the specified number.

Parameters:
  • sessionId (string, required) - Session ID in URL path
  • to (string, required) - Recipient phone number
  • message (string, required) - Message text
Request Body:
{
  "to": "+1234567890",
  "message": "Hello from WhatsApp API!"
}
cURL Example:
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

Webhooks

Receive real-time message events by configuring webhook URLs in your dashboard.

Supported Events:
  • message.received - New message received
  • message.sent - Message sent successfully
  • message.delivered - Message delivered
  • session.connected - Session connected
  • session.disconnected - Session disconnected
Sample Webhook Payload:
{
  "event": "message.delivered",
  "data": {
    "id": "msg_001",
    "sessionId": "session_123",
    "to": "+1234567890",
    "message": "Hello World!",
    "timestamp": "2025-09-30T01:16:25Z"
  }
}

Rate Limits

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

Error Codes

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

Code Examples

// 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