Setting Up Webhooks
1
Navigate to Workspace Settings
In your Relyable dashboard, go to Settings → Webhooks
2
Add Webhook URL
Click Add Webhook and enter your endpoint URL. This should be a publicly accessible HTTPS endpoint.
3
Select Events
Choose which events you want to receive:
- Test run completed
- Test run failed
- Agent score dropped
- Critical test case failed
4
Save and Get Secret
Save your webhook. You’ll receive a signing secret to verify webhook authenticity.
Webhook Events
test_run.completed
Sent when a test run finishes successfully:test_run.failed
Sent when a test run fails to complete:agent.score_dropped
Sent when an agent’s score drops below a threshold:test_case.critical_failure
Sent when a critical test case fails:Verifying Webhooks
All webhooks include a signature in theX-Relyable-Signature header for security.
Signature Verification (Node.js)
Signature Verification (Python)
Webhook Retry Logic
If your endpoint returns a non-200 status code, Relyable will retry:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 15 minutes |
| 5 | 1 hour |
Testing Webhooks
Use the Send Test Event button in your webhook settings to send a test payload to your endpoint. This helps you verify your integration before real events occur.Best Practices
Respond Quickly
Respond Quickly
Return a 200 status code immediately. Process the webhook asynchronously to avoid timeouts.
Always Verify Signatures
Always Verify Signatures
Never trust webhook payloads without verifying the signature. This prevents spoofing attacks.
Handle Duplicate Events
Handle Duplicate Events
Due to retries, you might receive the same event multiple times. Use the event ID to deduplicate.
Use HTTPS
Use HTTPS
Webhook URLs must use HTTPS. Plain HTTP is not supported for security reasons.
Debugging Webhooks
View webhook delivery logs in your workspace settings:- Request payload
- Response status code
- Response body
- Delivery timestamp
- Retry attempts