API Overview
WhatsApp Status Tracker API v1.0

RESTful API for managing multiple WhatsApp sessions and sending statuses with real-time viewer tracking.

Base URL: http://localhost:3000

Key Features
  • Multiple Session Management
  • Dual Authentication (Pairing Code + QR Code)
  • Real-time Status Sending (Text, Image, Video)
  • Live Viewer Tracking
  • WebSocket Events
  • File Upload Support
  • Session Statistics
  • Auto Cleanup & Expiry
Authentication Methods

This application supports two WhatsApp authentication methods for each session:

Pairing Code Authentication

Recommended method - Requires WhatsApp phone number to generate pairing code.

  • More secure and easier to use
  • No need to scan QR code
  • Requires phone number input when creating session
  • 8-digit code entered in WhatsApp
QR Code Authentication

Classic method - Generate QR code that can be scanned with WhatsApp.

  • Traditional WhatsApp Web method
  • No phone number required
  • QR code scanned with WhatsApp camera
  • Compatible with all devices
Session Management

Manage your WhatsApp sessions and their configurations.

Session Operations
Create Session
POST /api/sessions

Create a new WhatsApp session. You can choose between Pairing Code or QR Code authentication method.

Parameter Type Required Description
sessionId String Yes Unique session identifier (alphanumeric + underscore only)
sessionName String Yes Friendly name for the session
authMethod String No Authentication method: "pairing" (default) or "qrcode"
phoneNumber String Conditional WhatsApp phone number (required for pairing method, 10-15 digits)
Authentication Methods

Pairing Code (Recommended): Secure authentication using phone number

  • Requires phone number input
  • Generates 8-digit pairing code
  • Enter code in WhatsApp → Settings → Linked Devices → Link with Phone Number
  • More secure and user-friendly

QR Code (Classic): Traditional WhatsApp Web authentication

  • No phone number required
  • Generates QR code to scan
  • Use WhatsApp → Settings → Linked Devices → Link a Device → Scan QR Code
  • Compatible with all devices
Examples

Create Session with Pairing Code (Default):

{
  "sessionId": "personal",
  "sessionName": "Personal WhatsApp",
  "phoneNumber": "628123456789",
  "authMethod": "pairing"
}

Create Session with QR Code:

{
  "sessionId": "business",
  "sessionName": "Business WhatsApp",
  "authMethod": "qrcode"
}
curl -X POST http://localhost:3000/api/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "personal",
    "sessionName": "Personal WhatsApp",
    "phoneNumber": "628123456789",
    "authMethod": "pairing"
  }'
{
  "success": true,
  "data": {
    "sessionId": "personal",
    "sessionName": "Personal WhatsApp",
    "phoneNumber": "628123456789",
    "authMethod": "pairing",
    "message": "Session created successfully"
  }
}
List All Sessions
GET /api/sessions

Get a list of all available sessions.

{
  "success": true,
  "data": [
    {
      "sessionId": "personal",
      "sessionName": "Personal WhatsApp",
      "phoneNumber": "628123456789",
      "connected": true,
      "ownNumber": "628123456789",
      "createdAt": "2025-01-16T10:00:00.000Z",
      "pairingCode": null
    },
    {
      "sessionId": "business",
      "sessionName": "Business WhatsApp",
      "phoneNumber": "628987654321",
      "connected": false,
      "ownNumber": null,
      "createdAt": "2025-01-16T10:05:00.000Z",
      "pairingCode": "ABC-DEF"
    }
  ]
}
Delete Session
DELETE /api/sessions/{sessionId}

Delete a session and all its associated data.

curl -X DELETE http://localhost:3000/api/sessions/personal
{
  "success": true,
  "data": {
    "sessionId": "personal",
    "message": "Session deleted successfully"
  }
}
Restart Session
POST /api/sessions/{sessionId}/restart

Restart a session if it's experiencing connection issues.

curl -X POST http://localhost:3000/api/sessions/personal/restart
{
  "success": true,
  "data": {
    "sessionId": "personal",
    "message": "Session restarted successfully"
  }
}
Update Session Phone Number
PUT /api/sessions/{sessionId}/phone-number

Update the phone number for an existing session.

