Overview
Raily webhooks notify your application in real-time when events occur, such as content access, policy violations, or analytics thresholds. Use webhooks to build reactive integrations, logging systems, and automated workflows.Setting Up Webhooks
Create a Webhook
Via Dashboard
1
Navigate to Webhooks
Go to Settings > Webhooks in your dashboard.
2
Add Endpoint
Click Add Endpoint and enter your URL.
3
Select Events
Choose which events to receive.
4
Copy Secret
Save the webhook secret for signature verification.
Event Types
Access Events
| Event | Description |
|---|---|
access.requested | Access check initiated |
access.granted | Access approved by policy |
access.denied | Access blocked by policy |
access.rate_limited | Request exceeded rate limit |
Content Events
| Event | Description |
|---|---|
content.created | New content registered |
content.updated | Content metadata updated |
content.archived | Content archived |
content.deleted | Content permanently deleted |
content.accessed | Content successfully retrieved |
Policy Events
| Event | Description |
|---|---|
policy.created | New policy created |
policy.updated | Policy rules modified |
policy.deleted | Policy removed |
Analytics Events
| Event | Description |
|---|---|
analytics.threshold | Custom threshold exceeded |
analytics.daily_summary | Daily analytics digest |
analytics.weekly_summary | Weekly analytics digest |
Webhook Payload
All webhooks follow a consistent structure:Event-Specific Payloads
- access.granted
- access.denied
- content.created
- analytics.threshold
Handling Webhooks
Express.js Example
Python Flask Example
Using the SDK Webhook Helper
Webhook Management
List Webhooks
Update Webhook
Delete Webhook
View Delivery Logs
Retry Failed Deliveries
Best Practices
Verify Signatures
Always verify webhook signatures to ensure requests come from Raily.
Respond Quickly
Return 200 status immediately. Process events asynchronously.
Handle Retries
Implement idempotency. Raily retries failed deliveries.
Monitor Failures
Set up alerts for webhook delivery failures.
Async Processing Pattern
Idempotency
Retry Policy
Raily automatically retries failed webhook deliveries:| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 24 hours |