Alerts
Alerts are how Pointeron notifies you about important events — they allow you to set up notifications for geofence breaches, speed violations, and other location-based triggers. On this page, we'll dive into the different alert endpoints you can use to manage alerts programmatically. We'll look at how to query, create, update, and delete alerts.
The alert model
The alert model contains all the information about the alerts you configure for your assets and geofences, including the trigger type, severity, and notification settings.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the alert.
- Name
asset_id- Type
- string
- Description
Unique identifier for the asset associated with the alert.
- Name
name- Type
- string
- Description
The name for the alert.
- Name
trigger_type- Type
- string
- Description
The type of trigger (e.g., geofence_entry, geofence_exit, speed_limit).
- Name
severity- Type
- string
- Description
The severity level (info, warning, critical).
- Name
is_active- Type
- boolean
- Description
Whether or not the alert is currently active.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the alert was created.
List all alerts
This endpoint allows you to retrieve a paginated list of all your alerts (for an asset if an asset id is provided). By default, a maximum of ten alerts are shown per page.
Optional attributes
- Name
asset_id- Type
- string
- Description
Limit to alerts from a given asset.
- Name
limit- Type
- integer
- Description
Limit the number of alerts returned.
Request
curl -G https://api.pointeron.com/v1/alerts \
-H "Authorization: Bearer {token}" \
-d asset_id="WAz8eIbvDR60rouK" \
-d limit=10
Response
{
"has_more": false,
"data": [
{
"id": "Nc6yKKMpcxiiFxp6",
"asset_id": "WAz8eIbvDR60rouK",
"name": "Warehouse Exit Alert",
"trigger_type": "geofence_exit",
"severity": "warning",
"is_active": true,
"created_at": 692233200
},
{
"id": "hSIhXBhNe8X1d8Et"
// ...
}
]
}
Create an alert
This endpoint allows you to create a new alert for an asset in your Pointeron organization.
Required attributes
- Name
name- Type
- string
- Description
The name for the alert.
- Name
trigger_type- Type
- string
- Description
The type of trigger (e.g., geofence_entry, geofence_exit, speed_limit).
- Name
asset_id- Type
- string
- Description
Unique identifier for the asset to monitor.
Optional attributes
- Name
severity- Type
- string
- Description
The severity level (info, warning, critical). Defaults to info.
Request
curl https://api.pointeron.com/v1/alerts \
-H "Authorization: Bearer {token}" \
-d name="Warehouse Exit Alert" \
-d trigger_type="geofence_exit" \
-d asset_id="WAz8eIbvDR60rouK"
Response
{
"id": "Nc6yKKMpcxiiFxp6",
"asset_id": "WAz8eIbvDR60rouK",
"name": "Warehouse Exit Alert",
"trigger_type": "geofence_exit",
"severity": "info",
"is_active": true,
"created_at": 692233200
}
Retrieve an alert
This endpoint allows you to retrieve an alert by providing the alert id. Refer to the list at the top of this page to see which properties are included with alert objects.
Request
curl https://api.pointeron.com/v1/alerts/Nc6yKKMpcxiiFxp6 \
-H "Authorization: Bearer {token}"
Response
{
"id": "Nc6yKKMpcxiiFxp6",
"asset_id": "WAz8eIbvDR60rouK",
"name": "Warehouse Exit Alert",
"trigger_type": "geofence_exit",
"severity": "warning",
"is_active": true,
"created_at": 692233200
}
Update an alert
This endpoint allows you to perform an update on an alert. Currently, the supported updates include changing the name, severity, and active status.
Optional attributes
- Name
name- Type
- string
- Description
The new name for the alert.
- Name
severity- Type
- string
- Description
The new severity level (info, warning, critical).
- Name
is_active- Type
- boolean
- Description
Whether or not the alert is currently active.
Request
curl -X PUT https://api.pointeron.com/v1/alerts/Nc6yKKMpcxiiFxp6 \
-H "Authorization: Bearer {token}" \
-d severity="critical"
Response
{
"id": "Nc6yKKMpcxiiFxp6",
"asset_id": "WAz8eIbvDR60rouK",
"name": "Warehouse Exit Alert",
"trigger_type": "geofence_exit",
"severity": "critical",
"is_active": true,
"created_at": 692233200
}
Delete an alert
This endpoint allows you to delete alerts. Note: This will permanently delete the alert and stop all notifications.
Request
curl -X DELETE https://api.pointeron.com/v1/alerts/Nc6yKKMpcxiiFxp6 \
-H "Authorization: Bearer {token}"