Skip to main content

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:
Triggered when a file is uploaded
Triggered when a file is deleted
Triggered when a file is shared
Triggered when a shared file is accessed
Triggered when a folder is created
Triggered when storage reaches threshold
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

Return 200 OK quickly:
  • Process events asynchronously
  • Don’t perform long operations in webhook handler
  • Use a queue for processing
  • Respond within 5 seconds
Webhooks may be delivered multiple times:
  • Use delivery ID for idempotency
  • Track processed events
  • Handle duplicates gracefully
Protect your webhook endpoint:
  • Always verify signature
  • Use HTTPS only
  • Validate payload structure
  • Rate limit requests
Track webhook health:
  • Monitor delivery success rate
  • Alert on repeated failures
  • Review failed deliveries
  • Update endpoint if needed

Troubleshooting

Check:
  • Webhook is active
  • URL is accessible from internet
  • HTTPS is configured correctly
  • Firewall allows incoming requests
  • Server is responding with 200 OK
Ensure:
  • Using correct webhook secret
  • Comparing raw request body
  • Using timing-safe comparison
  • Secret hasn’t been rotated
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
Or fetch via API: