The Horizon API is a REST API that returns JSON. It conforms to OpenAPI 3.0.3 and covers the same data your team manages in the Tread Horizon app — projects, orders, dispatch, tickets, settlements, and more. Every endpoint listed in this reference is auto-generated from the live spec.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.
Base URL
All requests go to a single host. There is one production server today.Sandbox access is provisioned per customer. Contact developers@tread.io to request a sandbox tenant.
Authentication
The API uses bearer tokens. Two flows exist depending on who is calling.- User session tokens — for human users. Stytch issues a short-lived JWT after a user logs in (email + password, magic link, or SSO). Use this when building tools that act on behalf of a signed-in user.
- Machine-to-machine (M2M) tokens — for server-to-server integrations. Tread issues a Client ID and Client Secret. Exchange them at the auth endpoint for an access token using the OAuth 2.0 client credentials grant.
Bearer header.
401 unauthorized, fetch a new one. See Generate an auth token for the exact request shape, plus the rest of the Authentication group in the sidebar. To get M2M credentials, email developers@tread.io.
Required headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <token> |
Content-Type | On POST, PUT, PATCH | application/json |
Accept | No | application/json (default) |
Accept-Language | No | en-ca, es-us, or fr-ca. Translates error messages. |
Content-Type returns 415 unsupported_media_type. An invalid Accept returns 406 not_acceptable.
Pagination
List endpoints use cursor-based pagination. Passpage[limit] to set page size. The default is 25 and the maximum is 100.
Link header with next and prev URLs when more results exist.
next link until the header no longer includes one. The page[after] cursor is opaque — do not parse it.
Errors
Every error response uses the same envelope. Thecode mirrors the HTTP status.
| HTTP | code | When you’ll see it |
|---|---|---|
| 400 | bad_request | Malformed request. |
| 401 | unauthorized | Missing or expired token. |
| 403 | forbidden | The user lacks permission for this action. |
| 404 | object_not_found | The resource does not exist or is not visible. |
| 409 | conflict | The action violates a state machine rule. |
| 415 | unsupported_media_type | Content-Type is wrong. |
| 422 | unprocessable_content | Validation failed. The errors array names the field. |
| 500 | internal_server_error | Reach out to support. |
| 503 | service_unavailable | Retry after a short backoff. Requests time out at 60 seconds. |
409 and 422 responses include an errors array with model, field, and message fields you can surface to end users.
Resources
The API exposes most of what Horizon manages. Major resource families:| Family | Notes |
|---|---|
| Projects, Orders, Jobs, Loads | The dispatch hierarchy. A project holds orders. An order holds jobs. A job is one driver’s work. A load is one cycle. |
| Tickets, Timesheets, DriverDays | Proof of work. Tickets capture material. DriverDays capture hours. |
| Users, Drivers, Foremen | People with access — defined by Roles and Permissions. |
| Sites | Pickup and delivery locations with geofences. |
| Companies, CompanyShares | The company you operate as, plus parent/child relationships. |
| Equipment, EquipmentTypes | Trucks and the type they belong to. Capacity lives on the Type. |
| Materials, MaterialRates | What you haul and how it is priced. |
| Rates, AddOns, FuelSurcharges | The pricing model — base rates, fees, fuel adjustments. |
| Settlements, Invoices | Driver/vendor pay and customer billing. |
| Integrations, Telematics, Agave | Connections to QuickBooks, Sage, Samsara, Geotab, paver telemetry, and HCSS. |
Webhooks
Tread can push events to your endpoint when records change — orders accepted, loads approved, tickets created, and more. Webhooks are configured per company. See the Webhooks integration page for setup, retry behavior, and the event catalog.Child companies and multi-entity
A company can have a parent. A user in the parent has the same role and permission level in every child. Most endpoints scope to a company via the URL — for example,GET /v1/companies/{company-id}/projects lists projects for one specific company. Use the company-scoped variant when you need to read or write data inside a child.
parent_company_id is set at creation and cannot be changed. Circular references are rejected. List child companies with GET /v1/companies/{company-id}/children.
Quick example
Fetch the first page of projects for a company.Going further
Generate an auth token
Log in and exchange credentials for a bearer token.
Webhooks
Subscribe to events and receive them in real time.
Tread Horizon app
Sign in to the platform that backs this API.
Status
Live uptime and incident history.