API Documentationv1.0.0 ยท REST & WebSockets
Swagger UI
High-Throughput WhatsApp Socket Integration

Developer REST API Reference

Integrate your website, e-commerce backend (Shopify, WooCommerce, custom Node.js, Python, Laravel, PHP), or CRM directly with our WhatsApp automation engine. Send automated order confirmations, promotional banners, OTP codes, lead alerts, and broadcast campaigns using your connected WhatsApp device.

Base Endpointhttps://apiwappsync.techgigs.in
Content Typeapplication/json
Response Envelope{ "success": boolean, ... }
1. Authentication

Every external API call must include your tenant API key. You can generate and rotate keys anytime from the Dashboard > API Keys screen.

Pass your key in either of the following HTTP headers:

x-api-key: wsa_live_your_copied_api_key_here
Authorization: Bearer wsa_live_your_copied_api_key_here
Security Rule: Store your API key exclusively on your backend server (e.g. process.env.WHATSAPP_API_KEY). Never expose your secret key inside client-side React/Next.js components, browser scripts, or public GitHub repositories.
Phone Number Formatting

Always pass numbers in E.164 numerical format without leading zeros or plus signs (+).

Country / RegionInput ExampleRequired API Format
India (91)098765 43210 or +91-9876543210919876543210
United States (1)+1 (555) 234-567815552345678
United Kingdom (44)+44 7911 123456447911123456
2. Send Text Message
POST /api/v1/send-message

Immediately dispatches an outbound text message to a WhatsApp recipient using your connected WhatsApp device.

curl -X POST \
  https://apiwappsync.techgigs.in/api/v1/send-message \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "phone": "919876543210",
    "message": "Hello Rahul, your order #ORD-1001 has been confirmed."
  }'
Success Response (HTTP 200 OK)Status: SENT
{ "success": true, "messageId": "msg_9f7b1945a823", "providerMessageId": "3EB0A1B2C3D4E5F6", "status": "SENT", "data": { "messageId": "msg_9f7b1945a823", "providerMessageId": "3EB0A1B2C3D4E5F6", "status": "SENT", "phone": "919876543210", "recipient": "919876543210" } }
3. Send Media & Promotional Images
POST /api/v1/send-message

Send images, brochures, flyers, or banners with an optional accompanying caption. Supports direct https:// URLs or Base64 data strings.

curl -X POST \
  https://apiwappsync.techgigs.in/api/v1/send-message \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "phone": "919876543210",
    "image": "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=800",
    "caption": "๐Ÿ”ฅ Exclusive weekend flash sale! Get 30% off with promo code SAVE30."
  }'
4. Website Form & Lead Alerts
POST /api/v1/notify

A streamlined endpoint designed specifically for website contact forms, quote requests, and job applicants. If no phone is provided, it automatically routes the alert to your configured administrator WhatsApp number.

Example: cURL Contact Form Webhook
curl -X POST https://apiwappsync.techgigs.in/api/v1/notify \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "type": "lead",
    "message": "๐Ÿ”” New Inquiry received from contact form: Rahul Sharma ([email protected]) interested in Enterprise Plan.",
    "phone": "919876543210"
  }'
5. Trigger Event Automations
POST /api/v1/events

Fire e-commerce triggers (such as order.created, order.shipped, or payment.received). The system matches the event to your customized dashboard template, automatically interpolates variables like {{customer.name}} and {{order.id}}, and delivers the message.

Payload Example
curl -X POST https://apiwappsync.techgigs.in/api/v1/events \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "event": "order.created",
    "customer": {
      "name": "Rahul Sharma",
      "phone": "919876543210"
    },
    "data": {
      "id": "ORD-1001",
      "product": "Sony WH-1000XM5 Headphones",
      "amount": 29990
    }
  }'
6. Check Delivery Status
GET /api/v1/client/messages/:id

Query the real-time delivery receipt and provider ID of any message sent through your tenant account.

curl -X GET https://apiwappsync.techgigs.in/api/v1/client/messages/msg_9f7b1945a823 \ -H "x-api-key: YOUR_API_KEY"
{ "success": true, "data": { "id": "msg_9f7b1945a823", "phone": "919876543210", "status": "DELIVERED", "providerMessageId": "3EB0A1B2C3D4E5F6", "direction": "OUTBOUND", "createdAt": "2026-10-05T10:00:00.000Z" } }

Rate Limits & Concurrency

To protect connected WhatsApp accounts against spam restrictions and socket flooding, the API implements automatic rate throttling:

Default Tenant Rate Limit

100 requests / minute per tenant API key. If exceeded, the server responds with 429 Too Many Requests.

Socket Jitter & Anti-Ban Throttling

Outbound WhatsApp messages sent in bulk include subtle jitter delays to mimic natural human typing behavior.

Error Codes Reference

When an API request fails, the response includes an HTTP error status code and a structured JSON payload with a descriptive error code:

Error CodeHTTP StatusDescription / Resolution
API_KEY_REQUIRED401The `x-api-key` or Bearer header was missing. Include your API key.
INVALID_API_KEY401The API key provided does not match any active tenant key in the database.
WHATSAPP_NOT_CONNECTED400No WhatsApp session is currently in CONNECTED status. Scan QR in dashboard.
MISSING_RECIPIENT400The `phone` field was empty or could not be resolved.
MISSING_MESSAGE400The `message` content is empty.
RATE_LIMIT_EXCEEDED429Too many requests sent in one minute. Back off and retry.