Webhooks
Receive real-time notifications when events occur in your fleet.
Coming Soon
Webhook subscriptions are currently in beta. Contact support@motioneld.com to request access.
Available Events
| Event | Description |
|---|---|
driver.status_changed | Driver's duty status changed |
vehicle.location_updated | Vehicle position updated |
violation.created | New HOS violation detected |
alert.created | New safety alert triggered |
dvir.submitted | New DVIR report submitted |
Webhook Payload
All webhook payloads follow this structure:
{
"event": "driver.status_changed",
"timestamp": "2025-11-20T14:30:00Z",
"data": {
"driver_id": "550e8400-e29b-41d4-a716-446655440000",
"previous_status": "OFF",
"new_status": "DR",
"location": {
"lat": 34.0522,
"long": -118.2437
}
}
}
Security
Webhook payloads include an HMAC-SHA256 signature in the X-Signature header. Verify this signature using your webhook secret to ensure the payload is authentic.
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
Retry Policy
Failed webhook deliveries are retried with exponential backoff:
- 1st retry: 1 minute
- 2nd retry: 5 minutes
- 3rd retry: 30 minutes
- 4th retry: 2 hours
- 5th retry: 24 hours
After 5 failed attempts, the webhook is disabled. Re-enable it from your dashboard.