curl --request GET \
--url https://apiweb.mile.app/api/v4/alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/alerts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v4/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v4/alerts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v4/alerts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v4/alerts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/alerts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"current_page": 1,
"data": [
{
"_id": "66fb0c1d2e3f4a5b6c7d8e9f",
"alertCode": "geofence.enter",
"alertName": "Geofence enter",
"title": "Entered Warehouse A",
"message": "Driver entered Warehouse A.",
"assignee": "[email protected]",
"eventTime": "2026-10-15T02:10:00+00:00",
"lat": -6.2001,
"lon": 106.8166,
"geofenceId": "66e0a1b2c3d4e5f6a7b8c9d0",
"geofenceName": "Warehouse A",
"geofenceGroup": "66e0a0b1c2d3e4f5a6b7c8d9",
"dwelledMinutes": null,
"isResolved": false,
"resolvedTime": null,
"resolvedBy": null,
"resolvedByName": null,
"resolvedNotes": null
},
{
"_id": "66fb0c1d2e3f4a5b6c7d8ea0",
"alertCode": "idle.detected",
"alertName": "Idle detected",
"title": "Driver idle",
"message": "Driver has not moved for 15 minutes.",
"assignee": "[email protected]",
"eventTime": "2026-10-15T01:45:00+00:00",
"lat": -6.1754,
"lon": 106.8272,
"geofenceId": null,
"geofenceName": null,
"geofenceGroup": null,
"dwelledMinutes": null,
"isResolved": true,
"resolvedTime": "2026-10-15T02:00:00+00:00",
"resolvedBy": "[email protected]",
"resolvedByName": "Dispatcher One",
"resolvedNotes": "Driver was unloading."
}
],
"first_page_url": "https://apiweb.mile.app/api/v4/alerts?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/api/v4/alerts?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v4/alerts?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://apiweb.mile.app/api/v4/alerts",
"per_page": 20,
"prev_page_url": null,
"to": 2,
"total": 2
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Read alerts
Returns alerts of your organization, newest event first, paginated. An alert is a record of a monitored event about a driver, such as entering or leaving a geofence, stopping for too long, a task predicted to be late, leaving the planned route, or pressing the panic button. Known codes: geofence.enter, geofence.leave (driver entered or left a geofence), idle.detected, idle.repeated (driver stopped moving), task.lateness.predicted (a task is predicted to be late), route.deviation.detected (driver left the planned route), user.panic (panic button).
Without status, only unresolved alerts are returned. Days in date, from and to are local days in Asia/Jakarta time.
Requires permission view/alert.
curl --request GET \
--url https://apiweb.mile.app/api/v4/alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/alerts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v4/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v4/alerts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v4/alerts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v4/alerts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/alerts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"current_page": 1,
"data": [
{
"_id": "66fb0c1d2e3f4a5b6c7d8e9f",
"alertCode": "geofence.enter",
"alertName": "Geofence enter",
"title": "Entered Warehouse A",
"message": "Driver entered Warehouse A.",
"assignee": "[email protected]",
"eventTime": "2026-10-15T02:10:00+00:00",
"lat": -6.2001,
"lon": 106.8166,
"geofenceId": "66e0a1b2c3d4e5f6a7b8c9d0",
"geofenceName": "Warehouse A",
"geofenceGroup": "66e0a0b1c2d3e4f5a6b7c8d9",
"dwelledMinutes": null,
"isResolved": false,
"resolvedTime": null,
"resolvedBy": null,
"resolvedByName": null,
"resolvedNotes": null
},
{
"_id": "66fb0c1d2e3f4a5b6c7d8ea0",
"alertCode": "idle.detected",
"alertName": "Idle detected",
"title": "Driver idle",
"message": "Driver has not moved for 15 minutes.",
"assignee": "[email protected]",
"eventTime": "2026-10-15T01:45:00+00:00",
"lat": -6.1754,
"lon": 106.8272,
"geofenceId": null,
"geofenceName": null,
"geofenceGroup": null,
"dwelledMinutes": null,
"isResolved": true,
"resolvedTime": "2026-10-15T02:00:00+00:00",
"resolvedBy": "[email protected]",
"resolvedByName": "Dispatcher One",
"resolvedNotes": "Driver was unloading."
}
],
"first_page_url": "https://apiweb.mile.app/api/v4/alerts?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/api/v4/alerts?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v4/alerts?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://apiweb.mile.app/api/v4/alerts",
"per_page": 20,
"prev_page_url": null,
"to": 2,
"total": 2
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Query Parameters
Resolution filter. unresolved (default), resolved, or all.
Example: all
unresolved, resolved, all A single local day (Y-m-d). Cannot be combined with from / to.
Example: 2026-10-15
Start day of a range (Y-m-d). Requires to; cannot be combined with date.
Example: 2026-10-01
End day of a range (Y-m-d). Requires from; must be on or after from and at most 93 days after it.
Example: 2026-10-15
Only alerts with these codes. Repeat the parameter for several codes.
Example: alertCode[]=geofence.enter&alertCode[]=idle.detected
Only alerts about this driver (exact email, case-insensitive).
Example: [email protected]
The page number of results to retrieve. Example: 2
Number of alerts per page. Values above 100 are capped to 100. Default 20.
Example: 20
1 <= x <= 100