Skip to content

Signature Verification

Webhook payloads are sent over HTTP. Without verification, an attacker could forge requests to your endpoint. Always verify the signature before processing.

Venmail signs each webhook payload with your webhook secret using HMAC-SHA256. The signature is included in the X-Venmail-Signature header.

import { venmailIntegrationWebhook } from '@venmail/vsm';
// Drop-in Express middleware — handles verification automatically
app.post('/webhooks/venmail', venmailIntegrationWebhook({
secret: process.env.VENMAIL_WEBHOOK_SECRET,
onEvent: (event) => {
console.log('Event:', event.event, event.payload);
},
}));
  1. Go to Settings > Integrations
  2. Click Rotate Secret on your webhook
  3. Update your application with the new secret
  4. Old signatures will immediately become invalid