Skip to content
MargRakshak AI — Roadside Hazard Detection NetworkPre-pilot · Corridor New DelhiSpec v3.0 · Build 2026.11
MRAI logo
MRAI
by UniWebs
All clear
14ms
Document register

Interface Control Document — Telemetry API

The contract a node must satisfy: endpoint, schema, authentication, error codes, and retry behaviour.

Document
MRAI-DOC-002
Revision
Rev. 2.1
Effective
2026-08-27
Classification
Public

01 · Endpoint

POST https://projectmrai.lovable.app/api/public/telemetry

Content-Type: application/json. One packet per request.

02 · Authentication

Every request carries the header X-Device-Key with the 48-character key issued when the node was registered.

A missing or unknown key is rejected. Keys are node-scoped: a key can only write readings for its own node.

03 · Request schema

node_id — string, the registered node identifier.

rain — one of DRY, LIGHT, HEAVY.

obstacle — one of CLEAR, RISK, BLOCKED.

distance — integer centimetres from the ultrasonic sensor.

gas — one of SAFE, WARN, ALERT.

recorded_at — optional ISO-8601 timestamp; used for replayed offline packets.

04 · Responses

200 — packet accepted and stored.

400 — malformed body or a field outside its allowed set.

401 — missing or invalid device key.

404 — the node_id is not in the registry.

5xx — transient service fault; the node should retry.

05 · Offline buffering contract

A node that cannot reach the service queues packets locally and replays them with their original recorded_at once the link returns.

The service accepts backdated readings. Replayed packets do not re-open incidents that have already been resolved.

Retry with exponential backoff starting at 5 s, capped at 5 minutes. Do not retry a 400 or 401.

Issued by UniWebs — Kavy (software) & Saksham (hardware)
Operator of record
UniWebs — Kavy (software) & Saksham (hardware)
Independent student-run studio · not a government body
Enquiries
operations@projectmrai.in
Revision
Spec v3.0 · Build 2026.11
Last reviewed 2026-11-02