Overview
Webhooks are configured per-collection and fire on specific events. When an event occurs, SnackBase sends a signed HTTP POST to your configured URL with the record data.Key Features
- Event-Driven: Fire on
create,update, ordeleteevents - HMAC-SHA256 Signing: Every delivery is signed with a per-webhook secret
- Automatic Retries: Failed deliveries are retried up to 5 times with exponential backoff
- Delivery Tracking: Full history of every delivery attempt with status codes and response bodies
- Filter Expressions: Conditionally fire webhooks based on record data
- Custom Headers: Add custom HTTP headers to webhook deliveries
How It Works
Webhook Configuration
Each webhook is defined with:Event Types
Delivery Payload
Every webhook delivery sends a JSON POST request with this structure:record: The current state of the record (null for delete events)previous: The previous state (only present forupdateanddeleteevents)
Security
HMAC-SHA256 Signing
Every delivery includes a signature header for verification:HMAC-SHA256(secret, request_body). To verify on your server:
Additional Headers
Every delivery also includes:URL Validation
In production, SnackBase enforces:- HTTPS only — HTTP URLs are rejected
- No private IPs — Prevents SSRF attacks by blocking
127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16, and IPv6 equivalents
Filter Expressions
Use filter expressions to conditionally fire webhooks based on record data:If a filter expression fails to evaluate, the webhook fires anyway (fail-open
design). This prevents silent data loss.
Retry Logic
Failed deliveries are automatically retried with exponential backoff:
A delivery is considered successful when it receives a 2xx HTTP response. Non-2xx responses or network errors trigger retries.