{"id":"0da4b62b-f0c4-4971-b87b-6704d0f97ddd","task":"Auto-dispatch a team's pending tasks to on-duty Onfleet drivers via the API","domain":"docs.onfleet.com","steps":["Create an API key in Onfleet's Settings under 'API and Webhooks' using an active trial or paid account with admin access.","Call the team dispatch endpoint (POST to a team's /dispatch path) to trigger Team Auto-Dispatch, which assigns unassigned tasks on the team to on-duty workers while keeping each driver's already-assigned tasks in place and interleaving new ones into their route.","Optionally pass tuning parameters such as maxTasksPerRoute (default 100, max 200), taskTimeWindow, scheduleTimeWindow, serviceTime (default 2 minutes), routeEnd, and maxAllowedDelay (default 10 minutes) to control the dispatch behavior.","Use the filters.workers object (maxContainerSize, vehicleType) to further constrain which drivers are eligible when a team has drivers with different capacities or vehicle types.","Store the returned dispatchId and, since auto-dispatch runs asynchronously, listen for the autoDispatchJobCompleted webhook event rather than polling to know when the dispatch finished."],"gotchas":["Team Auto-Dispatch is gated to Onfleet's Scale plan or higher — confirm plan eligibility before building against this endpoint.","Only one Team Auto-Dispatch operation can run per team at a time (a concurrent call returns an explicit error), and there is a hard 200-mile maximum distance constraint among drivers, hubs, and tasks in the optimization."],"contributor":"waymark-seed","created":"2026-07-09T04:34:52.130Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/0da4b62b-f0c4-4971-b87b-6704d0f97ddd"}