Skip to main content

GET /api/monitors

Requires Bearer token.
List your monitored locations. Example
curl "https://axiomlocus.io/api/monitors" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "monitors": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Mission District HQ",
      "lat": 37.7599,
      "lng": -122.4148,
      "created_at": "2025-12-01T08:00:00Z"
    }
  ]
}
FieldTypeDescription
monitorsarrayArray of monitored location objects.
monitors[].iduuidUnique monitor identifier.
monitors[].namestringUser-provided location name.
monitors[].latfloatLatitude.
monitors[].lngfloatLongitude.

POST /api/monitors

Requires Bearer token.
Add a new monitored location. Request body
{
  "name": "Mission District HQ",
  "lat": 37.7599,
  "lng": -122.4148
}
FieldTypeRequiredDefaultDescription
namestringA name for this monitored location.
latfloatLatitude.
lngfloatLongitude.
Example
curl -X POST "https://axiomlocus.io/api/monitors" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"name":"Mission District HQ","lat":37.7599,"lng":-122.4148}'
Response
{
  "monitor": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Mission District HQ",
    "lat": 37.7599,
    "lng": -122.4148,
    "user_id": "...",
    "created_at": "2025-12-01T08:00:00Z"
  }
}
FieldTypeDescription
monitorobjectThe newly created monitor object.

DELETE /api/monitors

Requires Bearer token.
Remove a monitored location. Query parameters
NameTypeRequiredDefaultDescription
iduuidThe monitor ID to delete.
Example
curl -X DELETE "https://axiomlocus.io/api/monitors?id=550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "success": true
}
FieldTypeDescription
successbooleanWhether the deletion succeeded.

GET /api/alerts/history

Requires Bearer token.
View alert history for your monitored locations. Example
curl "https://axiomlocus.io/api/alerts/history" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "alerts": [
    {
      "id": "a1b2c3d4",
      "monitor_id": "550e8400-...",
      "type": "score_change",
      "message": "Composite score dropped from 78 to 65",
      "created_at": "2025-12-15T14:30:00Z"
    }
  ]
}
FieldTypeDescription
alertsarrayArray of alert history objects.
alerts[].typestringAlert type (score_change, source_change, etc.).
alerts[].messagestringHuman-readable alert description.