πŸ“‘

API Documentation

← Dashboard

πŸ”‘ Your API Key & Config

Everything below is pre-filled with your real values. Copy and use directly.

Live Configuration

API Key Loading...
Base URL Loading...
Loading instances...

πŸ‘₯ Your Groups

Use these Group IDs in API calls β€” they never change, even if you rename the group.

Loading groups...

πŸ” Authentication

Pass your API key as a header on every request.

Required Header x-api-key: YOUR_API_KEY
⚠️ Keep your API key secret. Anyone with it can send messages from your numbers.

Request Format

All POST endpoints accept either format β€” use whichever your tool supports:

FormatContent-Type headerWhen to use
JSONapplication/jsoncurl, JavaScript fetch, Python, PHP, Postman
Form dataapplication/x-www-form-urlencodedn8n, Pabbly Connect, Ottokit, Make, Zapier, HTML forms
πŸ’‘ Arrays in form data use bracket notation: groupIds[]=ID1&groupIds[]=ID2 or repeat the key: groupIds=ID1&groupIds=ID2

πŸ“± List Instances

GET/api/instances
curl -X GET https://sevenoways.app/api/instances \
  -H "x-api-key: YOUR_API_KEY"

βž• Create Instance

POST/api/instances
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"}'
After creating, open https://sevenoways.app/api/instances/{id}/qr in your browser and scan the QR code.

πŸ—‘οΈ Delete Instance

DELETE/api/instances/:id

πŸ‘₯ List Groups

GET /api/instances/INSTANCE_ID/groups
curl https://sevenoways.app/api/instances/INSTANCE_ID/groups \
  -H "x-api-key: YOUR_API_KEY"

πŸ’¬ Send Text to Groups

βœ… Recommended: Use groupIds β€” more reliable than names (works even if group is renamed).
POST/api/send
FieldTypeNotes
instanceIdstringrequired Which number to send from
groupIdsarrayrecommended Array of Group IDs (e.g. 120363...@g.us)
groupsarrayoptional Array of group names (case-insensitive). Use if you don't know the ID.
sendAllbooleanoptional true = send to ALL groups
messagestringrequired
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

POST/api/send-image
-d '{
  "instanceId": "INSTANCE_ID",
  "groupIds": ["GROUP_ID_HERE"],
  "imageUrl": "https://example.com/banner.jpg",
  "caption": "Check this out!"
}'

πŸ“Ž Send Document to Groups

POST/api/send-document
-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

POST/api/send-number
Phone format: country code + number, no +, no spaces.
πŸ‡¦πŸ‡ͺ UAE: 971501234567  |  πŸ‡¬πŸ‡§ UK: 447911123456  |  πŸ‡ΊπŸ‡Έ US: 12125551234
curl -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

POST/api/send-number-image
-d '{
  "instanceId": "INSTANCE_ID",
  "phone": "971501234567",
  "imageUrl": "https://example.com/invoice.png",
  "caption": "Your invoice"
}'

πŸ“Ž Send Document to Number

POST/api/send-number-document
-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.

How community IDs work: Community JIDs end with @newsletter (e.g. 120363XXXXXXXX@newsletter). You can find them from your dashboard under βœ‰οΈ Send β†’ 🌐 Communities tab.
⚠️ Your WhatsApp number must be a member or admin of the community to send messages to it.

πŸ’¬ Send Text to Community

POST/api/send-to-communityQueue text message
FieldTypeRequiredDescription
instanceIdstringrequiredYour WhatsApp instance ID
communityIdstringrequiredCommunity JID (ends with @newsletter)
messagestringrequiredText 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

POST/api/send-image-to-communityQueue image
FieldTypeRequiredDescription
instanceIdstringrequiredYour WhatsApp instance ID
communityIdstringrequiredCommunity JID
imageUrlstringrequiredPublic image URL (http/https)
captionstringoptionalImage 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

POST/api/send-document-to-communityQueue document
FieldTypeRequiredDescription
instanceIdstringrequiredYour WhatsApp instance ID
communityIdstringrequiredCommunity JID
fileUrlstringrequiredPublic document URL (http/https)
filenamestringrequiredFilename shown in WhatsApp (e.g. report.pdf)
mimetypestringoptionalMIME 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.

Channel JID format: 120363XXXXXXXX@newsletter
Get your channel JID from the dashboard: βœ‰οΈ Send β†’ πŸ“’ Channels β†’ Add Channel by pasting the invite link.
⚠️ You must be the admin or owner of a channel to post messages. Followers cannot send.

