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.
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.
Per API Endpoint Rate Limits
These rate limits apply to specific endpoints. Not all endpoints have an endpoint-specific rate limit. 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.
Legacy API Rate Limits
Some of our legacy API endpoints (documented at https://www.samsara.com/api-legacy) have endpoint-specific rate limits. Here is the list:
Endpoint | Requests per second |
---|---|
GET /v1/fleet/dispatch/routes | 50 |
POST /v1/fleet/dispatch/routes | 50 |
GET /v1/fleet/dispatch/routes/job_updates | 50 |
POST /v1/fleet/drivers/:driverId/dispatch/routes | 50 |
POST /v1/fleet/vehicles/:vehicleId/dispatch/routes | 50 |
GET /v1/fleet/drivers/inactive | 75 |
GET /v1/fleet/drivers/summary | 75 |
GET /v1/fleet/hos_logs_summary | 30 |
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:
Header | Description |
---|---|
Retry-After | Suggested 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.
Updated over 1 year ago