Parameter Type Required Description
phoneNumber String Yes New WhatsApp phone number (10-15 digits)
{
  "phoneNumber": "628987654321"
}
curl -X PUT http://localhost:3000/api/sessions/personal/phone-number \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "628987654321"
  }'
{
  "success": true,
  "data": {
    "sessionId": "personal",
    "phoneNumber": "628987654321",
    "message": "Phone number updated successfully"
  }
}
Get Session Pairing Code
GET /api/sessions/{sessionId}/pairing-code

Get the current pairing code for a session.

{
  "success": true,
  "data": {
    "sessionId": "personal",
    "pairingCode": "ABC-DEF",
    "phoneNumber": "628123456789",
    "connected": false
  }
}
Request New Pairing Code
POST /api/sessions/{sessionId}/request-pairing-code

Generate a new pairing code for a session that is not yet connected.

curl -X POST http://localhost:3000/api/sessions/personal/request-pairing-code
{
  "success": true,
  "data": {
    "sessionId": "personal",
     "pairingCode": "A1B2C3D4",
     "phoneNumber": "628123456789",
     "message": "New pairing code generated"
  }
}
Generate QR Code (For QR Auth Method)
GET /api/sessions/{sessionId}/qr-code

Get the current QR code for sessions using QR code authentication method.

curl -X GET http://localhost:3000/api/sessions/business/qr-code
{
   "success": true,
   "data": {
     "sessionId": "business",
     "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
     "authMethod": "qrcode",
     "connected": false
   }
 }
QR Code Usage
  • QR code is returned as a data URL that can be displayed directly in img src
  • Open WhatsApp → Settings → Linked Devices → Link a Device → Scan QR Code
  • QR codes expire and refresh automatically
  • Listen to 'qr-code' WebSocket event for real-time updates
Error Responses
{
   "success": false,
   "error": "Session is already connected"
 }
{
   "success": false,
   "error": "Phone number not set for this session"
 }
{
   "success": false,
   "error": "Cannot generate pairing code at this time"
 }
{
   "success": false,
   "error": "Pairing code request already in progress"
 }
Status Operations

Send WhatsApp statuses from specific sessions.

Send Status
Send Text Status
POST /api/sessions/{sessionId}/send-status
Parameter Type Required Description
type String Yes Status type: "text", "image", or "video"
content String Yes For text: message content. For image/video: filename from upload
caption String No Caption for image/video status (ignored for text)
targetNumbers String No Comma-separated phone numbers (with country code, no +)
{
  "type": "text",
  "content": "Hello World! 👋 This is my status update from personal account",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "text",
    "content": "Hello from personal account! 👋",
    "targetNumbers": "628123456789,628987654321"
  }'
{
  "success": true,
  "data": {
    "statusId": "1704067200000",
    "message": "Status successfully sent to WhatsApp",
    "waMessageId": "3EB0C78C1A4A5B2D8F9E",
    "contactCount": 2
  }
}
Send Image Status
POST /api/sessions/{sessionId}/send-status
Parameter Type Required Description
type String Yes Status type: "text", "image", or "video"
content String Yes For text: message content. For image/video: filename from upload
caption String No Caption for image/video status (ignored for text)
targetNumbers String No Comma-separated phone numbers (with country code, no +)
{
  "type": "image",
  "content": "1704067200000-vacation.jpg",
  "caption": "Amazing sunset at the beach! 🌅",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "image",
    "content": "1704067200000-vacation.jpg",
    "caption": "Amazing sunset! 🌅",
    "targetNumbers": "628123456789"
  }'
{
  "success": true,
  "data": {
    "statusId": "1704067200000",
    "message": "Status successfully sent to WhatsApp",
    "waMessageId": "3EB0C78C1A4A5B2D8F9E",
    "contactCount": 2
  }
}
Send Video Status
POST /api/sessions/{sessionId}/send-status
Parameter Type Required Description
type String Yes Status type: "text", "image", "video", or "url"
content String Yes For text: message content. For image/video: filename from upload. For url: direct media URL
caption String No Caption for image/video/url status (ignored for text)
targetNumbers String No Comma-separated phone numbers (with country code, no +)
{
  "type": "video",
  "content": "1704067200000-funny-clip.mp4",
  "caption": "Check out this funny moment! 😂",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "video",
    "content": "1704067200000-funny-clip.mp4",
    "caption": "Check this out! 😂",
    "targetNumbers": "628123456789"
  }'
{
  "success": true,
  "data": {
    "statusId": "1704067200000",
    "message": "Status successfully sent to WhatsApp",
    "waMessageId": "3EB0C78C1A4A5B2D8F9E",
    "contactCount": 2
  }
}
Send URL Media Status
POST /api/sessions/{sessionId}/send-status
Parameter Type Required Description
type String Yes Status type: "text", "image", "video", or "url"
content String Yes For text: message content. For image/video: filename from upload. For url: direct media URL
caption String No Caption for image/video/url status (ignored for text)
targetNumbers String No Comma-separated phone numbers (with country code, no +)
{
  "type": "url",
  "content": "https://example.com/beautiful-image.jpg",
  "caption": "Check out this amazing photo! 📸",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "url",
    "content": "https://example.com/beautiful-image.jpg",
    "caption": "Check out this amazing photo! 📸",
    "targetNumbers": "628123456789"
  }'
{
  "success": true,
  "data": {
    "statusId": "1704067200000",
    "message": "Status successfully sent to WhatsApp",
    "waMessageId": "3EB0C78C1A4A5B2D8F9E",
    "contactCount": 2
  }
}
URL Media Features
  • No Download Required: Media is sent directly from URL without local storage
  • Supported Formats: JPG, PNG, GIF, WebP, BMP, MP4, AVI, MOV, WMV, FLV, MKV, WEBM
  • Automatic Detection: System automatically detects if URL is image or video
  • Fallback Handling: Unknown media types are sent as text with URL
  • Storage Efficient: Only URL is stored in database, no local files
Important Notes
  • Phone numbers must include country code (e.g., 628123456789 for Indonesia)
  • For image/video: Upload file first, then use returned filename in content
  • If targetNumbers is empty, status will be sent only to your number
  • Caption parameter is ignored for text status
Manage Statuses
Get Session Sent Statuses
GET /api/sessions/{sessionId}/sent-statuses

Get all statuses sent from a specific session, sorted by newest first.

curl -X GET http://localhost:3000/api/sessions/personal/sent-statuses
{
  "success": true,
  "data": [
    {
      "id": "1704067200000",
      "type": "text",
      "content": "Hello World! 👋",
      "caption": "",
      "timestamp": "2025-01-16T12:00:00.000Z",
      "waMessageId": "3EB0C78C1A4A5B2D8F9E",
      "contactCount": 2,
      "targetNumbers": "628123456789, 628987654321"
    },
    {
      "id": "1704066600000",
      "type": "image",
      "content": "1704066600000-vacation.jpg",
      "caption": "Amazing sunset! 🌅",
      "timestamp": "2025-01-16T11:50:00.000Z",
      "waMessageId": "2DA1B79D2C5F7E3A1B4C",
      "contactCount": 1,
      "targetNumbers": "628123456789"
  }
  ]
}
Get Session Status Viewers
GET /api/sessions/{sessionId}/status-viewers/{statusId}

Get list of viewers for a specific status from a session.

Parameter Type Description
sessionId String Session ID that sent the status
statusId String Status ID to get viewers for
curl -X GET http://localhost:3000/api/sessions/personal/status-viewers/1704067200000
{
  "success": true,
  "data": [
    {
      "jid": "628123456789@s.whatsapp.net",
      "number": "628123456789",
      "viewedAt": "2025-01-16T12:05:00.000Z",
      "isReal": true
    },
    {
      "jid": "628987654321@s.whatsapp.net", 
      "number": "628987654321",
      "viewedAt": "2025-01-16T12:10:00.000Z",
      "isReal": true
    }
  ]
}
Delete Session Status
DELETE /api/sessions/{sessionId}/delete-status/{statusId}

Delete status from local database and remove associated media file.

Parameter Type Description
sessionId String Session ID that owns the status
statusId String Status ID to delete
curl -X DELETE http://localhost:3000/api/sessions/personal/delete-status/1704067200000
{
  "success": true,
  "data": {
    "statusId": "1704067200000",
    "message": "Status removed from local database successfully",
    "deletedFromWhatsApp": false,
    "deletedFromDatabase": true,
    "deletedImageFile": true,
    "note": "Status remains visible in WhatsApp app until natural 24-hour expiry"
  }
}
Important Note

WhatsApp API does not support deleting published statuses from WhatsApp servers. This only removes the status from local database and deletes associated media files.

