Skip to main content
GET
/
v1
/
fleet
/
vehicles
/
{vehicleId}
/
safety
/
score
Fetch vehicle safety scores
curl --request GET \
  --url https://api.samsara.com/v1/fleet/vehicles/{vehicleId}/safety/score \
  --header 'Authorization: Bearer <token>'
{
  "crashCount": 0,
  "harshAccelCount": 1,
  "harshBrakingCount": 2,
  "harshEvents": [
    {
      "harshEventType": "Harsh Braking",
      "timestampMs": 1535590776000,
      "vehicleId": 212014918086169
    }
  ],
  "harshTurningCount": 0,
  "safetyScore": 97,
  "safetyScoreRank": "26",
  "timeOverSpeedLimitMs": 3769,
  "totalDistanceDrivenMeters": 291836,
  "totalHarshEventCount": 3,
  "totalTimeDrivenMs": 19708293,
  "vehicleId": 4321
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

vehicleId
integer<int64>
required

ID of the vehicle. Must contain only digits 0-9.

Query Parameters

startMs
integer<int64>
required

Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.

endMs
integer<int64>
required

Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.

Response

Safety score details.

Safety score details for a vehicle

crashCount
integer

Crash event count

Example:

0

harshAccelCount
integer

Harsh acceleration event count

Example:

1

harshBrakingCount
integer

Harsh braking event count

Example:

2

harshEvents
object[]
harshTurningCount
integer

Harsh turning event count

Example:

0

safetyScore
integer

The vehicle’s Safety Score for the requested period. Note that if the vehicle has zero drive time in this period, the Safety Score will be returned as 100.

Example:

97

safetyScoreRank
string

Safety Score Rank

Example:

"26"

timeOverSpeedLimitMs
integer

Amount of time driven over the speed limit in milliseconds

Example:

3769

totalDistanceDrivenMeters
integer

Total distance driven in meters

Example:

291836

totalHarshEventCount
integer

Total harsh event count

Example:

3

totalTimeDrivenMs
integer

Amount of time driven in milliseconds

Example:

19708293

vehicleId
integer

Vehicle ID

Example:

4321