Webhooks API

Configure webhooks for external system integration

Webhooks API

Configure webhooks to deliver events to external systems.

Create Webhook

POST /api/v1/webhooks

Request:

{
  "site_id": "site_abc123",
  "url": "https://your-system.com/webhooks/pulse",
  "events": ["alert", "event_summary"],
  "active": true,
  "secret": "your_secret_key"
}

List Webhooks

GET /api/v1/webhooks?site_id=site_abc123

Update Webhook

PUT /api/v1/webhooks/{webhook_id}

Delete Webhook

DELETE /api/v1/webhooks/{webhook_id}

Webhook Events

Webhook payload:

{
  "event_type": "alert",
  "timestamp": 1703001234567,
  "site_id": "site_abc123",
  "data": {
    "alert_id": "alert_xyz",
    "rule_name": "High Bounce Rate",
    "metric_value": 55.2
  }
}

Signature Verification

Verify webhook authenticity with HMAC:

const crypto = require('crypto')

const secret = 'your_secret_key'
const timestamp = headers['x-pulse-timestamp']
const signature = headers['x-pulse-signature']
const body = request.rawBody

const hash = crypto
  .createHmac('sha256', secret)
  .update(`${timestamp}.${body}`)
  .digest('hex')

if (hash !== signature) {
  throw new Error('Invalid signature')
}

Next Steps

Last updated: April 3, 2026