WordPress Plugin Recommended auth mode is API key. Existing token-based plugin users remain supported as fallback.
Open WordPress admin and go to Wapid → Automated Notifications . In API Authentication , paste API key from /dashboard/settings. Or click connect once and use Generate WordPress API Key . Select your instance and configure automation events. n8n Use an HTTP Request node and add both headers:
Authorization: Bearer sk_live_xxx
X-Wapid-Source: n8n Endpoint example:
POST https://api.wapid.net/api/v1/messages/send
{
"instance_id": "inst_xxx",
"recipient_type": "phone",
"recipient_phone": "923001234567",
"message_text": "Order confirmed"
} Group messaging example:
POST https://api.wapid.net/api/v1/messages/send
{
"instance_id": "inst_xxx",
"recipient_type": "group",
"recipient_jid": "1234567890-123456789@g.us",
"message_text": "Flash sale starts in 30 minutes."
} Laravel Http::withHeaders([
'Authorization' => 'Bearer '.config('services.wapid.key'),
'X-Wapid-Source' => 'laravel',
])->post(config('services.wapid.base').'/messages/send', [
'instance_id' => $instanceId,
'recipient_type' => 'phone',
'recipient_phone' => $phone,
'message_text' => $message,
]); Node.js await fetch('https://api.wapid.net/api/v1/messages/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk_live_xxx',
'X-Wapid-Source': 'nodejs'
},
body: JSON.stringify({
instance_id: 'inst_xxx',
recipient_type: 'group',
recipient_jid: '1234567890-123456789@g.us',
message_text: 'Hello group from Node.js'
})
});
await fetch('https://api.wapid.net/api/v1/messages/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk_live_xxx',
'X-Wapid-Source': 'nodejs'
},
body: JSON.stringify({
instance_id: 'inst_xxx',
recipient_type: 'phone',
recipient_phone: '923001234567',
message_text: 'Hello from Node.js direct message'
})
}); REST API (Any Platform) Base URL
https://api.wapid.net/api/v1Authentication
Authorization: Bearer sk_live_...Messages
POST /messages/send
Instance Groups
GET /instances/:instanceId/groups
Email Marketing
GET /email-marketing/campaigns | POST /email-marketing/campaigns
Email Contacts
GET /email-marketing/contacts | POST /email-marketing/contacts
Integration Best Practices Use a separate API key per project/site for clean isolation. Always send X-Wapid-Source matching your integration type. Regenerate and rotate keys when team members change. Keep keys server-side only, never expose in public frontend JS.