Context
Analytics is currently pull-based: clients query /v1/links/:id/stats. For integrations (Slack notifications, CRM sync, real-time dashboards), users need push delivery.
Goal
Allow users to register a webhook URL per workspace/key and receive a signed HTTP POST on each click event.
Approach
- New resource:
Webhook { id, userId, url, secret, events[], createdAt, lastDeliveredAt }.
- After a click is persisted, enqueue a
webhook-delivery job in a new BullMQ queue.
- Worker POSTs
{ event: 'click', linkId, occurredAt, country, deviceType, browser, referrerHost } with an X-LinkForge-Signature: sha256=<hmac> header (HMAC-SHA256 of the body using the per-webhook secret).
- Retry with exponential backoff (5 attempts), then mark delivery as failed.
Acceptance criteria
Open questions
- Per-user delivery quota?
- Should we offer event filtering (e.g., only on first click per IP hash)?
Context
Analytics is currently pull-based: clients query
/v1/links/:id/stats. For integrations (Slack notifications, CRM sync, real-time dashboards), users need push delivery.Goal
Allow users to register a webhook URL per workspace/key and receive a signed HTTP POST on each click event.
Approach
Webhook { id, userId, url, secret, events[], createdAt, lastDeliveredAt }.webhook-deliveryjob in a new BullMQ queue.{ event: 'click', linkId, occurredAt, country, deviceType, browser, referrerHost }with anX-LinkForge-Signature: sha256=<hmac>header (HMAC-SHA256 of the body using the per-webhook secret).Acceptance criteria
Open questions