đQuick Start Guide
Prerequisites
- âSyncWABA account with Scale or Enterprise plan (API access not available on Free/Start plans)
- âWhatsApp Business Number connected
- âAPI key from Dashboard â Settings â API Keys
5-Minute Setup
Get Your API Key
Navigate to Dashboard â Settings â API Keys â Generate New Key
Make Your First API Call
Send a test message using the code example below
Configure Webhooks (Optional)
Set up webhook URL to receive message status updates
curl -X POST https://app.syncwaba.com/api/integrations/messages/send \
-H "X-API-Key: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "+919876543210",
"type": "template",
"templateName": "welcome_message",
"templateVariables": {
"1": "John"
},
"category": "utility"
}'Testing Tip
Use our Postman collection to test all endpoints interactively. Download it from the button above!
đAuthentication
SyncWABA API uses API key authentication. Include your API key in the X-API-Key header with every request.
Get Your API Key
- Log in to your SyncWABA dashboard
- Navigate to Settings â API Keys
- Click "Generate New Key"
- Give your key a name (e.g., "Production API")
- Copy and securely store the key (shown only once)
Authentication Header
X-API-Key: sk_live_your_api_key_here
Security Best Practices
- âĸ Never expose API keys in client-side code or public repositories
- âĸ Use environment variables to store API keys
- âĸ Rotate API keys periodically
- âĸ Create separate keys for development and production
đBase URL & Configuration
API Base URL
https://app.syncwaba.com
All API endpoints are relative to this base URL.
âĄRate Limits
| Endpoint Type | Rate Limit |
|---|---|
| Account endpoints | 10 requests/minute |
| Message endpoints | 60 requests/minute |
| Flow endpoints | 30 requests/minute |
| Contact endpoints | 30 requests/minute |
| Template endpoints | 30 requests/minute |
Rate Limit Headers
Check the X-RateLimit-Remaining and X-RateLimit-Reset response headers to monitor your usage.
đŦSend Messages
Send Template Message
Send an approved WhatsApp template message. Use this for marketing, authentication, or utility messages.
/api/integrations/messages/sendRequest Headers
Content-Type: application/json X-API-Key: sk_live_your_api_key_here
Request Body
{
"to": "+919876543210",
"type": "template",
"templateName": "welcome_message",
"templateVariables": {
"1": "John",
"2": "Premium Plan"
},
"category": "utility"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| to | string | Required | Phone number in E.164 format (+91XXXXXXXXXX) |
| type | string | Required | Message type: template |
| templateName | string | Required | Name of approved WhatsApp template |
| templateVariables | object | Optional | Variables for template placeholders (1-indexed) |
| category | string | Required | authentication, marketing, utility, or service |
Success Response (200 OK)
{
"success": true,
"data": {
"message_id": "msg_1234567890abcdef",
"to": "+919876543210",
"status": "sent",
"template_name": "welcome_message",
"category": "utility",
"cost": {
"amount": 0.115,
"currency": "INR",
"pricing_category": "utility"
},
"sent_at": "2025-12-22T10:30:00Z"
}
}Code Examples
const axios = require('axios');
const sendMessage = async () => {
try {
const response = await axios.post(
'https://app.syncwaba.com/api/integrations/messages/send',
{
to: '+919876543210',
type: 'template',
templateName: 'welcome_message',
templateVariables: {
'1': 'John',
'2': 'Premium Plan'
},
category: 'utility'
},
{
headers: {
'X-API-Key': 'sk_live_your_api_key_here',
'Content-Type': 'application/json'
}
}
);
console.log('Message sent:', response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
};
sendMessage();import requests
def send_message():
url = 'https://app.syncwaba.com/api/integrations/messages/send'
headers = {
'X-API-Key': 'sk_live_your_api_key_here',
'Content-Type': 'application/json'
}
payload = {
'to': '+919876543210',
'type': 'template',
'templateName': 'welcome_message',
'templateVariables': {
'1': 'John',
'2': 'Premium Plan'
},
'category': 'utility'
}
response = requests.post(url, json=payload, headers=headers)
print('Message sent:', response.json())
send_message()<?php
$url = 'https://app.syncwaba.com/api/integrations/messages/send';
$data = [
'to' => '+919876543210',
'type' => 'template',
'templateName' => 'welcome_message',
'templateVariables' => [
'1' => 'John',
'2' => 'Premium Plan'
],
'category' => 'utility'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: sk_live_your_api_key_here',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>Get Message Status
Track the delivery status of a sent message.
/api/integrations/messages/status/:messageIdPath Parameters
| Parameter | Description |
|---|---|
| messageId | Message ID returned from send message endpoint |
Success Response (200 OK)
{
"success": true,
"data": {
"message_id": "msg_1234567890abcdef",
"status": "delivered",
"to": "+919876543210",
"sent_at": "2025-12-22T10:30:00Z",
"delivered_at": "2025-12-22T10:30:15Z",
"read_at": null,
"template_name": "welcome_message",
"cost": 0.115
}
}Message Status Values
đWebhooks
Webhooks allow you to receive real-time notifications about message events. Configure your webhook URL in Dashboard â Settings â Webhooks.
Webhook Configuration
- Create a webhook endpoint on your server (e.g.,
https://yoursite.com/webhooks/syncwaba) - Configure the URL in SyncWABA Dashboard
- Verify endpoint responds with 200 OK
- Handle events based on
eventfield
Webhook Events
Webhook Payload Format
{
"event": "message.delivered",
"timestamp": "2025-12-22T10:30:15Z",
"data": {
"message_id": "msg_1234567890abcdef",
"recipient": "+919876543210",
"status": "delivered",
"delivered_at": "2025-12-22T10:30:15Z"
}
}Implementation Example (Node.js)
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhooks/syncwaba', async (req, res) => {
const { event, timestamp, data } = req.body;
// Handle different event types
switch (event) {
case 'message.delivered':
console.log('Message delivered:', data.message_id);
await updateMessageStatus(data.message_id, 'delivered');
break;
case 'message.incoming':
console.log('Incoming message from:', data.from);
await forwardToLiveChat(data);
break;
case 'flow.submitted':
console.log('Flow submitted:', data.submission_id);
await processFormData(data.form_data);
break;
}
// Always respond with 200 OK
res.status(200).json({ success: true });
});
app.listen(3000);Important Notes
- âĸ Your endpoint must respond within 5 seconds
- âĸ Always return 200-299 status code
- âĸ Process webhooks asynchronously (use queue)
- âĸ Implement idempotency (check duplicate events)
- âĸ We retry failed webhooks 3 times with exponential backoff
đ°Message Pricing
WhatsApp message pricing varies by category. All prices are in Indian Rupees (INR).
| Message Category | Price per Message | Use Case |
|---|---|---|
| Authentication | âš0.115 | OTPs, password resets, account verification |
| Utility | âš0.115 | Order updates, appointment reminders, alerts |
| Marketing | âš0.7846 | Promotional campaigns, offers, newsletters |
| Service | âš0 (Free) | Replies within 24-hour window |
24-Hour Service Window
When a user messages you first, you have 24 hours to reply for FREE using service messages. After 24 hours, use template messages with appropriate categories.