API Integration Guide
Connect your CRM, booking system, or any application to send WhatsApp messages through our simple API.
Get Started in 5 Simple Steps
Download the Desktop App
Download and install All-in-One Messenger Hub on your Windows computer.
Connect Your WhatsApp
Add your WhatsApp account to the app by scanning the QR code.
Create a Session API
Go to the WhatsApp tab and create a new Session API. Link it to your WhatsApp channel.
Copy Your API Key
Copy the generated API key. Keep it safe - it's your authentication.
Start Sending Messages
Use the API from your application. Keep the desktop app running to deliver messages.
Authentication
All API endpoints require authentication via your API key. You can pass the key in any of these ways:
| Method | Example |
|---|---|
| X-API-Key Header (Recommended) | X-API-Key: your-api-key |
| Query/Body Parameter | key=your-api-key |
| Alternative Parameter | api_key=your-api-key |
Send Message
Send a WhatsApp message to a phone number or group. Messages are queued and delivered when the desktop app is running.
POST https://onemessengerhub.com/api/whatsapp-session/send
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | Your API key from the desktop app |
mobile |
string | Conditional | Phone number with country code (required without group_id) |
group_id |
string | Conditional | WhatsApp group ID (required without mobile). The @g.us suffix is added automatically. |
message |
string | Yes | Message text (max 4096 characters) |
Example Request
curl -X POST https://onemessengerhub.com/api/whatsapp-session/send \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mobile": "1234567890", "message": "Hello!"}'
Simple GET Request (Browser or Link)
https://onemessengerhub.com/api/whatsapp-session/send?key=YOUR_API_KEY&mobile=1234567890&message=Hello!
Success Response (201)
{
"success": true,
"message": "Message queued successfully",
"data": {
"message_id": 123,
"recipient": "1234567890",
"status": "pending"
}
}
Save Contact
Save or rename a contact in your WhatsApp. The operation is queued and processed by the desktop app.
POST https://onemessengerhub.com/api/whatsapp-session/save-contact
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | Your API key from the desktop app |
contact_id |
string | Yes | Contact phone number or WhatsApp ID (max 50 chars). The @c.us suffix is added automatically. |
name |
string | Yes | Display name for the contact (max 255 characters) |
Example Request
curl -X POST https://onemessengerhub.com/api/whatsapp-session/save-contact \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contact_id": "1234567890", "name": "John Doe"}'
Success Response (201)
{
"success": true,
"message": "Contact save operation queued",
"data": {
"operation_id": 456,
"contact_id": "[email protected]",
"status": "pending"
}
}
Remove Contact
Remove a contact from your WhatsApp. The operation is queued and processed by the desktop app.
POST https://onemessengerhub.com/api/whatsapp-session/remove-contact
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | Your API key from the desktop app |
contact_id |
string | Yes | Contact phone number or WhatsApp ID (max 50 chars). The @c.us suffix is added automatically. |
Example Request
curl -X POST https://onemessengerhub.com/api/whatsapp-session/remove-contact \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contact_id": "1234567890"}'
Success Response (201)
{
"success": true,
"message": "Contact remove operation queued",
"data": {
"operation_id": 789,
"contact_id": "[email protected]",
"status": "pending"
}
}
Error Handling
The API uses standard HTTP status codes. Here are the common error responses:
Authentication Error (401)
{
"success": false,
"message": "Invalid or inactive API key"
}
Validation Error (422)
{
"success": false,
"message": "Validation failed",
"errors": {
"mobile": ["The mobile field is required when group id is not present."],
"message": ["The message field is required."]
}
}
What You Can Build
CRM Integration
Send follow-up messages, reminders, and updates directly from your CRM system.
Booking Confirmations
Automatically send appointment confirmations and reminders to customers.
Order Notifications
Notify customers about order status, shipping updates, and delivery info.
Alert Systems
Send important alerts and notifications to your team or customers.
Marketing Campaigns
Send promotional messages and updates to your contact list.
Custom Workflows
Integrate with Zapier, Make, n8n, or any automation platform.
More APIs Coming Soon
We're expanding our API offerings to cover more platforms and use cases.
Chatbot API
Trigger chatbot responses and manage conversations programmatically.
Contacts API
Access and manage your messenger contacts across platforms.
Webhooks
Receive real-time notifications when messages are received or sent.
All-in-One Messenger Hub