Generate an API token from the Samsara cloud dashboard under Settings > API Tokens; tokens are scoped to an organization.
For a current snapshot of all vehicles, send GET https://api.samsara.com/fleet/vehicles/stats with the Authorization header set to your API token; specify the types query parameter (comma-separated) to request specific stat types such as engineStates, fuelPercents, obdOdometerMeters, engineHours.
For historical data within a specific time range, send GET https://api.samsara.com/fleet/vehicles/stats/history with startTime and endTime in RFC 3339 format plus the types parameter.
For continuous synchronization, use the feed endpoint GET https://api.samsara.com/fleet/vehicles/stats/feed; it returns a pagination cursor in the response; pass that cursor as the after parameter in subsequent calls to receive only new events.
All endpoints are paginated; follow the hasNextPage field and the endCursor in the pagination object to retrieve all records.
Pair with GET https://api.samsara.com/fleet/vehicles/locations/feed for location data, using the same cursor-based pagination pattern.
Known gotchas
The /stats/history endpoint is not appropriate for continuous synchronization because it can miss data during gaps caused by connectivity issues; use /stats/feed for ongoing sync.
Not all stat types are available for all vehicles; a vehicle must have a compatible Samsara gateway or OBD dongle installed and configured to report a given stat type.
API rate limits apply per organization token; when polling the feed endpoint for large fleets, respect the Retry-After header on 429 responses and implement exponential backoff.
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