Real-time Events

Webhooks

Receive real-time notifications when events happen in your NOWAITN account. Build reactive integrations that respond instantly.

How Webhooks Work

Webhooks push data to your application when events occur

1

Register URL

Configure your webhook endpoint URL in the dashboard

2

Event Occurs

An action happens in your NOWAITN account

3

Receive Data

We POST event data to your endpoint instantly

Setup Guide

1 Create an Endpoint

Create an HTTP endpoint on your server that accepts POST requests. Your endpoint should return a 200 status code to acknowledge receipt.

POST https://your-app.com/webhooks/nowaitn

2 Register in Dashboard

Go to Settings → Webhooks in your dashboard and add your endpoint URL. Select which events you want to receive.

3 Verify Signatures

All webhook deliveries include a signature header. Verify this signature to ensure the request came from NOWAITN.

Example Handler (Node.js)
const express = require('express');
const crypto = require('crypto');

app.post('/webhooks/nowaitn', (req, res) => {
  // Verify signature
  const signature = req.headers['x-nowaitn-signature'];
  const hash = crypto
    .createHmac('sha256', WEBHOOK_SECRET)
    .update(JSON.stringify(req.body))
    .digest('hex');

  if (signature !== hash) {
    return res.status(401).send('Invalid');
  }

  // Handle the event
  const { event, data } = req.body;
  
  switch (event) {
    case 'guest.added':
      handleGuestAdded(data);
      break;
    case 'guest.seated':
      handleGuestSeated(data);
      break;
  }

  res.status(200).json({ received: true });
});

Event Types

Guest Events

guest.added A new guest joined the queue
guest.updated Guest information was updated
guest.notified Guest received a notification
guest.seated Guest was marked as seated
guest.removed Guest was removed from queue
guest.no_show Guest was marked as no-show

Queue Events

queue.created A new queue was created
queue.updated Queue settings were changed
queue.paused Queue was paused
queue.resumed Queue was resumed

Notification Events

notification.sent A notification was sent
notification.delivered Notification was delivered
notification.failed Notification delivery failed

Event Payload

All webhook events follow a consistent payload structure with the event type, timestamp, and relevant data.

event The event type (e.g., guest.added)
timestamp ISO 8601 timestamp of when the event occurred
data Event-specific data object
meta Additional context (account_id, webhook_id)
Example: guest.added
{
  "event": "guest.added",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "id": "guest_xyz789",
    "queue_id": "queue_abc123",
    "name": "John Smith",
    "phone": "+61412345678",
    "party_size": 4,
    "position": 3,
    "estimated_wait": 15
  },
  "meta": {
    "account_id": "acct_123",
    "webhook_id": "wh_456"
  }
}

Best Practices

Verify Signatures

Always verify the webhook signature to ensure authenticity

Handle Retries

We retry failed deliveries. Make your endpoint idempotent

Respond Quickly

Return 200 quickly. Process data asynchronously if needed

Store Raw Data

Log raw payloads for debugging and auditing

Handle Errors

Implement proper error handling and alerting

Monitor Latency

Track webhook processing time for performance

Ready to Go Real-time?

Set up webhooks in minutes and build reactive integrations.