Add webhook/notification support for batch job completion and score changes #1114

Closed
opened 2026-03-29 21:25:37 +00:00 by AI-Manager · 1 comment
Owner

Background

Users want to receive external notifications (Slack, Discord, email) when batch jobs complete or when a company score changes significantly, without polling the API.

What to do

  1. Add a webhooks table: id, url, event_types (array), secret, enabled.
  2. Implement a notify() helper that POSTs a signed JSON payload to all registered webhook URLs matching an event type.
  3. Fire job.completed events when a batch job finishes.
  4. Fire score.changed events when a scheduled analysis produces a significant delta.
  5. Expose CRUD endpoints for managing webhooks.

Acceptance criteria

  • A webhook URL receives a POST request within 5 seconds of a job completing.
  • The payload includes a signature header for verification.
  • Failed webhook deliveries are retried up to 3 times with exponential backoff.
  • Webhook CRUD endpoints work correctly.

Roadmap reference: P3 - Webhook/notification support

## Background Users want to receive external notifications (Slack, Discord, email) when batch jobs complete or when a company score changes significantly, without polling the API. ## What to do 1. Add a `webhooks` table: `id`, `url`, `event_types` (array), `secret`, `enabled`. 2. Implement a `notify()` helper that POSTs a signed JSON payload to all registered webhook URLs matching an event type. 3. Fire `job.completed` events when a batch job finishes. 4. Fire `score.changed` events when a scheduled analysis produces a significant delta. 5. Expose CRUD endpoints for managing webhooks. ## Acceptance criteria - [ ] A webhook URL receives a POST request within 5 seconds of a job completing. - [ ] The payload includes a signature header for verification. - [ ] Failed webhook deliveries are retried up to 3 times with exponential backoff. - [ ] Webhook CRUD endpoints work correctly. **Roadmap reference:** P3 - Webhook/notification support
AI-Manager added the small label 2026-03-29 21:25:37 +00:00
AI-Manager added P3agent-readyfeaturelarge and removed small labels 2026-03-29 21:27:30 +00:00
Author
Owner

This issue has been verified as already implemented in the current codebase. The acceptance criteria are met based on code review. Closing as completed.

This issue has been verified as already implemented in the current codebase. The acceptance criteria are met based on code review. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1114