Rate Limits

The Samsara APIs have rate limits in place to protect our services from API traffic spikes that could put our servers at risk. If you exceed any of the rate limits described below, Samsara will respond with a 429 error code.

📘

Ad-Hoc Rate Limit Changes

Samsara reserves the right to change rate limits for system protection. As a principle, Samsara will plan to give a heads up before any changes are made. Changes do not happen often.

Global Rate Limits

These rate limit ceilings that apply to all API endpoints. Some API endpoints have more restrictive rate limits. See Per API Rate Limits below for more details.

  • Per token
    • Each API access token may make 150 API requests per second
  • Per organization
    • Each organization may make 200 API requests per second

In other words, a single API token may only make 150 requests per second. An organization may have multiple API tokens, but an organization may only make 200 requests per second total.

Endpoint-level Rate Limits

These rate limits apply to specific endpoints within an organization. Read the description for each individual endpoint in the API Reference to see if it has an endpoint-specific rate limit. See the equipment stats endpoint as an example. Not all endpoints have rate limits documented in the API reference, so refer to the below chart for more.

Endpoint-level Rate Limit Categories

There are 5 different rate limit categories. Each endpoint falls into one of these tiers. These rate limits are applied on a per organization basis.

CategoryRate Limit
Level One100 requests per minute
Level Two5 requests per second
Level Three10 requests per second
(Legacy) Tier 125 requests per second
(Legacy) Tier 250 requests per second

List of Rate Limits

🚧

The following Rate Limits will take effect starting October 23rd, 2023

The below are new endpoint-level rate limits. They will be rolling out starting October 23rd, 2023. For more information on how this rollout will be conducted and how it may impact you, refer to the Changelog post here. For further assistance, reach out to Samsara Support.