Get Session Connection Status
GET /api/sessions/{sessionId}/connection-status

Check connection status, authentication method, codes, and own number for a specific session.

curl -X GET http://localhost:3000/api/sessions/personal/connection-status
{
  "success": true,
  "data": {
    "sessionId": "personal",
    "connected": true,
    "authMethod": "pairing",
    "pairingCode": null,
    "qrCode": null,
    "phoneNumber": "628123456789",
    "ownNumber": "628123456789"
  }
}
Response Fields
  • authMethod: Either "pairing" or "qrcode"
  • pairingCode: Current pairing code (null if connected or using QR)
  • qrCode: Current QR code data URL (null if connected or using pairing)
  • phoneNumber: Phone number for pairing method
  • ownNumber: Connected WhatsApp number
Error Handling
Common Error Responses
{
  "success": false,
  "error": "WhatsApp is not connected"
}
{
  "success": false,
  "error": "Session not found"
}
{
  "success": false,
  "error": "Only image and video files are allowed"
}
Common HTTP Status Codes
  • 200: Success - Request completed successfully
  • 400: Bad Request - Missing required parameters, invalid file type
  • 404: Not Found - Session or status not found
  • 500: Internal Server Error - WhatsApp not connected, server error
File Upload

Upload image and video files for status. These files are stored and associated with statuses.

Upload Image
Upload Image
POST /api/upload-image

Upload an image file for status. Required before sending image status. Uploaded files are stored in the uploads folder with timestamp prefix.

Parameter Type Required Description
image File Yes Image file (max 50MB, image/* formats only)
Supported Formats & Limits
  • Formats: JPEG, PNG, GIF, WebP, BMP, and other image/* MIME types
  • Maximum Size: 50MB per image file
  • Recommended: Keep images under 16MB for optimal WhatsApp status compatibility
  • Note: Large images may be automatically compressed by WhatsApp
curl -X POST http://localhost:3000/api/upload-image \
  -F "image=@/path/to/your/image.jpg"
const formData = new FormData();
formData.append('image', imageFile);

fetch('/api/upload-image', {
  method: 'POST',
  body: formData
}).then(response => response.json())
  .then(data => console.log(data));
{
  "success": true,
   "filename": "1704067200000-vacation.jpg"
}
{
   "success": false,
   "error": "No file uploaded"
 }
{
   "success": false,
   "error": "Only image and video files are allowed"
 }
{
   "success": false,
   "error": "File too large"
 }
Usage Flow
  • Upload image using this endpoint
  • Save the returned filename
  • Use filename in /api/sessions/{sessionId}/send-status with type "image"
Upload Video
Upload Video
POST /api/upload-video

Upload a video file for status. Required before sending video status. Supports various video formats.

Parameter Type Required Description
video File Yes Video file (max 50MB, video/* formats: MP4, AVI, MOV, etc.)
Supported Formats & Limits
  • Formats: MP4, AVI, MOV, WMV, FLV, MKV, WEBM, and other common video formats
  • Maximum Size: 50MB per video file
  • Recommended: Keep videos under 30MB for better performance
  • Duration: WhatsApp typically supports videos up to 16MB for status
curl -X POST http://localhost:3000/api/upload-video \
  -F "video=@/path/to/your/video.mp4"
const formData = new FormData();
formData.append('video', videoFile);

fetch('/api/upload-video', {
    method: 'POST',
    body: formData
}).then(response => response.json())
  .then(data => console.log(data));
{
  "success": true,
  "filename": "1754584840613-video.mp4"
}
{
  "success": false,
  "error": "File size exceeds 50MB limit"
}
Important Notes
  • Large video files may take longer to upload and process. Consider compressing videos before upload for better user experience.
  • Videos are automatically processed for WhatsApp compatibility
  • Upload progress is not tracked via API - consider implementing client-side progress tracking
WebSocket Events

Real-time events for all sessions. All events include sessionId to identify which session triggered the event.

Connection
ws://localhost:3000/socket.io/

Connect to this WebSocket endpoint to receive events for all sessions.

Events You Can Listen To
pairing-code

Emitted when pairing code is generated for WhatsApp connection. Listen to this for displaying pairing codes to users.

{
   "sessionId": "personal",
   "pairingCode": "A1B2C3D4",
   "phoneNumber": "628123456789",
   "authMethod": "pairing"
 }
pairing-code-error

Emitted when there's an error generating pairing code for a session.

{
   "sessionId": "personal",
   "error": "Connection Closed"
 }
qr-code

Emitted when QR code is generated for WhatsApp connection (for sessions using QR authentication).

{
   "sessionId": "business",
   "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
   "authMethod": "qrcode"
 }
qr-code-error

Emitted when there's an error generating QR code for a session.

{
   "sessionId": "business",
   "error": "Failed to generate QR code"
 }
connection-status

Emitted when WhatsApp connection status changes for any session.

{
   "sessionId": "personal",
  "connected": true,
   "status": "open",
   "ownNumber": "628123456789"
}
status-sent

Emitted when a status is successfully sent from any session.

{
   "sessionId": "personal",
   "statusId": "1704067200000",
  "type": "text",
   "content": "Hello World! 👋",
  "caption": "",
   "timestamp": "2025-01-16T12:00:00.000Z",
  "waMessageId": "3EB0C78C1A4A5B2D8F9E"
}
status-viewers-update

Emitted when someone views a status from any session. Real-time viewer tracking.

{
   "sessionId": "personal",
   "statusId": "1704067200000",
  "viewers": [
    {
       "jid": "628123456789@s.whatsapp.net",
       "number": "628123456789",
       "viewedAt": "2025-01-16T12:05:00.000Z",
      "isReal": true
    }
  ]
}
session-created

Emitted when a new session is created.

{
   "sessionId": "marketing",
   "sessionName": "Marketing Campaign",
   "phoneNumber": "628111222333",
   "authMethod": "pairing",
   "createdAt": "2025-01-16T10:00:00.000Z"
 }
session-deleted

Emitted when a session is deleted.

{
   "sessionId": "marketing"
 }
statuses-updated

Emitted when statuses are cleaned up (expired after 24 hours) or when status list changes.

{
   "sessionId": "personal",
   "message": "Statuses updated",
   "action": "cleanup"
 }
status-deleted

Emitted when a status is manually deleted by user from any session.

{
   "sessionId": "personal",
   "statusId": "1704067200000"
}
JavaScript Example (Listen to All Sessions)
const socket = io('http://localhost:3000');

// Listen to pairing code events
socket.on('pairing-code', (data) => {
  console.log(`Pairing code for ${data.sessionId}: ${data.pairingCode}`);
  // Display pairing code to user
  document.getElementById('pairing-code-display').textContent = data.pairingCode;
});

// Listen to QR code events
socket.on('qr-code', (data) => {
  console.log(`QR code for ${data.sessionId} generated`);
  // Display QR code to user
  document.getElementById('qr-code-display').src = data.qrCode;
});

// Listen to connection status changes
socket.on('connection-status', (data) => {
  console.log(`Session ${data.sessionId} connection:`, data.connected);
  if (data.connected) {
    console.log(`Connected as: ${data.ownNumber}`);
  }
});

// Listen to status sent confirmations
socket.on('status-sent', (data) => {
  console.log(`Status sent from ${data.sessionId}:`, data.statusId);
});

// Listen to real-time viewer updates
socket.on('status-viewers-update', (data) => {
  console.log(`New viewer for ${data.sessionId} status ${data.statusId}:`, data.viewers);
  // Update viewer count in UI
  updateViewerCount(data.statusId, data.viewers.length);
});

// Listen to session management events
socket.on('session-created', (data) => {
  console.log('New session created:', data.sessionId);
  // Refresh session list
  loadSessions();
});

socket.on('session-deleted', (data) => {
  console.log('Session deleted:', data.sessionId);
  // Remove from UI and refresh session list
  loadSessions();
});
Filter Events by Session
// Filter events for specific session only
socket.on('connection-status', (data) => {
  if (data.sessionId === 'personal') {
    // Handle connection status for personal session only
    updatePersonalSessionStatus(data.connected);
  }
});

socket.on('pairing-code', (data) => {
  if (data.sessionId === currentSessionId) {
    // Show pairing code only for currently selected session
    showPairingCode(data.pairingCode, data.phoneNumber);
  }
});

// Or create a helper function
function handleSessionEvent(eventName, callback) {
  socket.on(eventName, (data) => {
    if (data.sessionId === getCurrentSessionId()) {
      callback(data);
    }
  });
}

// Usage
handleSessionEvent('status-sent', (data) => {
  showSuccessMessage(`Status sent: ${data.statusId}`);
});

handleSessionEvent('status-viewers-update', (data) => {
  updateViewersDisplay(data.statusId, data.viewers);
});
Multi-Session Support

All WebSocket events include sessionId field, allowing you to build interfaces that handle multiple WhatsApp accounts simultaneously.

  • Filter events by sessionId to handle specific sessions
  • Create session-specific UI components that react to their own events
  • Build dashboards that monitor all sessions at once
  • Implement real-time notifications for session-specific activities
Real-time Features
  • Pairing codes and QR codes are generated automatically when sessions start
  • Connection status updates happen in real-time
  • Viewer detection is immediate when someone views your status
  • Status cleanup occurs automatically after 24 hours
  • Authentication codes refresh automatically on expiry
  • Session management events provide instant feedback
Utility Endpoints

Endpoints for general utility and information.

Health Check
Health Check
GET /api/health

Check if the API server is running and healthy.

{
  "success": true,
  "data": {
    "status": "healthy",
    "timestamp": "2025-01-16T10:30:00.000Z",
    "uptime": 3600.5,
    "version": "1.0.0"
  }
}
API Statistics
API Statistics
GET /api/stats

Get comprehensive API statistics including total statuses sent, viewers, and connection status from all sessions.

{
  "success": true,
  "data": {
    "totalSessions": 3,
    "connectedSessions": 2,
    "totalStatuses": 25,
    "totalViewers": 87,
    "lastStatusSent": "2025-01-16T14:30:00.000Z",
    "sessions": [
      {
        "sessionId": "personal",
        "sessionName": "Personal WhatsApp",
        "connected": true,
        "ownNumber": "628123456789",
        "createdAt": "2025-01-16T10:00:00.000Z"
      },
      {
        "sessionId": "business",
        "sessionName": "Business WhatsApp",
        "connected": true,
        "ownNumber": "628987654321",
        "createdAt": "2025-01-16T10:15:00.000Z"
      },
      {
        "sessionId": "marketing",
        "sessionName": "Marketing Campaign",
        "connected": false,
        "ownNumber": null,
        "createdAt": "2025-01-16T11:00:00.000Z"
      }
    ]
  }
}
Workflow Examples

Example use cases for sending statuses and managing sessions.

Sending a Text Status
Example
{
  "type": "text",
  "content": "Hello World! 👋 This is my status update from personal account",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "text",
    "content": "Hello from personal account! 👋",
    "targetNumbers": "628123456789,628987654321"
  }'
Sending an Image Status
Example
{
  "type": "image",
  "content": "1704067200000-vacation.jpg",
  "caption": "Amazing sunset at the beach! 🌅",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "image",
    "content": "1704067200000-vacation.jpg",
    "caption": "Amazing sunset! 🌅",
    "targetNumbers": "628123456789"
  }'
Sending a Video Status
Example
{
  "type": "video",
  "content": "1704067200000-funny-clip.mp4",
  "caption": "Check out this funny moment! 😂",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "video",
    "content": "1704067200000-funny-clip.mp4",
    "caption": "Check this out! 😂",
    "targetNumbers": "628123456789"
  }'
Sending a URL Media Status
Example
{
  "type": "url",
  "content": "https://example.com/beautiful-image.jpg",
  "caption": "Amazing sunset at the beach! 🌅",
  "targetNumbers": "628123456789,628987654321"
}
curl -X POST http://localhost:3000/api/sessions/personal/send-status \
  -H "Content-Type: application/json" \
  -d '{
    "type": "url",
    "content": "https://example.com/beautiful-image.jpg",
    "caption": "Amazing sunset! 🌅",
    "targetNumbers": "628123456789"
  }'
Managing Multiple Sessions
Example
{
  "sessionId": "personal",
  "sessionName": "Personal WhatsApp",
  "phoneNumber": "628123456789"
}
curl -X POST http://localhost:3000/api/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "personal",
    "sessionName": "Personal WhatsApp",
    "phoneNumber": "628123456789"
  }'
curl -X GET http://localhost:3000/api/sessions
curl -X DELETE http://localhost:3000/api/sessions/personal