Complete guide to integrate WhatsApp API into your applications
All API requests should be made to this base URL
https://www.itweb.eu.cc.mothoshop.com/api
All endpoints are prefixed with /api. For example:
https://www.itweb.eu.cc.mothoshop.com/api/sessions
Get started in minutes with our simple API
Sign up and get your API key from the dashboard
Scan QR code to link your WhatsApp device
Start sending messages via API
Secure your API requests with Bearer Token
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Get your API key from Dashboard → API Keys → Create New Key
Available endpoints for WhatsApp operations
/api/sessions
List all WhatsApp sessions
/api/sessions
Create new session
/api/sessions/{id}
Get session details
/api/sessions/{id}/qrcode
Get QR code for session
/api/sessions/{id}/connect
Connect session
/api/sessions/{id}/disconnect
Disconnect session
/api/messages/send-text
Send text message
/api/messages/send-media
Send media message
/api/messages
Get message history
/api/sessions/{id}
Delete session
/api/sessions/{id}/status
Get session connection status
/api/sessions/{id}
Update session name
/api/messages/{id}
Get single message details
/api/send-message
Quick send (shortcut for /messages/send-text)
Send a text message to a WhatsApp number
curl -X POST "https://www.itweb.eu.cc.mothoshop.com/api/messages/send-text" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "8801XXXXXXXXX",
"message": "Hello from WhatsApp API!"
}'
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id |
integer | No (Optional) | WhatsApp session ID. If omitted, system will auto-select a connected session. |
to |
string | Yes | Recipient phone number with country code |
message |
string | Yes | Message content (max 4096 characters) |
{
"success": true,
"message": "Message sent successfully",
"data": {
"message_id": "3EB0123456789ABCDEF",
"status": "sent",
"timestamp": "2026-01-28T19:30:00Z"
}
}
Send images, documents, videos, or audio files
curl -X POST "https://www.itweb.eu.cc.mothoshop.com/api/messages/send-media" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "8801XXXXXXXXX",
"media_url": "https://example.com/image.jpg",
"caption": "Check this out!",
"type": "image"
}'
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
string | Yes | Recipient phone number with country code |
media_url |
string | Yes | Public URL of the media file |
caption |
string | No | Caption text for the media (max 1024 chars) |
type |
string | No | Media type: image, document, video, audio |
session_id |
integer | No | Session ID (auto-selected if omitted) |
Ready-to-use code for WordPress, Laravel, and custom applications
// Send WhatsApp notification on new WooCommerce order
function wasender_order_notification($order_id) {
$order = wc_get_order($order_id);
$phone = $order->get_billing_phone();
$name = $order->get_billing_first_name();
$total = $order->get_total();
$message = "Hi {$name}! Your order #{$order_id} of ৳{$total} has been received. We'll notify you when it ships.";
wp_remote_post('https://www.itweb.eu.cc.mothoshop.com/api/send-message', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Content-Type' => 'application/json',
],
'body' => json_encode([
'to' => $phone,
'message' => $message,
]),
'timeout' => 30,
]);
}
add_action('woocommerce_new_order', 'wasender_order_notification');
Tip: The /api/send-message endpoint is a shortcut for /api/messages/send-text. Both work identically. session_id is always optional — the system auto-selects a connected session if omitted.
Receive real-time notifications for events
Triggered when a message is successfully sent
Triggered when a message is delivered to recipient
Triggered when a message is read by recipient
Triggered when you receive a new message
Triggered when WhatsApp session connects
Triggered when WhatsApp session disconnects
Common error responses and their meanings
Invalid or missing API key
You don't have permission for this action
Session or resource not found
Invalid request parameters
Too many requests, please slow down
Internal server error, contact support
Official SDKs for easier integration
composer require wasender/php-sdk
npm install wasender-sdk
pip install wasender
composer require wasender/laravel