Wapid Developer Docs

Integrate Wapid Across Your Stack

Production-ready integration guides for WordPress, n8n, Laravel, Node.js, and direct REST API usage for WhatsApp direct messaging, WhatsApp group messaging, and email marketing.

WordPress Plugin

Recommended auth mode is API key. Existing token-based plugin users remain supported as fallback.

  1. Open WordPress admin and go to Wapid → Automated Notifications.
  2. In API Authentication, paste API key from /dashboard/settings.
  3. Or click connect once and use Generate WordPress API Key.
  4. 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/v1

Authentication

Authorization: Bearer sk_live_...

Instances

GET /instances

Messages

POST /messages/send

Instance Groups

GET /instances/:instanceId/groups

Templates

GET /templates

History

GET /messages

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.

Need A Custom Integration?

We can help architect your Wapid workflow for enterprise stores, ERP connectors, and custom order pipelines.

Talk To Integration Team