REAL-TIME EVENT STREAM
Vega Webhooks Specification
Receive real-time HTTP POST notifications on your server whenever vehicle positions change or alert rules trigger.
Supported Webhook Event Types
- alert.triggered — Speeding, SOS, Geofence Entry/Exit, Fuel Theft
- device.position — High-frequency real-time location update
- device.status — Device online, offline, or battery low state
- task.completed — Field operation job dispatch complete
Sample Webhook JSON Payload
{
"event": "alert.triggered",
"timestamp": "2026-08-05T20:30:00.000Z",
"org_id": "org_vega_demo",
"data": {
"imei": "864512049182341",
"device_name": "Delivery Van #14",
"alert_type": "GEOFENCE_EXIT",
"geofence_name": "Central Warehouse Zone",
"location": { "lat": 23.8103, "lng": 90.4125, "speed": 42.5 }
}
}
HMAC Signature Security
Every webhook request includes an X-Vega-Signature header computed as HMAC-SHA256(payload, secret) to ensure authenticity.
const crypto = require('crypto');
const expectedSig = crypto.createHmac('sha256', WEBHOOK_SECRET).update(rawBody).digest('hex');
const expectedSig = crypto.createHmac('sha256', WEBHOOK_SECRET).update(rawBody).digest('hex');