Webhooks
Webhooks allow your application to receive real-time notifications when events occur in SEDI.
Event types
| Event | Description |
|---|---|
user.created | A new user was created |
user.updated | A user was updated |
user.deleted | A user was deleted |
project.created | A new project was created |
project.updated | A project was updated |
project.deleted | A project was deleted |
Setting up a webhook
Configure webhook URLs in your dashboard. You must provide a publicly accessible HTTPS endpoint.
Signature verification
Every webhook payload includes a SEDI-Signature header. Verify it using your webhook secret:
import crypto from 'node:crypto';
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
Retry policy
SEDI retries failed webhooks up to 3 times with exponential backoff (1min, 10min, 60min). Respond with 200 OK within 5 seconds to acknowledge receipt.
Idempotency
Webhook deliveries include an Idempotency-Key header. Process each idempotency key exactly once to avoid duplicate handling.