> ## Documentation Index
> Fetch the complete documentation index at: https://docsy3.mile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Alert Setting

> Alert settings switch each alert type on or off and set its limit for your organization

## What is Alert Setting?

Alert settings switch each alert type on or off for your organization and set the limit each alert type fires on. These endpoints are served under `/api/v4`.

`GET /alert-setting` returns the effective limits under `thresholds`: the defaults, unless your organization changed them. `PUT /alert-setting` accepts the switch flags (including `lowBattery`, `lowBatteryNotification`, `driverOffline` and `driverOfflineNotification`) and these optional limits, each a whole number:

| Field | Range | Default |
| - | - | - |
| `overspeedSpeedKmh` | 20–200 km/h | 80 |
| `idleDistanceMeters` | 10–1000 m | 50 |
| `idleWindowMinutes` | 5–120 min | 30 |
| `latenessGraceMinutes` | 0–60 min | 2 |
| `routeDeviationDistanceMeters` | 76–2000 m | 150 |
| `lowBatteryPercent` | 2–60 % | 15 |
| `driverOfflineMinutes` | 10–120 min | 30 |

A value that is not a whole number or is outside its range returns `400` with `failedCode` `alert-009`, and nothing is saved. A new limit applies to detections after it is saved; alerts already recorded do not change. The number of location updates in a row (`consecutivePings`) and the repeat time (`repeatMinutes`) are fixed. For low battery, `thresholds.lowBattery` returns `percent` (the limit), `resetPercent` (the limit plus 10) and `repeatMinutes` (30). For driver offline, `thresholds.driverOffline` returns `minutes` (the limit).

## Key Features

> [card] [Read alert setting](https://docsy3.mile.app/api-reference/monitoring/alert-setting/read-alert-setting.md)
>
> GET /alert-setting

> [card] [Update alert setting](https://docsy3.mile.app/api-reference/monitoring/alert-setting/update-alert-setting.md)
>
> PUT /alert-setting


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.