Overview
Webhooks allow you to receive real-time HTTP notifications when events occur in your Hubsy Cloud account. Instead of polling for changes, Hubsy pushes event data to your specified endpoint.Setting Up Webhooks
1
Create Endpoint
Set up an HTTPS endpoint on your server to receive webhook events:
Example Node.js Endpoint
2
Register Webhook
Register your webhook endpoint via API or dashboard:
3
Test Webhook
Send a test event to verify setup:
4
Go Live
Your webhook is now active and will receive events in real-time
Available Events
Subscribe to these events:file.uploaded
file.uploaded
Triggered when a file is uploaded
file.deleted
file.deleted
Triggered when a file is deleted
folder.created
folder.created
Triggered when a folder is created
storage.warning
storage.warning
Triggered when storage reaches threshold
user.quota_exceeded
user.quota_exceeded
Triggered when storage quota is exceeded
Webhook Payload Structure
All webhook events follow this structure:string
The event type (e.g., “file.uploaded”)
string
ISO 8601 timestamp when the event occurred
string
ID of the webhook configuration that sent this event
object
Event-specific payload data
string
HMAC SHA-256 signature for verification
Verifying Webhooks
Verify webhook authenticity using the signature:Managing Webhooks
Create Webhook
List Webhooks
Update Webhook
Delete Webhook
Webhook Delivery
Delivery Behavior
- Timeout: 30 seconds
- Retries: Up to 3 attempts with exponential backoff
- Expected Response: 200-299 status code
- Retry Schedule: Immediately, 5 seconds, 25 seconds
Delivery Headers
Hubsy sends these headers with webhook requests:Best Practices
Respond Quickly
Respond Quickly
Return 200 OK quickly:
- Process events asynchronously
- Don’t perform long operations in webhook handler
- Use a queue for processing
- Respond within 5 seconds
Handle Duplicates
Handle Duplicates
Webhooks may be delivered multiple times:
- Use delivery ID for idempotency
- Track processed events
- Handle duplicates gracefully
Secure Your Endpoint
Secure Your Endpoint
Protect your webhook endpoint:
- Always verify signature
- Use HTTPS only
- Validate payload structure
- Rate limit requests
Monitor Failures
Monitor Failures
Track webhook health:
- Monitor delivery success rate
- Alert on repeated failures
- Review failed deliveries
- Update endpoint if needed
Troubleshooting
Not Receiving Webhooks
Not Receiving Webhooks
Check:
- Webhook is active
- URL is accessible from internet
- HTTPS is configured correctly
- Firewall allows incoming requests
- Server is responding with 200 OK
Signature Verification Fails
Signature Verification Fails
Ensure:
- Using correct webhook secret
- Comparing raw request body
- Using timing-safe comparison
- Secret hasn’t been rotated
Too Many Events
Too Many Events
To reduce volume:
- Subscribe only to needed events
- Use API polling for some data
- Batch process events
- Consider using filters (coming soon)
Webhook Logs
View webhook delivery logs in your dashboard:- Delivery attempts and outcomes
- Response codes and times
- Payload sent
- Error messages
- Retry history