Skip to content
On this page

Webhooks

Receive real-time notifications when verification status changes.

Setup

Configure your webhook URL in the dashboard under Settings → Webhooks.

Verification

Every webhook request includes a signature header. Always verify it:

javascript
import { createHmac } from 'crypto';

function verifyWebhook(payload, signature, secret) {
  const expected = createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return `sha256=${expected}` === signature;
}

// In your Express handler
app.post('/webhooks/aegis', (req, res) => {
  const signature = req.headers['x-aegis-signature'];
  const isValid = verifyWebhook(
    JSON.stringify(req.body),
    signature,
    process.env.AEGIS_WEBHOOK_SECRET
  );
  
  if (!isValid) {
    return res.status(401).send('Invalid signature');
  }
  
  const { event, data } = req.body;
  // Handle event...
  
  res.status(200).send('OK');
});

Event Types

EventDescription
verification.completedVerification finished successfully
verification.failedVerification failed
verification.pendingAwaiting additional data
credit.score.updatedCredit score changed

Retry Policy

Failed deliveries are retried with exponential backoff: 1min, 5min, 30min, 2hr, 24hr.

Released under the MIT License.