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.
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:
process.env.WHATSAPP_API_KEY). Never expose your secret key inside client-side React/Next.js components, browser scripts, or public GitHub repositories.Always pass numbers in E.164 numerical format without leading zeros or plus signs (+).
| Country / Region | Input Example | Required API Format |
|---|---|---|
| India (91) | 098765 43210 or +91-9876543210 | 919876543210 |
| United States (1) | +1 (555) 234-5678 | 15552345678 |
| United Kingdom (44) | +44 7911 123456 | 447911123456 |
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."
}'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."
}'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.
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"
}'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.
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
}
}'Query the real-time delivery receipt and provider ID of any message sent through your tenant account.
Rate Limits & Concurrency
To protect connected WhatsApp accounts against spam restrictions and socket flooding, the API implements automatic rate throttling:
100 requests / minute per tenant API key. If exceeded, the server responds with 429 Too Many Requests.
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 Code | HTTP Status | Description / Resolution |
|---|---|---|
| API_KEY_REQUIRED | 401 | The `x-api-key` or Bearer header was missing. Include your API key. |
| INVALID_API_KEY | 401 | The API key provided does not match any active tenant key in the database. |
| WHATSAPP_NOT_CONNECTED | 400 | No WhatsApp session is currently in CONNECTED status. Scan QR in dashboard. |
| MISSING_RECIPIENT | 400 | The `phone` field was empty or could not be resolved. |
| MISSING_MESSAGE | 400 | The `message` content is empty. |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests sent in one minute. Back off and retry. |