Base URL

All API requests should be made to this base URL

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

Quick Start

Get started in minutes with our simple API

1

Create Account

Sign up and get your API key from the dashboard

2

Connect WhatsApp

Scan QR code to link your WhatsApp device

3

Send Messages

Start sending messages via API

Authentication

Secure your API requests with Bearer Token

HTTP Header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Get your API key from Dashboard → API Keys → Create New Key

API Endpoints

Available endpoints for WhatsApp operations

GET /api/sessions List all WhatsApp sessions
POST /api/sessions Create new session
GET /api/sessions/{id} Get session details
GET /api/sessions/{id}/qrcode Get QR code for session
POST /api/sessions/{id}/connect Connect session
POST /api/sessions/{id}/disconnect Disconnect session
POST /api/messages/send-text Send text message
POST /api/messages/send-media Send media message
GET /api/messages Get message history
DELETE /api/sessions/{id} Delete session
GET /api/sessions/{id}/status Get session connection status
PUT /api/sessions/{id} Update session name
GET /api/messages/{id} Get single message details
POST /api/send-message Quick send (shortcut for /messages/send-text)

Send Text Message

Send a text message to a WhatsApp number

cURL
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!"
  }'

Parameters

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 Response (200)

{
    "success": true,
    "message": "Message sent successfully",
    "data": {
        "message_id": "3EB0123456789ABCDEF",
        "status": "sent",
        "timestamp": "2026-01-28T19:30:00Z"
    }
}

Send Media Message

Send images, documents, videos, or audio files

cURL
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"
  }'

Parameters

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)

Integration Examples

Ready-to-use code for WordPress, Laravel, and custom applications

WordPress — functions.php
// 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.

Webhooks

Receive real-time notifications for events

message.sent

Triggered when a message is successfully sent

message.delivered

Triggered when a message is delivered to recipient

message.read

Triggered when a message is read by recipient

message.received

Triggered when you receive a new message

session.connected

Triggered when WhatsApp session connects

session.disconnected

Triggered when WhatsApp session disconnects

Error Codes

Common error responses and their meanings

401
Unauthorized

Invalid or missing API key

403
Forbidden

You don't have permission for this action

404
Not Found

Session or resource not found

422
Validation Error

Invalid request parameters

429
Rate Limited

Too many requests, please slow down

500
Server Error

Internal server error, contact support

SDKs & Libraries

Official SDKs for easier integration

PHP SDK

composer require wasender/php-sdk

Node.js SDK

npm install wasender-sdk

Python SDK

pip install wasender

Laravel Package

composer require wasender/laravel