Integrate RestroGuard with your IoT devices
All API requests require authentication. You can authenticate using one of two methods:
Include your API token in the Authorization header:
Authorization: Bearer YOUR_API_TOKEN
For device-only endpoints, you can use the Workspace-Id header:
Workspace-Id: YOUR_WORKSPACE_ID
/api/v1/alerts
Create a new alert from a device button press
Auth: Bearer or Workspace-Id
{
"serial": "string (device serial)",
"button_number": "integer (1-8)"
}
{
"success": true,
"data": {
"alert_id": 123,
"alert_type": "not_clean",
"button_number": 2
}
}
/api/v1/alerts
List all alerts with pagination
Auth: Bearer Token
{
"per_page": "integer (1-100)",
"resolved": "boolean",
"device_id": "integer"
}
{
"success": true,
"data": {
"alerts": [],
"pagination": []
}
}
/api/v1/alerts/counts
Get today's alert counts for all 8 button types
Auth: Bearer Token
{
"success": true,
"data": {
"today_counts": [],
"total_today": 50,
"unresolved": 3
}
}
/api/v1/alerts/{id}/resolve
Mark an alert as resolved
Auth: Bearer Token
{
"note": "string (optional)"
}
{
"success": true,
"data": {
"alert_id": 123,
"resolved_at": "2024-01-15T10:30:00Z"
}
}
/api/v1/devices/{serial}/heartbeat
Update device status (battery, signal)
Auth: Bearer or Workspace-Id
{
"battery_percent": "integer (0-100)",
"rssi": "integer"
}
{
"success": true,
"data": {
"device_id": 1,
"status": "online"
}
}
Mobile applications can fetch policy content using these public endpoints.
/api/v1/policies
Get all policy pages content.
{
"privacy_policy": "
/api/v1/policies/privacy
Get Privacy Policy content only.
{
"title": "Privacy Policy",
"content": "
/api/v1/policies/terms
Get Terms & Conditions content only.
/api/v1/policies/returns
Get Return Policy content only.