Wapid Developer Docs

Wapid integration guides

Connect the WordPress plugin, n8n, Laravel, Node.js, or the REST API to a linked WhatsApp session. Email marketing routes require a Plus plan. The official WhatsApp Business Platform is not currently available.

What these guides cover

WhatsApp sends in these examples use a linked WhatsApp session, including group messages where the API accepts a group recipient.

Email marketing endpoints are for Plus plans only.

Official WhatsApp Business Platform connection is not currently available, so these guides do not set it up.

WooCommerce order notifications are documented on the plugin page and in the WordPress section below.

WordPress Plugin

Recommended auth mode is API key. Existing token-based plugin users remain supported as fallback. The public product page is Wapid Automation for WooCommerce.

  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