π Your API Key & Config
Everything below is pre-filled with your real values. Copy and use directly.
Live Configuration
π₯ Your Groups
Use these Group IDs in API calls β they never change, even if you rename the group.
π Authentication
Pass your API key as a header on every request.
Request Format
All POST endpoints accept either format β use whichever your tool supports:
| Format | Content-Type header | When to use |
|---|---|---|
JSON | application/json | curl, JavaScript fetch, Python, PHP, Postman |
Form data | application/x-www-form-urlencoded | n8n, Pabbly Connect, Ottokit, Make, Zapier, HTML forms |
groupIds[]=ID1&groupIds[]=ID2 or repeat the key: groupIds=ID1&groupIds=ID2π± List Instances
curl -X GET https://sevenoways.app/api/instances \ -H "x-api-key: YOUR_API_KEY"
β Create Instance
curl -X POST https://sevenoways.app/api/instances \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"instanceId":"number2","label":"Second Line"}'
https://sevenoways.app/api/instances/{id}/qr in your browser and scan the QR code.ποΈ Delete Instance
π₯ List Groups
curl https://sevenoways.app/api/instances/INSTANCE_ID/groups \ -H "x-api-key: YOUR_API_KEY"
π¬ Send Text to Groups
groupIds β more reliable than names (works even if group is renamed).| Field | Type | Notes |
|---|---|---|
| instanceId | string | required Which number to send from |
| groupIds | array | recommended Array of Group IDs (e.g. 120363...@g.us) |
| groups | array | optional Array of group names (case-insensitive). Use if you don't know the ID. |
| sendAll | boolean | optional true = send to ALL groups |
| message | string | required |
curl -X POST https://sevenoways.app/api/send \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "groupIds": ["GROUP_ID_HERE"], "message": "Hello everyone! π" }'
curl -X POST https://sevenoways.app/api/send \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "groups": ["Group Name Here"], "message": "Hello everyone! π" }'
-d '{
"instanceId": "INSTANCE_ID",
"sendAll": true,
"message": "Broadcast to everyone!"
}'
πΌοΈ Send Image to Groups
-d '{
"instanceId": "INSTANCE_ID",
"groupIds": ["GROUP_ID_HERE"],
"imageUrl": "https://example.com/banner.jpg",
"caption": "Check this out!"
}'
π Send Document to Groups
-d '{
"instanceId": "INSTANCE_ID",
"groupIds": ["GROUP_ID_HERE"],
"fileUrl": "https://example.com/report.pdf",
"filename": "Monthly Report.pdf",
"mimetype": "application/pdf"
}'
π Send Text to Number
+, no spaces.π¦πͺ UAE:
971501234567 | π¬π§ UK: 447911123456 | πΊπΈ US: 12125551234curl -X POST https://sevenoways.app/api/send-number \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "phone": "971501234567", "message": "Hello! Your order is ready π" }'
πΌοΈ Send Image to Number
-d '{
"instanceId": "INSTANCE_ID",
"phone": "971501234567",
"imageUrl": "https://example.com/invoice.png",
"caption": "Your invoice"
}'
π Send Document to Number
-d '{
"instanceId": "INSTANCE_ID",
"phone": "971501234567",
"fileUrl": "https://example.com/contract.pdf",
"filename": "Contract.pdf"
}'
π WhatsApp Communities
Send messages to WhatsApp Communities your number is connected to. Communities are automatically discovered from your connected instance β no setup required.
@newsletter (e.g. 120363XXXXXXXX@newsletter).
You can find them from your dashboard under βοΈ Send β π Communities tab.
π¬ Send Text to Community
| Field | Type | Required | Description |
|---|---|---|---|
| instanceId | string | required | Your WhatsApp instance ID |
| communityId | string | required | Community JID (ends with @newsletter) |
| message | string | required | Text message (max 4096 chars) |
curl -X POST https://sevenoways.app/api/send-to-community \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "communityId": "120363XXXXXXXX@newsletter", "message": "π£ Community update: New features released!" }'
{
"success": true,
"queued": true,
"queueId": 142
}
πΌοΈ Send Image to Community
| Field | Type | Required | Description |
|---|---|---|---|
| instanceId | string | required | Your WhatsApp instance ID |
| communityId | string | required | Community JID |
| imageUrl | string | required | Public image URL (http/https) |
| caption | string | optional | Image caption text |
curl -X POST https://sevenoways.app/api/send-image-to-community \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "communityId": "120363XXXXXXXX@newsletter", "imageUrl": "https://example.com/banner.jpg", "caption": "Check out our new product! π" }'
π Send Document to Community
| Field | Type | Required | Description |
|---|---|---|---|
| instanceId | string | required | Your WhatsApp instance ID |
| communityId | string | required | Community JID |
| fileUrl | string | required | Public document URL (http/https) |
| filename | string | required | Filename shown in WhatsApp (e.g. report.pdf) |
| mimetype | string | optional | MIME type (e.g. application/pdf) |
curl -X POST https://sevenoways.app/api/send-document-to-community \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "communityId": "120363XXXXXXXX@newsletter", "fileUrl": "https://example.com/newsletter.pdf", "filename": "Community-Update.pdf" }'
π’ WhatsApp Channels
Send broadcast messages to WhatsApp Channels (Newsletters). Unlike communities, channels are one-way broadcasts β only admins/owners can post, followers only receive.
120363XXXXXXXX@newsletterGet your channel JID from the dashboard: βοΈ Send β π’ Channels β Add Channel by pasting the invite link.
ποΈ Manage Saved Channels
curl -X GET https://sevenoways.app/api/channels \ -H "x-api-key: YOUR_API_KEY"
{
"success": true,
"channels": [
{
"id": "ch_abc123",
"channelJid": "120363XXXXXXXX@newsletter",
"name": "My Brand Updates",
"description": "Latest news from our brand",
"subscribers": 4820,
"isAdmin": true,
"inviteLink": "https://whatsapp.com/channel/XXXXXXX",
"instanceId": "inst_abc123"
}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| instanceId | string | required | Instance to use for the lookup |
| inviteLink | string | required | Full invite URL or invite code or channel JID |
curl -X POST https://sevenoways.app/api/channels \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "inviteLink": "https://whatsapp.com/channel/XXXXXXXXXXXXXXXX" }'
curl -X DELETE https://sevenoways.app/api/channels/ch_abc123 \ -H "x-api-key: YOUR_API_KEY"
π¬ Send Text to Channel
| Field | Type | Required | Description |
|---|---|---|---|
| instanceId | string | required | Your WhatsApp instance ID |
| channelJid | string | required | Channel JID from saved channels list |
| message | string | required | Broadcast message (max 4096 chars) |
curl -X POST https://sevenoways.app/api/send-to-channel \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "channelJid": "120363XXXXXXXX@newsletter", "message": "π’ Big announcement coming tomorrow β stay tuned!" }'
{
"success": true,
"queued": true,
"queueId": 158
}
πΌοΈ Send Image to Channel
| Field | Type | Required | Description |
|---|---|---|---|
| instanceId | string | required | Your WhatsApp instance ID |
| channelJid | string | required | Channel JID |
| imageUrl | string | required | Public image URL (http/https) |
| caption | string | optional | Caption text |
curl -X POST https://sevenoways.app/api/send-image-to-channel \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "channelJid": "120363XXXXXXXX@newsletter", "imageUrl": "https://example.com/promo.jpg", "caption": "Our summer sale starts today! π" }'
π Send Document to Channel
| Field | Type | Required | Description |
|---|---|---|---|
| instanceId | string | required | Your WhatsApp instance ID |
| channelJid | string | required | Channel JID |
| fileUrl | string | required | Public document URL |
| filename | string | required | Filename shown in WhatsApp |
curl -X POST https://sevenoways.app/api/send-document-to-channel \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "channelJid": "120363XXXXXXXX@newsletter", "fileUrl": "https://example.com/monthly-report.pdf", "filename": "August-Report.pdf" }'
β° Schedules
-d '{
"instanceId": "INSTANCE_ID",
"label": "Daily Morning Update",
"cronExpr": "0 9 * * *",
"timezone": "Asia/Dubai",
"groupIds": ["GROUP_ID_HERE"],
"message": "Good morning team! βοΈ"
}'
π n8n Integration
Connect this API to n8n using the HTTP Request node. Set it up once as a credential and reuse it everywhere.
Create a Header Auth Credential in n8n
Go to Credentials β New β Header Auth
Name: Sevenoways Relay Β·
Header Name: x-api-key Β·
Value: your API key
Add HTTP Request Node
Method: POST Β·
URL: https://sevenoways.app/api/send-number Β·
Auth: Header Auth β Sevenoways Relay Β·
Body Content Type: Form Urlencoded or JSON
Option A β Form Urlencoded (recommended in n8n)
Set Body Content Type to Form Urlencoded and add fields:
| Name | Value |
|---|---|
| instanceId | INSTANCE_ID |
| phone | {{ $json.phone }} |
| message | {{ $json.message }} |
Option B β JSON body
{
"instanceId": "INSTANCE_ID",
"groupIds": ["GROUP_ID_HERE"],
"message": "{{ $json.message }}"
}
π n8n Workflow Examples
New form submission β notify group
{
"instanceId": "INSTANCE_ID",
"groupIds": ["GROUP_ID_HERE"],
"message": "π New lead: {{ $json.name }} β {{ $json.email }}"
}
Send order confirmation to customer
{
"instanceId": "INSTANCE_ID",
"phone": "{{ $json.phone.replace(/[^0-9]/g, '') }}",
"message": "Hi {{ $json.name }}! Order #{{ $json.orderId }} confirmed β
"
}
Daily report to all groups
{
"instanceId": "INSTANCE_ID",
"sendAll": true,
"message": "π Daily report:\nSales: {{ $json.sales }}\nLeads: {{ $json.leads }}"
}
Google Sheet row added β alert group
{
"instanceId": "INSTANCE_ID",
"groupIds": ["GROUP_ID_HERE"],
"message": "π New entry:\n{{ $json.Name }} β AED {{ $json.Amount }}"
}
Send invoice PDF to customer
{
"instanceId": "INSTANCE_ID",
"phone": "{{ $json.phone }}",
"fileUrl": "{{ $json.invoiceUrl }}",
"filename": "Invoice-{{ $json.invoiceNo }}.pdf",
"mimetype": "application/pdf"
}
π Pabbly Connect Integration
Use the HTTP Request action in any Pabbly workflow to send WhatsApp messages.
Add an HTTP Request action
In your Pabbly workflow, add an action β search for HTTP Request (or API).
Set Method to POST and URL to your endpoint, e.g.:
https://sevenoways.app/api/send-number
Add the API key header
Under Headers, add:
Key: x-api-key Β· Value: your API key
Set body as Form Data (URL Encoded)
Choose Body Type: x-www-form-urlencoded and add fields:
| Key | Value |
|---|---|
| instanceId | INSTANCE_ID |
| phone | {{phone}} (from previous step) |
| message | Hi {{name}}, your order is ready! β
|
{{field_name}} β use these inside your message value directly.Pabbly β Send to WhatsApp Group
To send to groups instead of a number, use https://sevenoways.app/api/send with:
| Key | Value |
|---|---|
| instanceId | INSTANCE_ID |
| groupIds[] | GROUP_ID@g.us |
| message | Your message text |
groupIds[] with a different value for each group.β‘ Ottokit Integration
Use Ottokit's Webhook / HTTP Request module to connect any trigger to Sevenoways Relay.
Add a Make HTTP Request step
In your Ottokit flow, add an HTTP Request step.
Method: POST Β·
URL: https://sevenoways.app/api/send-number
Set headers & body
Headers: x-api-key: your API key
Body type: application/x-www-form-urlencoded
| Key | Value |
|---|---|
| instanceId | INSTANCE_ID |
| phone | Dynamic field from trigger (e.g. {{contact.phone}}) |
| message | Your message text with dynamic fields |
π¦ Rate Limits
All send endpoints are rate-limited per API key. Exceeding limits returns HTTP 429.
| Limit | Value |
|---|---|
| Requests per minute (per API key) | 60 |
| Daily message cap | Per plan (see dashboard) |
| Monthly message cap | Per plan (see dashboard) |
When a limit is reached you'll receive: { "success": false, "error": "Send rate limit exceeded β max 60 requests/minute per API key." }
π Webhooks
Webhooks deliver real-time event notifications to your endpoint via HTTP POST. Configure them in your dashboard.
Available events
| Event | When fired |
|---|---|
message.sent | A message was successfully sent |
message.failed | A message delivery failed |
message.received | An incoming message was received |
message.delivered | Message delivery confirmed |
message.read | Message was read by recipient |
instance.online | A WhatsApp instance connected |
instance.offline | A WhatsApp instance disconnected |
Signature verification (HMAC-SHA256)
Each webhook request includes an X-Webhook-Signature header. Verify it to ensure requests come from Sevenoways.
// Node.js const crypto = require('crypto') const sig = req.headers['x-webhook-signature'] const expected = 'sha256=' + crypto .createHmac('sha256', YOUR_WEBHOOK_SECRET) .update(JSON.stringify(req.body)) .digest('hex') if (sig !== expected) { res.status(401).send('Unauthorized'); return }
π¦ SDK Examples
Send a WhatsApp message to a group using your preferred language.
cURL
curl -X POST https://sevenoways.app/api/send \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instanceId": "INSTANCE_ID", "groupIds": ["GROUP_ID@g.us"], "message": "Hello from cURL!" }'
JavaScript (fetch)
const response = await fetch('https://sevenoways.app/api/send', { method: 'POST', headers: { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ instanceId: 'INSTANCE_ID', groupIds: ['GROUP_ID@g.us'], message: 'Hello from JavaScript!' }) }) const data = await response.json() console.log(data)
Python (requests)
import requests response = requests.post( 'https://sevenoways.app/api/send', headers={ 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ 'instanceId': 'INSTANCE_ID', 'groupIds': ['GROUP_ID@g.us'], 'message': 'Hello from Python!' } ) print(response.json())
PHP (cURL)
$ch = curl_init('https://sevenoways.app/api/send'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ 'x-api-key: YOUR_API_KEY', 'Content-Type: application/json' ], CURLOPT_POSTFIELDS => json_encode([ 'instanceId' => 'INSTANCE_ID', 'groupIds' => ['GROUP_ID@g.us'], 'message' => 'Hello from PHP!' ]) ]); $result = json_decode(curl_exec($ch), true);
β° Cron Reference
| Expression | Meaning |
|---|---|
| 0 9 * * * | Every day at 9:00 AM |
| 0 9 * * 1 | Every Monday at 9:00 AM |
| 0 9 * * 1-5 | Weekdays (MonβFri) at 9:00 AM |
| 0 8,17 * * * | Every day at 8 AM and 5 PM |
| */30 * * * * | Every 30 minutes |
| 0 9 1 * * | 1st of every month at 9 AM |
| 0 9 * * 5 | Every Friday at 9 AM |
Common timezones: Asia/Dubai Β· Europe/London Β· America/New_York Β· UTC