Purpose
Trailflow supports outbound webhook subscriptions for near-real-time event delivery. Webhook endpoints are managed through the canonical Partner API:POST /v1/webhooksGET /v1/webhooksDELETE /v1/webhooks/{id}
Supported Event Types
Currently emitted event types:load.createdload.updatedload.status_changed
Creating A Subscription
Create a subscription with:requestId to the webhook payload body itself. Use X-Trailflow-Event to distinguish whether the delivery represents load.created, load.updated, or load.status_changed.
Example load.created delivery body:
load.status_changed delivery body:
Delivery Headers
Trailflow sends these headers on each delivery:Content-Type: application/jsonX-Trailflow-Delivery-IdX-Trailflow-EventX-Trailflow-TimestampX-Trailflow-Signature
Signature Verification
Each subscription has its own signing secret.signingSecret is returned only when the subscription is created. Trailflow does not expose it again from the list endpoint, so partners must store it securely at creation time.
Trailflow computes the delivery signature as:
- read the raw request body exactly as delivered
- read
X-Trailflow-Timestamp - compute
HMAC-SHA256over<timestamp>.<raw body> - compare the hex digest to
X-Trailflow-Signature
X-Trailflow-Delivery-Id is the stable delivery identifier for the attempted send.
Use it to record deduplication state across retries and support-coordinated replays.
Do not:
- parse and re-serialize the JSON body before verification
- log the subscription signing secret
- send signing secrets in tickets, screenshots, or email
Delivery Behavior
Current behavior:- non-
2xxresponses are treated as failures - network failures are treated as failures
- retries are bounded
- replay can be requested through Trailflow support after remediation
- delivery order is best-effort only; retries and parallel scheduling can result in out-of-order arrival across events
- maximum attempts:
3 - retry delays: approximately
1minute, then5minutes
Subscription Lifecycle
GET /v1/webhooks returns active subscriptions for the calling API client.
DELETE /v1/webhooks/{id} disables the subscription from future deliveries.
Deletion does not erase historical delivery records retained for support and
compliance.
Endpoint Expectations
Partners should operate webhook endpoints that:- accept HTTPS POST requests
- can return a
2xxresponse quickly after basic validation - process duplicate deliveries safely using
X-Trailflow-Delivery-Id - tolerate retries and temporary Trailflow replays
Debugging Delivery Failures
When debugging with Trailflow support, include:- customer organization
- approximate delivery timestamp
- event type
- webhook URL
- returned HTTP status code if known
requestIdfrom related API calls if applicable
- invalid or rotated signing secret
- signature verification over a parsed body instead of the raw body
- slow endpoint responses
- partner-side
429or5xxresponses - subscription disabled after repeated failures or manual intervention