Generate an API token in the Samsara Cloud dashboard under Settings > API Tokens; the token is scoped to your organization
To fetch current vehicle locations, call GET https://api.samsara.com/fleet/vehicles/locations with the Authorization: Bearer <API_KEY> header; optionally filter by vehicleIds
For historical location data, use the GET /fleet/vehicles/locations/feed or /history endpoints supplying startTime and endTime in RFC 3339 format
To retrieve driver HOS logs, call GET /fleet/hos/logs supplying driverIds and a time window; the response includes duty status changes with timestamps and location
Paginate results using the hasNextPage flag and pagination cursor (endCursor) returned in each response; loop until hasNextPage is false
Known gotchas
Samsara's API enforces rate limits per token; bulk historical queries over long date ranges can exhaust limits quickly — break requests into shorter time windows and implement exponential backoff on 429 responses
HOS data is subject to FMCSA regulations; ensure your application handles and stores this data in compliance with applicable rules, as Samsara's terms require lawful use
Vehicle IDs in the Samsara API are internal Samsara identifiers, not VINs; use GET /fleet/vehicles to map VINs to Samsara vehicle IDs before filtering
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp