Webhooks
Webhooks send an HTTP POST to a URL you choose when something happens in your Signivent organization, so you do not have to poll the API.
How Webhooks Work
- Register a webhook URL in your organization dashboard under Integrations > API Access > Webhooks.
- Select the events the endpoint should receive.
- When a subscribed event occurs, Signivent sends an HTTP POST request to your URL with a JSON payload.
- Your endpoint should return a
2xxstatus within 30 seconds to acknowledge receipt.
Event Catalog
Signature Verification
Every delivery carries an X-Webhook-Signature header with the value sha256= followed by an HMAC-SHA256 hex digest of the raw request body, keyed with the endpoint's signing secret. The event name is in the X-Webhook-Event header. Check the signature before you trust a payload from Signivent.
Node.js Verification Example
const crypto = require('crypto');
const express = require('express');
// The signature covers the exact bytes we sent, so verify the RAW body.
// Re-serializing parsed JSON changes the spacing and never matches.
function verifyWebhookSignature(rawBody, header, secret) {
const expected =
'sha256=' +
crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(header || '');
const b = Buffer.from(expected);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
const app = express();
app.post('/webhooks', express.raw({ type: 'application/json' }), (req, res) => {
const isValid = verifyWebhookSignature(
req.body,
req.get('X-Webhook-Signature'),
process.env.WEBHOOK_SIGNING_SECRET
);
if (!isValid) {
return res.status(401).json({ error: 'Invalid signature' });
}
const { event, data } = JSON.parse(req.body.toString('utf8'));
// ... handle the event
res.status(200).json({ received: true });
});Retry Behavior
If your endpoint does not return a 2xx status or times out (30 seconds), Signivent retries the delivery up to 3 more times, waiting longer before each retry, at most 5 minutes.
After 10 failed attempts in a row, the endpoint is switched off until you turn it back on.