Webhook Events
Receive FileRelay document events at your own endpoint.
Webhook Events
FileRelay POSTs document events to your endpoint when a workspace's failure or success notification channel is set to webhook. There is no separate webhook registry — each workspace has at most one failure URL and one success URL.
Configuring Webhooks
In the workspace settings, under the failure and success notification fieldsets:
- Set the channel to Webhook
- Enter the endpoint URL (must be reachable from the FileRelay host; HTTPS in production)
- Add custom headers, one
Name: valueper line — e.g.X-Relay-Secret: <shared secret>so your endpoint can authenticate the caller
Malformed header lines are dropped; a missing or invalid URL disables delivery silently.
Delivery Semantics
- Webhooks fan out through queued jobs — a slow receiver never blocks document delivery.
- Each event is retried up to 3 times with a 30 s backoff, then logged and dropped. Make your endpoint idempotent (key on
doc_id+event). - POSTs time out after 10 s. Respond quickly; do heavy work asynchronously.
- Failure and success channels are independent — a workspace can have either, both, or neither.
Authenticating the Caller
FileRelay does not HMAC-sign webhook bodies. Authenticate calls with a shared secret in your custom headers (e.g. X-Relay-Secret) and reject requests that lack it.
Event Types
| Event | Channel | When |
|---|---|---|
delivery.failed |
failure | One destination exhausted all retries |
enrichment.failed |
failure | One enrichment step failed terminally |
document.stalled |
failure | A pending document survived 3 stall scans with silent restarts |
document.processed |
success | Every delivery settled (delivered or skipped by routing rules) |
Payload Structure
Every event carries the workspace slug and document ID:
{
"event": "delivery.failed",
"doc_id": "9C1D3E5F7A2B4D6E",
"workspace": "production",
"destination": "S3 Archive EU",
"destination_type": "s3",
"attempts": 4,
"error": "AccessDenied: ...",
"failed_at": "2026-04-04T10:35:00+00:00"
}
document.processed instead carries a per-destination status table:
{
"event": "document.processed",
"doc_id": "9C1D3E5F7A2B4D6E",
"workspace": "production",
"status": "processed",
"deliveries": [
{ "destination": "S3 Archive EU", "type": "s3", "status": "delivered" },
{ "destination": "Legacy FTP", "type": "ftp", "status": "skipped" }
],
"processed_at": "2026-04-04T10:36:00+00:00"
}
enrichment.failed carries the enricher name/type, attempts, and error; document.stalled carries the repository and how long the document has been pending. bapiErrors-style detail is never included — query the API for full context.
Next Steps
- Workspace Settings -- Notification channels and thresholds
- API Overview -- Response format and rate limits