v1.0.0 REST API

Developer API & Webhook Guide

Integrate your applications, CRMs, and backend services directly with your WhatsApp Web QR bridge.

Base API Endpoint: https://wordpress.hyperofficial.in/api/v1

Authentication

All requests to protected API endpoints require an API token sent in the Authorization header using the Bearer scheme. You can create API keys in your User Dashboard.

Authorization: Bearer YOUR_API_KEY
Never share your API key publicly or commit it into client-side code or public version control repositories.

WhatsApp Sessions & QR

Initialize your WhatsApp session or retrieve the live QR code for external software display.

1. Create / Initialize Session
POST /api/v1/whatsapp/session
curl -X POST "https://wordpress.hyperofficial.in/api/v1/whatsapp/session" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
2. Fetch QR Code
GET /api/v1/whatsapp/session/{session_id}/qr
curl -X GET "https://wordpress.hyperofficial.in/api/v1/whatsapp/session/YOUR_SESSION_ID/qr" \
  -H "Authorization: Bearer YOUR_API_KEY"

Returns a base64 encoded PNG Data URL in the qr field ready to render directly inside an <img src="..."> element.

Send Text Message

POST /api/v1/messages/send
cURL Request Example:
curl -X POST "https://wordpress.hyperofficial.in/api/v1/messages/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+919876543210",
    "message": "Hello! Your verification code is 849201."
  }'
PHP (cURL) Example:
<?php
$payload = json_encode([
    'phone' => '+919876543210',
    'message' => 'Hello from PHP!'
]);

$ch = curl_init('https://wordpress.hyperofficial.in/api/v1/messages/send');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Success Response (200 OK):
{
  "success": true,
  "message_id": "3EB0C34B82A9",
  "status": "sent",
  "to": "919876543210",
  "timestamp": "2026-09-28T10:00:00Z"
}

Send Media Message

POST /api/v1/messages/media

Send images (JPG, PNG, WEBP), documents (PDF, DOCX, XLSX, ZIP), audio files (MP3), or videos (MP4).

curl -X POST "https://wordpress.hyperofficial.in/api/v1/messages/media" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "phone=+919876543210" \
  -F "caption=Here is your monthly invoice" \
  -F "file=@/path/to/invoice.pdf"

Group Messaging

POST /api/v1/groups/{group_id}/messages

Broadcast announcements and messages to synchronized WhatsApp groups.

curl -X POST "https://wordpress.hyperofficial.in/api/v1/groups/120363024829104820@g.us/messages" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Notice: Server maintenance will begin at midnight."
  }'

Webhooks & Events

When configured, your webhook endpoint will receive signed JSON HTTP POST payloads whenever events occur.

Supported Events:
  • message.received — Incoming message from a customer or group
  • message.sent — Outgoing message confirmed by WhatsApp
  • message.delivered — Message reached the recipient's phone (double tick)
  • message.read — Message opened and viewed (blue ticks)
  • session.connected — WhatsApp Web QR successfully linked
  • session.disconnected — WhatsApp Web disconnected
Webhook Signature Verification (PHP):
$secret = "YOUR_WEBHOOK_SECRET";
$rawPayload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';

$expectedSignature = hash_hmac('sha256', $rawPayload, $secret);

if (!hash_equals($expectedSignature, $signature)) {
    http_response_code(401);
    exit('Invalid signature');
}

$eventData = json_decode($rawPayload, true);
// Process event...

Error Codes

HTTP Status Code Description
401 UNAUTHORIZED Missing or invalid Bearer API token.
400 WHATSAPP_NOT_CONNECTED WhatsApp session is not currently paired or connected.
404 GROUP_NOT_FOUND The specified group ID does not exist for this account.
422 VALIDATION_ERROR Invalid request parameters or unsupported media type.
429 TOO_MANY_REQUESTS API rate limit exceeded. Please throttle your requests.