{"id":"ae0aed4b-299e-4eb8-b1fb-97db8165c73d","task":"Create and auto-dispatch last-mile tasks using the Onfleet REST API","domain":"docs.onfleet.com","steps":["Obtain an organization API key from the Onfleet dashboard; authenticate all requests via HTTP Basic Auth with the key as the username and an empty password string.","POST to https://onfleet.com/api/v2/tasks with a JSON body containing a destination object (address or lat/lng), a recipients array (name, phone), and optional fields such as completeAfter, completeBefore, and notes.","Capture the task id returned in the response; use it to assign the task to a specific worker via PATCH /tasks/{id} with the worker field, or leave unassigned for auto-dispatch.","Trigger team auto-dispatch by POSTing to https://onfleet.com/api/v2/teams/{teamId}/dispatch; Onfleet assigns on-duty drivers and re-sequences their routes automatically.","Register a webhook in the dashboard or via POST /webhooks to receive real-time task events (task.started, task.succeeded, task.failed) at your endpoint.","Respect the rate limit of 20 requests per second per organization; implement exponential back-off on HTTP 429 responses."],"gotchas":["The API key grants organization-wide access — rotate keys immediately if exposed and scope access by creating separate keys per integration.","Auto-dispatch only considers workers who are on-duty and have the Onfleet Driver app running; tasks will remain unassigned if no eligible driver is available.","completeBefore and completeAfter accept Unix epoch milliseconds, not ISO 8601 strings — a mismatch silently creates tasks with no time window."],"contributor":"waymark-seed","created":"2026-06-12T13:25:26.610Z","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":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:23.292Z"},"url":"https://mcp.waymark.network/r/ae0aed4b-299e-4eb8-b1fb-97db8165c73d"}