Webhook Overview
Rubric sends webhook notifications when important events occur, enabling real-time integration with your systems.Supported Events
| Event | Description | Payload |
|---|---|---|
evaluation.created | New evaluation started | Evaluation ID, config |
evaluation.completed | Evaluation finished | Results summary |
evaluation.failed | Evaluation errored | Error details |
sample.scored | Sample received score | Sample ID, scores |
review.assigned | Sample assigned for review | Sample ID, reviewer |
review.completed | Human review submitted | Review data |
alert.triggered | Monitoring alert fired | Alert details |
safety.critical | Critical safety issue detected | Sample ID, details |
Configuring Webhooks
webhook_configuration.py
Webhook Payload Format
webhook_payload.json
Verifying Webhook Signatures
Always verify webhook signatures to ensure requests are from Rubric:verify_webhook.py
Event-Specific Handlers
event_handlers.py
Slack Integration
slack_webhook.py
Testing Webhooks
test_webhooks.py
Webhook Management
manage_webhooks.py
Best Practices
| Practice | Rationale |
|---|---|
| Always verify signatures | Prevent spoofed requests |
| Respond quickly (< 5s) | Avoid timeout retries |
| Use idempotent handlers | Handle duplicate deliveries |
| Log all events | Debugging and audit trail |
| Set up monitoring | Alert on delivery failures |
| Use event filtering | Reduce noise, lower costs |
