Webhooks push real-time events from Tread to a URL you control. Use webhooks when your downstream system (data warehouse, ERP, custom dashboard) needs to react the moment something happens in Tread — an order is created, a ticket is approved, a project is updated — instead of polling the API.Documentation Index
Fetch the complete documentation index at: https://docs.tread.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- An HTTPS endpoint you control. HTTP is rejected.
- A Tread admin user with the Integrations permission.
- Ability to verify HMAC signatures on the receiving side.
- A retry-tolerant handler. Tread retries failed deliveries.
How it works
- Register a subscription — Set the destination URL, the HMAC signing secret, and any custom request headers in Settings → Integrations → Webhooks.
- Pick triggers — Each subscription listens to one or more triggers. A trigger is a topic plus an event (for example,
Order::create). - Tread fires events — When a matching action happens in the app, Tread builds a JSON envelope and POSTs it to your URL.
- Verify the signature — Tread signs the body with HMAC-SHA256 using your secret. The signature lands in the
X-Tread-Hmac-sha256header. - Acknowledge with 2xx — A 2xx response marks the event delivered. Anything else triggers a retry.
Event topics and types
Tread emits events on these topics:| Topic | What it is |
|---|---|
Order | A daily order |
Job | One driver’s assignment for one order |
Load | One pickup-to-drop-off cycle |
Ticket | A scale ticket or driver-hour ticket |
ImportedProject | A project pushed in via the import API |
ImportedOrder | An order pushed in via the import API |
ImportedTicket | A ticket pushed in via the import API |
create, update, state_change, skip, error. Subscribe to the combinations you care about.
Payload format
Every delivery has the same envelope:payload field holds the resource as it appears in the Tread API. The event field is the topic and event type joined by ::. The attempt field starts at 1 and increments on retry.
Setup
Add a subscription
Enter your HTTPS endpoint URL. Generate or paste an HMAC signing secret. Tread will include the signature on every delivery.
Pick triggers
Select the topic-and-event combinations you want. Start narrow —
Order::create and Ticket::state_change cover most use cases.Add custom headers (optional)
If your endpoint needs an auth header or routing token, add it under request headers.
Signature verification
For each delivery, Tread computes:X-Tread-Hmac-sha256 header. Recompute on your side using the raw request body and compare. Reject any request where the signature does not match.
Retry behavior
- Failed deliveries (non-2xx, timeout, redirect) are retried with exponential backoff.
- Each subscription has a configurable retry limit. Once hit, the event is dropped and logged.
- The
attemptfield on the envelope tells you which retry you’re seeing. - Delivery timeout is 10 seconds. Acknowledge fast and process async.
Limitations
- HTTPS only. HTTP URLs are rejected at registration.
- One destination URL per subscription. To fan out, register multiple subscriptions.
- 10-second delivery timeout. Long-running handlers must respond first and process in the background.
- Tread does not guarantee event ordering. Use
event_timeto reconcile. - Replays are not supported. Once a delivery exhausts retries, it’s gone — design for at-least-once delivery and idempotent handlers.
Troubleshooting
Signature mismatch- Confirm you’re hashing the raw request body, not a parsed copy.
- Confirm you’re using the same HMAC cipher (default: SHA-256).
- Rotate the secret if it may have leaked.
- Reduce handler work — acknowledge immediately, queue the actual processing.
- Check the delivery log for response time.
- Confirm the subscription has the right trigger (topic + event).
- Confirm the action in Tread matches the topic.
Order::createfires on order creation, not order updates — addOrder::updateseparately.
Related
- API Reference — the resource shapes returned in the payload
- Agave — accounting integration; complements webhooks for AR/AP push