πŸ—‚οΈ Manage Saved Channels

GET/api/channelsList 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"
    }
  ]
}
POST/api/channelsAdd & save a channel by invite link
FieldTypeRequiredDescription
instanceIdstringrequiredInstance to use for the lookup
inviteLinkstringrequiredFull 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"
  }'
DELETE/api/channels/:idRemove a saved channel
curl -X DELETE https://sevenoways.app/api/channels/ch_abc123 \
  -H "x-api-key: YOUR_API_KEY"

πŸ’¬ Send Text to Channel

POST/api/send-to-channelQueue text broadcast
FieldTypeRequiredDescription
instanceIdstringrequiredYour WhatsApp instance ID
channelJidstringrequiredChannel JID from saved channels list
messagestringrequiredBroadcast 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

POST/api/send-image-to-channelQueue image broadcast
FieldTypeRequiredDescription
instanceIdstringrequiredYour WhatsApp instance ID
channelJidstringrequiredChannel JID
imageUrlstringrequiredPublic image URL (http/https)
captionstringoptionalCaption 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

POST/api/send-document-to-channelQueue document broadcast
FieldTypeRequiredDescription
instanceIdstringrequiredYour WhatsApp instance ID
channelJidstringrequiredChannel JID
fileUrlstringrequiredPublic document URL
filenamestringrequiredFilename 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

GET/api/schedulesList all
POST/api/schedulesCreate
-d '{
  "instanceId": "INSTANCE_ID",
  "label": "Daily Morning Update",
  "cronExpr": "0 9 * * *",
  "timezone": "Asia/Dubai",
  "groupIds": ["GROUP_ID_HERE"],
  "message": "Good morning team! β˜€οΈ"
}'
DELETE/api/schedules/:idDelete

πŸ”— n8n Integration

Connect this API to n8n using the HTTP Request node. Set it up once as a credential and reuse it everywhere.

1

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

2

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

3

Option A β€” Form Urlencoded (recommended in n8n)

Set Body Content Type to Form Urlencoded and add fields:

NameValue
instanceIdINSTANCE_ID
phone{{ $json.phone }}
message{{ $json.message }}
3

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.

1

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

2

Add the API key header

Under Headers, add:
Key: x-api-key  Β·  Value: your API key

3

Set body as Form Data (URL Encoded)

Choose Body Type: x-www-form-urlencoded and add fields:

KeyValue
instanceIdINSTANCE_ID
phone{{phone}} (from previous step)
messageHi {{name}}, your order is ready! βœ…
βœ… Pabbly Connect maps previous step data with {{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:

KeyValue
instanceIdINSTANCE_ID
groupIds[]GROUP_ID@g.us
messageYour message text
πŸ’‘ For multiple groups, repeat groupIds[] with a different value for each group.

⚑ Ottokit Integration

Use Ottokit's Webhook / HTTP Request module to connect any trigger to Sevenoways Relay.

1

Add a Make HTTP Request step

In your Ottokit flow, add an HTTP Request step.
Method: POST  Β·  URL: https://sevenoways.app/api/send-number

2

Set headers & body

Headers: x-api-key: your API key
Body type: application/x-www-form-urlencoded

KeyValue
instanceIdINSTANCE_ID
phoneDynamic field from trigger (e.g. {{contact.phone}})
messageYour message text with dynamic fields
βœ… All endpoints support both JSON and form-urlencoded β€” pick whichever Ottokit makes easiest for your workflow.

🚦 Rate Limits

All send endpoints are rate-limited per API key. Exceeding limits returns HTTP 429.

LimitValue
Requests per minute (per API key)60
Daily message capPer plan (see dashboard)
Monthly message capPer 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

EventWhen fired
message.sentA message was successfully sent
message.failedA message delivery failed
message.receivedAn incoming message was received
message.deliveredMessage delivery confirmed
message.readMessage was read by recipient
instance.onlineA WhatsApp instance connected
instance.offlineA 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

ExpressionMeaning
0 9 * * *Every day at 9:00 AM
0 9 * * 1Every Monday at 9:00 AM
0 9 * * 1-5Weekdays (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 * * 5Every Friday at 9 AM

Common timezones: Asia/Dubai  Β·  Europe/London  Β·  America/New_York  Β·  UTC