EndpointCategoryRate Limit
GET addressesLevel Two5 reqs/s
POST addressesLevel One100 reqs/min
DELETE addresses/.idLevel One100 reqs/min
GET addresses/.id(Legacy) Tier 125 reqs/s
PATCH addresses/.idLevel One100 reqs/min
GET attributesLevel Two5 reqs/s
POST attributesLevel One100 reqs/min
DELETE attributes/.idLevel One100 reqs/min
GET attributes/.idLevel Two5 reqs/s
PATCH attributes/.idLevel One100 reqs/min
DELETE beta/fleet/driver-vehicle-assignmentsLevel One100 reqs/min
GET beta/fleet/driver-vehicle-assignmentsLevel Two5 reqs/s
PATCH beta/fleet/driver-vehicle-assignmentsLevel One100 reqs/min
POST beta/fleet/driver-vehicle-assignmentsLevel One100 reqs/min
GET beta/fleet/reports/drivers/fuel-energyLevel Two5 reqs/s
GET beta/fleet/reports/vehicle/idling(Legacy) Tier 125 reqs/s
GET beta/fleet/reports/vehicles/fuel-energyLevel Two5 reqs/s
POST beta/ifta-detail/csvLevel One100 reqs/min
GET beta/ifta-detail/csv/.idLevel Two5 reqs/s
GET contactsLevel Two5 reqs/s
POST contactsLevel One100 reqs/min
DELETE contacts/.idLevel One100 reqs/min
GET contacts/.idLevel Two5 reqs/s
PATCH contacts/.idLevel One100 reqs/min
GET defect-typesLevel Two5 reqs/s
GET defects/streamLevel Two5 reqs/s
GET dvirs/streamLevel Two5 reqs/s
GET fleet/carrier-proposed-assignmentsLevel Two5 reqs/s
POST fleet/carrier-proposed-assignmentsLevel One100 reqs/min
DELETE fleet/carrier-proposed-assignments/.idLevel One100 reqs/min
GET fleet/defects/historyLevel Two5 reqs/s
PATCH fleet/defects/.idLevel One100 reqs/min
GET fleet/document-typesLevel Two5 reqs/s
GET fleet/documentsLevel Two5 reqs/s
POST fleet/documentsLevel One100 reqs/min
POST fleet/documents/pdfsLevel One100 reqs/min
GET fleet/documents/pdfs/.id(Legacy) Tier 125 reqs/s
DELETE fleet/documents/.idLevel One100 reqs/min
GET fleet/documents/.id(Legacy) Tier 125 reqs/s
DELETE fleet/driver-vehicle-assignmentsLevel One100 reqs/min
GET fleet/driver-vehicle-assignmentsLevel Two5 reqs/s
PATCH fleet/driver-vehicle-assignmentsLevel One100 reqs/min
POST fleet/driver-vehicle-assignmentsLevel One100 reqs/min
GET fleet/driversLevel Two5 reqs/s
POST fleet/driversLevel One100 reqs/min
GET fleet/drivers/efficiencyLevel Two5 reqs/s
GET fleet/drivers/tachograph-activity/historyLevel Two5 reqs/s
GET fleet/drivers/tachograph-files/historyLevel Two5 reqs/s
GET fleet/drivers/vehicle-assignments(Legacy) Tier 125 reqs/s
GET fleet/drivers/.id(Legacy) Tier 125 reqs/s
PATCH fleet/drivers/.idLevel One100 reqs/min
POST fleet/dvirsLevel One100 reqs/min
GET fleet/dvirs/history(Legacy) Tier 250 reqs/s
PATCH fleet/dvirs/.idLevel One100 reqs/min
GET fleet/equipmentLevel Two5 reqs/s
GET fleet/equipment/locationsLevel Two5 reqs/s
GET fleet/equipment/locations/feedLevel Two5 reqs/s
GET fleet/equipment/locations/historyLevel Two5 reqs/s
GET fleet/equipment/stats(Legacy) Tier 125 reqs/s
GET fleet/equipment/stats/feedLevel Three10 reqs/s
GET fleet/equipment/stats/historyLevel Three10 reqs/s
GET fleet/equipment/.equipmentIdLevel Two5 reqs/s
GET fleet/hos/clocks(Legacy) Tier 125 reqs/s
GET fleet/hos/daily-logsLevel Two5 reqs/s
GET fleet/hos/logsLevel Two5 reqs/s
GET fleet/reports/drivers/fuel-energyLevel Two5 reqs/s
GET fleet/reports/ifta/jurisdictionLevel Two5 reqs/s
GET fleet/reports/ifta/vehicle(Legacy) Tier 125 reqs/s
GET fleet/reports/vehicle/idling(Legacy) Tier 125 reqs/s
GET fleet/reports/vehicles/fuel-energy(Legacy) Tier 125 reqs/s
GET fleet/routesLevel Two5 reqs/s
POST fleet/routesLevel One100 reqs/min
GET fleet/routes/audit-logs/feedLevel Two5 reqs/s
DELETE fleet/routes/.idLevel One100 reqs/min
GET fleet/routes/.id(Legacy) Tier 125 reqs/s
PATCH fleet/routes/.idLevel One100 reqs/min
GET fleet/safety-events(Legacy) Tier 125 reqs/s
GET fleet/safety-events/audit-logs/feedLevel Two5 reqs/s
GET fleet/settings/complianceLevel Two5 reqs/s
PATCH fleet/settings/complianceLevel One100 reqs/min
GET fleet/settings/driver-appLevel Two5 reqs/s
PATCH fleet/settings/driver-appLevel One100 reqs/min
GET fleet/settings/safetyLevel Two5 reqs/s
GET fleet/trailersLevel Two5 reqs/s
POST fleet/trailersLevel One100 reqs/min
DELETE fleet/trailers/.idLevel One100 reqs/min
GET fleet/trailers/.idLevel Two5 reqs/s
PATCH fleet/trailers/.idLevel One100 reqs/min
GET fleet/vehicles(Legacy) Tier 125 reqs/s
GET fleet/vehicles/driver-assignmentsLevel Two5 reqs/s
GET fleet/vehicles/locations(Legacy) Tier 125 reqs/s
GET fleet/vehicles/locations/feed(Legacy) Tier 250 reqs/s
GET fleet/vehicles/locations/history(Legacy) Tier 250 reqs/s
GET fleet/vehicles/stats(Legacy) Tier 250 reqs/s
GET fleet/vehicles/stats/feed(Legacy) Tier 250 reqs/s
GET fleet/vehicles/stats/history(Legacy) Tier 250 reqs/s
GET fleet/vehicles/tachograph-files/historyLevel Two5 reqs/s
GET fleet/vehicles/.id(Legacy) Tier 125 reqs/s
PATCH fleet/vehicles/.idLevel One100 reqs/min
GET gatewaysLevel Two5 reqs/s
POST gatewaysLevel One100 reqs/min
DELETE gateways/.idLevel One100 reqs/min
POST ifta-detail/csvLevel One100 reqs/min
GET ifta-detail/csv/.idLevel Two5 reqs/s
GET industrial/assetsLevel Two5 reqs/s
POST industrial/assetsLevel One100 reqs/min
DELETE industrial/assets/.idLevel One100 reqs/min
PATCH industrial/assets/.idLevel One100 reqs/min
PATCH industrial/assets/.id/data-outputsLevel One100 reqs/min
GET industrial/data-inputsLevel Two5 reqs/s
GET industrial/data-inputs/data-pointsLevel Two5 reqs/s
GET industrial/data-inputs/data-points/feedLevel Two5 reqs/s
GET industrial/data-inputs/data-points/historyLevel Two5 reqs/s
GET meLevel Two5 reqs/s
POST messagesLevel One100 reqs/min
GET powerbi/version-checkLevel Two5 reqs/s
GET tagsLevel Two5 reqs/s
POST tagsLevel One100 reqs/min
DELETE tags/.idLevel One100 reqs/min
GET tags/.idLevel Two5 reqs/s
PATCH tags/.idLevel One100 reqs/min
PUT tags/.idLevel One100 reqs/min
GET user-rolesLevel Two5 reqs/s
GET usersLevel Two5 reqs/s
POST usersLevel One100 reqs/min
DELETE users/.idLevel One100 reqs/min
GET users/.idLevel Two5 reqs/s
PATCH users/.idLevel One100 reqs/min
GET v1/addressesLevel Two5 reqs/s
POST v1/addressesLevel One100 reqs/min
DELETE v1/addresses/.address_idLevel One100 reqs/min
GET v1/addresses/.address_id(Legacy) Tier 125 reqs/s
PATCH v1/addresses/.address_idLevel One100 reqs/min
GET v1/contactsLevel Two5 reqs/s
POST v1/contactsLevel One100 reqs/min
DELETE v1/contacts/.contact_idLevel One100 reqs/min
GET v1/contacts/.contact_idLevel Two5 reqs/s
PATCH v1/contacts/.contact_idLevel One100 reqs/min
POST v1/fleet/add_addressLevel One100 reqs/min
GET v1/fleet/assets(Legacy) Tier 125 reqs/s
GET v1/fleet/assets/locations(Legacy) Tier 250 reqs/s
GET v1/fleet/assets/reefers(Legacy) Tier 125 reqs/s
GET v1/fleet/assets/.assetId/locations(Legacy) Tier 125 reqs/s
GET v1/fleet/assets/.assetId/reefer(Legacy) Tier 125 reqs/s
GET v1/fleet/dispatch/routesLevel Two5 reqs/s
POST v1/fleet/dispatch/routesLevel One100 reqs/min
GET v1/fleet/dispatch/routes/job_updatesLevel Two5 reqs/s
DELETE v1/fleet/dispatch/routes/.route_external_idLevel One100 reqs/min
GET v1/fleet/dispatch/routes/.route_external_id(Legacy) Tier 125 reqs/s
PUT v1/fleet/dispatch/routes/.route_external_idLevel One100 reqs/min
GET v1/fleet/dispatch/routes/.route_external_id/historyLevel Two5 reqs/s
DELETE v1/fleet/dispatch/routes/.route_idLevel One100 reqs/min
GET v1/fleet/dispatch/routes/.route_id(Legacy) Tier 125 reqs/s
PUT v1/fleet/dispatch/routes/.route_idLevel One100 reqs/min
GET v1/fleet/dispatch/routes/.route_id/historyLevel Two5 reqs/s
GET v1/fleet/drivers(Legacy) Tier 125 reqs/s
POST v1/fleet/driversLevel One100 reqs/min
DELETE v1/fleet/drivers/createLevel One100 reqs/min
GET v1/fleet/drivers/createLevel Two5 reqs/s
PATCH v1/fleet/drivers/createLevel One100 reqs/min
POST v1/fleet/drivers/createLevel One100 reqs/min
GET v1/fleet/drivers/document_types(Legacy) Tier 125 reqs/s
GET v1/fleet/drivers/documentsLevel Two5 reqs/s
GET v1/fleet/drivers/inactiveLevel Two5 reqs/s
GET v1/fleet/drivers/inactive/.driver_idLevel Two5 reqs/s
PUT v1/fleet/drivers/inactive/.driver_idLevel One100 reqs/min
GET v1/fleet/drivers/inactive/.external_driver_idLevel Two5 reqs/s
PUT v1/fleet/drivers/inactive/.external_driver_idLevel One100 reqs/min
GET v1/fleet/drivers/summaryLevel Two5 reqs/s
POST v1/fleet/drivers/summaryLevel One100 reqs/min
DELETE v1/fleet/drivers/.driver_idLevel One100 reqs/min
GET v1/fleet/drivers/.driver_id(Legacy) Tier 125 reqs/s
PATCH v1/fleet/drivers/.driver_idLevel One100 reqs/min
POST v1/fleet/drivers/.driver_idLevel One100 reqs/min
GET v1/fleet/drivers/.driver_id/dispatch/routes(Legacy) Tier 125 reqs/s
POST v1/fleet/drivers/.driver_id/dispatch/routesLevel One100 reqs/min
POST v1/fleet/drivers/.driver_id/documentsLevel One100 reqs/min
DELETE v1/fleet/drivers/.driver_id/documents/.document_idLevel One100 reqs/min
GET v1/fleet/drivers/.driver_id/documents/.document_id(Legacy) Tier 125 reqs/s
POST v1/fleet/drivers/.driver_id/hos/duty_statusLevel One100 reqs/min
GET v1/fleet/drivers/.driver_id/safety/scoreLevel Two5 req/s
DELETE v1/fleet/drivers/.external_driver_idLevel One100 reqs/min
GET v1/fleet/drivers/.external_driver_idLevel Two5 reqs/s
PATCH v1/fleet/drivers/.external_driver_idLevel One100 reqs/min
POST v1/fleet/drivers/.external_driver_idLevel One100 reqs/min
GET v1/fleet/hos_authentication_logs(Legacy) Tier 250 reqs/s
POST v1/fleet/hos_authentication_logsLevel One100 reqs/min
GET v1/fleet/hos_logs(Legacy) Tier 125 reqs/s
POST v1/fleet/hos_logs(Legacy) Tier 125 reqs/s
GET v1/fleet/hos_logs_summaryLevel Two5 reqs/s
POST v1/fleet/hos_logs_summaryLevel One100 reqs/min
GET v1/fleet/list(Legacy) Tier 125 reqs/s
POST v1/fleet/listLevel One100 reqs/min
GET v1/fleet/locations(Legacy) Tier 250 reqs/s
POST v1/fleet/locationsLevel One100 reqs/min
GET v1/fleet/maintenance/dvirs(Legacy) Tier 125 reqs/s
POST v1/fleet/maintenance/dvirsLevel One100 reqs/min
GET v1/fleet/maintenance/list(Legacy) Tier 250 reqs/s
POST v1/fleet/maintenance/listLevel One100 reqs/min
GET v1/fleet/messagesLevel Two5 reqs/s
POST v1/fleet/messagesLevel One100 reqs/min
POST v1/fleet/set_dataLevel One100 reqs/min
GET v1/fleet/trailers/assignments(Legacy) Tier 125 reqs/s
GET v1/fleet/trailers/.trailerId/assignments(Legacy) Tier 125 reqs/s
GET v1/fleet/trips(Legacy) Tier 250 reqs/s
POST v1/fleet/tripsLevel One100 reqs/min
GET v1/fleet/vehicles/locationsLevel Two5 reqs/s
GET v1/fleet/vehicles/statsLevel Three10 reqs/s
GET v1/fleet/vehicles/.external_vehicle_idLevel Two5 reqs/s
PATCH v1/fleet/vehicles/.external_vehicle_idLevel One100 reqs/min
GET v1/fleet/vehicles/.vehicle_id(Legacy) Tier 125 reqs/s
PATCH v1/fleet/vehicles/.vehicle_idLevel One100 reqs/min
GET v1/fleet/vehicles/.vehicle_id/dispatch/routesLevel Two5 reqs/s
POST v1/fleet/vehicles/.vehicle_id/dispatch/routesLevel One100 reqs/min
GET v1/fleet/vehicles/.vehicle_id/locations(Legacy) Tier 250 reqs/s
GET v1/fleet/vehicles/.vehicle_id/safety/harsh_event(Legacy) Tier 250 reqs/s
GET v1/fleet/vehicles/.vehicle_id/safety/scoreLevel Two5 req/s
POST v1/industrial/csv_importsLevel One100 reqs/min
GET v1/industrial/dataLevel Two5 reqs/s
GET v1/industrial/data/.dataInputIdLevel Two5 reqs/s
GET v1/industrial/machinesLevel Two5 reqs/s
GET v1/industrial/machines/.machineIdLevel Two5 reqs/s
GET v1/industrial/machines/.machineId/formLevel Two5 reqs/s
POST v1/industrial/machines/.machineId/formLevel One100 reqs/min
GET v1/industrial/machines/.machineId/formsLevel Two5 reqs/s
POST v1/industrial/machines/.machineId/formsLevel One100 reqs/min
GET v1/industrial/mes/linesLevel Two5 reqs/s
GET v1/industrial/mes/recipesLevel Two5 reqs/s
GET v1/industrial/mes/runsLevel Two5 reqs/s
GET v1/industrial/mes/runs/line/.external_line_idLevel Two5 reqs/s
GET v1/industrial/mes/runs/line/.line_idLevel Two5 reqs/s
GET v1/industrial/mes/work_ordersLevel Two5 reqs/s
POST v1/industrial/mes/work_ordersLevel One100 reqs/min
DELETE v1/industrial/mes/work_orders/.external_work_order_idLevel One100 reqs/min
GET v1/industrial/mes/work_orders/.external_work_order_idLevel Two5 reqs/s
PATCH v1/industrial/mes/work_orders/.external_work_order_idLevel One100 reqs/min
DELETE v1/industrial/mes/work_orders/.idLevel One100 reqs/min
GET v1/industrial/mes/work_orders/.idLevel Two5 reqs/s
PATCH v1/industrial/mes/work_orders/.idLevel One100 reqs/min
GET v1/industrial/vision/camerasLevel Two5 reqs/s
GET v1/industrial/vision/cameras/.cameraId/programsLevel Two5 reqs/s
GET v1/industrial/vision/run/camera/.cameraIdLevel Two5 reqs/s
GET v1/industrial/vision/run/camera/.cameraId/program/.programIdLevel Two5 reqs/s
GET v1/industrial/vision/runsLevel Two5 reqs/s
GET v1/industrial/vision/runs/.cameraIdLevel Two5 reqs/s
GET v1/industrial/vision/runs/.cameraId/.programId/.startedAtMsLevel Two5 reqs/s
POST v1/machines/historyLevel One100 reqs/min
POST v1/machines/listLevel One100 reqs/min
GET v1/sensors/cargoLevel Two5 reqs/s
POST v1/sensors/cargoLevel One100 reqs/min
GET v1/sensors/doorLevel Two5 reqs/s
POST v1/sensors/doorLevel One100 reqs/min
POST v1/sensors/historyLevel One100 reqs/min
GET v1/sensors/humidityLevel Two5 reqs/s
POST v1/sensors/humidityLevel One100 reqs/min
GET v1/sensors/listLevel Two5 reqs/s
POST v1/sensors/listLevel One100 reqs/min
GET v1/sensors/temperatureLevel Two5 reqs/s
POST v1/sensors/temperatureLevel One100 reqs/min
GET v1/tagsLevel Two5 reqs/s
POST v1/tagsLevel One100 reqs/min
DELETE v1/tags/.tagIdLevel One100 reqs/min
GET v1/tags/.tagIdLevel Two5 reqs/s
PATCH v1/tags/.tagIdLevel One100 reqs/min
PUT v1/tags/.tagIdLevel One100 reqs/min
GET v1/user_rolesLevel Two5 reqs/s
GET v1/usersLevel Two5 reqs/s
POST v1/usersLevel One100 reqs/min
DELETE v1/users/.userIdLevel One100 reqs/min
GET v1/users/.userIdLevel Two5 reqs/s
PATCH v1/users/.userIdLevel One100 reqs/min
GET v1/versions/meLevel Two5 reqs/s
GET versions/meLevel Two5 reqs/s
GET v1/fleet/drivers/.driver_id/hos_daily_logs(Legacy) Tier 125 reqs/s
PATCH v1/fleet/drivers/.driver_id/hos_daily_logsLevel One100 reqs/min
GET assets/location-and-speed/streamLevel Two5 reqs/s
GET beta/address-events/historyLevel Two5 reqs/s
GET beta/aemp/Fleet/.pageNumberLevel Two5 reqs/s
GET beta/aemp/fleet/equipment/.idLevel Two5 reqs/s
GET beta/attributesLevel Two5 reqs/s
POST beta/attributesLevel One100 reqs/min
DELETE beta/attributes/.idLevel One100 reqs/min
GET beta/attributes/.idLevel Two5 reqs/s
PATCH beta/attributes/.idLevel One100 reqs/min
GET beta/fleet/drivers/efficiencyLevel Two5 reqs/s
PATCH beta/fleet/equipment/.idLevel One100 reqs/min
GET beta/fleet/hos/diagnostic-and-malfunction-eventsLevel Two5 reqs/s
GET beta/fleet/hos/drivers/eld-eventsLevel Two5 reqs/s
GET beta/fleet/hos/violationsLevel Two5 reqs/s
GET beta/fleet/trailers/stats(Legacy) Tier 125 reqs/s
GET beta/fleet/trailers/stats/feed(Legacy) Tier 125 reqs/s
GET beta/fleet/trailers/stats/historyLevel Three10 reqs/s
PATCH beta/fleet/vehicles/.id/immobilizerLevel One100 reqs/min
GET beta/webhooksLevel Two5 reqs/s
POST beta/webhooksLevel One100 reqs/min
DELETE beta/webhooks/.idLevel One100 reqs/min
GET beta/webhooks/.idLevel Two5 reqs/s
PATCH beta/webhooks/.idLevel One100 reqs/min

