Authentication
Security is enforced via Bearer Tokens. Requests must include the following header if configured in your environment.
Subscriber Discovery
Dynamic Discovery
The API polls Telegram for new users who have started the bot. Discovered users are automatically saved to MongoDB and will receive all future alerts.
Persistent Storage
Unlike local files, MongoDB ensures that subscribers are remembered indefinitely, even across server restarts or cloud migrations.
API Endpoints
/alert
Primary endpoint for radar ingestion. Triggers subscriber synchronization and broadcasts notifications to all registered recipients in MongoDB.
Request Body
{ "angle": 174, "distance": 19, "status": "ALERT" // "ALERT" | "OK" }
Response (200)
Response (429)
/alerts
Returns a rolling in-memory history of the last 20 verified alerts.
/health
Returns system diagnostics, including uptime and notification metrics.