Handling Rate Limits

When an application hits a rate limit, the API will return an API response with a HTTP status code of 429 Too Many Requests.

The response will include the following header:

HeaderDescription
Retry-AfterSuggested time to wait before retrying (in seconds). Example: 0.40235

You should use the Retry-After header in order to appropriately back-off the endpoint so that you do not get rate-limited again.

Below is a sample Python script that retrieves the current snapshot of the locations of all of your vehicles data from our API while gracefully handling rate limits. The script is designed to adhere to the API’s rate-limiting guidelines by utilizing the Retry-After header. This ensures that the script will pause and retry the request based on the guidance, thus minimizing the chances of encountering a “429 Too Many Requests” error. Feel free to modify it to suit your specific endpoints and convenience.

import requests  
import time

def make_api_request(url, headers):

    while True:  #Loop for retries
        response = requests.get(url, headers=headers)
        
        if response.status_code != 429:  #Status other than 'Too Many Requests'
            return response
        
        #Encountered rate limit, get the time to wait from the 'Retry-After' header
        retry_after = float(response.headers.get('Retry-After', 1))  #Default to 1 second if header is missing
        
        print(f"Rate limit exceeded. Retrying in {retry_after} seconds.")
        
        # Wait for the duration specified in 'Retry-After' before making another request
        time.sleep(retry_after)

if __name__ == '__main__':
    url = "https://api.samsara.com/fleet/vehicles/stats?types=gps"  #Replace with the actual API endpoint
    headers = {"Authorization": "Bearer YOUR_API_TOKEN"}  #Replace with your actual access token

    response = make_api_request(url, headers)
    
    if response:
        print(f"Successfully received data: {response.json()}")
    else:
        print("Failed to retrieve data.")