Webhooks API Reference
Subscribe to real-time inventory and domain lifecycle events over HTTPS. Every delivery is signed with HMAC-SHA256 and retried automatically with exponential backoff for up to 24 hours.
Webhook Subscriptions & Deliveries - subscribe, verify signatures & inspect delivery logs.
Manage webhook endpoints, send synthetic test events, and query delivery logs.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/webhooks | List all configured webhook subscriptions and the full list of supported event types. |
| POST | /api/webhooks | Register an HTTPS endpoint to receive real-time HMAC-signed event deliveries; returns the signing secret once on creation. |
| GET | /api/webhooks/{id} | Retrieve a webhook subscription's configuration and recent delivery attempts. |
| PUT | /api/webhooks/{id} | Update the target URL, subscribed event list, description, or active state of a webhook. |
| DELETE | /api/webhooks/{id} | Delete a webhook subscription and stop all future event deliveries. |
| POST | /api/webhooks/{id}/test | Queue a signed synthetic test event to verify that your endpoint validates the HMAC signature and returns 2xx. |
| GET | /api/webhooks/{id}/deliveries | Return a paginated log of webhook deliveries, HTTP status codes, and retry state. |
Webhook event types
Subscribe to any combination of the events below when creating or updating a webhook via POST /api/webhooks. Webhook deliveries do not count toward your hourly API rate limit.
| Event | Fires when |
|---|---|
domain.ingested | Initial onboarding and first full inventory scrape complete for a newly added dealer domain |
domain.scrape_completed | A scheduled or manual domain scrape job finishes |
domain.scrape_failed | A domain scrape job encounters an error |
vehicle.added | A new VIN appears in active inventory at a tracked domain |
vehicle.updated | Any field on an existing vehicle listing changes |
vehicle.price_changed | A vehicle's listed price moves up or down (payload includes old and new price) |
vehicle.removed | A VIN is delisted from a tracked dealer website |
alert.competitor_new_inventory | A competitor in a tracked group adds matching inventory |
alert.competitor_price_change | A competitor changes price on a comparable vehicle |
vla.boost_triggered | A reactive bid boost multiplier activates for a VIN in a VLA feed |
HMAC-SHA256 signature verification
When you create a webhook via POST /api/webhooks, the response includes a signing secret returned once. Every webhook HTTP POST delivery carries these headers:
X-MotorsDynamic-Event: vehicle.price_changed X-MotorsDynamic-Timestamp: 1735689600 X-MotorsDynamic-Signature: sha256=8f4e2b9a...
Compute HMAC-SHA256(secret, "<X-MotorsDynamic-Timestamp>.<raw_body>") and compare in constant time against X-MotorsDynamic-Signature. Reject deliveries whose timestamp is more than 5 minutes old. Non-2xx responses are retried automatically with exponential backoff for up to 24 hours.
import crypto from 'crypto';
function verifyWebhook(secret, timestamp, rawBody, signature) {
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const expected = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(`${timestamp}.${rawBody}`)
.digest('hex');
return expected.length === signature.length &&
crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}
List webhook subscriptions
List all configured webhook subscriptions and the full list of supported event types.
| Name | Type | Required | Description |
|---|---|---|---|
None | - | - | No parameters required |
curl -sS "https://api.motorsdynamic.com/api/webhooks" \ -H "X-API-Key: YOUR_API_KEY"
{
"webhooks": [
{
"id": 14,
"dealer_id": 42,
"agency_id": 3,
"url": "https://example.com/webhooks/motorsdynamic",
"events": ["domain.ingested", "vehicle.added", "vehicle.price_changed", "vehicle.removed"],
"is_active": true,
"description": "Primary inventory sync",
"created_at": "2026-10-01T12:00:00.000Z"
}
],
"supported_events": [
"domain.ingested",
"domain.scrape_completed",
"domain.scrape_failed",
"vehicle.added",
"vehicle.updated",
"vehicle.price_changed",
"vehicle.removed",
"alert.competitor_new_inventory",
"alert.competitor_price_change",
"vla.boost_triggered"
]
}
Create a webhook subscription
Register an HTTPS endpoint to receive real-time HMAC-signed event deliveries; returns the signing secret once on creation.
| Name | Type | Required | Description |
|---|---|---|---|
dealer_id | integer (body) | Yes | Numeric dealer or domain identifier |
url | string (body) | Yes | Target URL (dealer website URL or HTTPS webhook receiver URL) |
events | string[] (body) | Yes | Array of webhook event names to subscribe to |
description | string (body) | No | Optional human-readable description |
curl -sS -X POST "https://api.motorsdynamic.com/api/webhooks" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dealer_id": 42, "url": "https://example.com/webhooks/motorsdynamic", "events": ["domain.ingested", "vehicle.added", "vehicle.price_changed", "vehicle.removed"], "description": "Primary inventory sync"}'
{
"webhook": {
"id": 14,
"dealer_id": 42,
"url": "https://example.com/webhooks/motorsdynamic",
"events": ["domain.ingested", "vehicle.added", "vehicle.price_changed", "vehicle.removed"],
"secret": "whsec_4f8b9d2e1a7c6b5f3e2d1c0b9a8f7e6d",
"is_active": true
}
}
Get webhook detail and recent deliveries
Retrieve a webhook subscription's configuration and recent delivery attempts.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer (path) | Yes | Numeric resource identifier |
curl -sS "https://api.motorsdynamic.com/api/webhooks/14" \ -H "X-API-Key: YOUR_API_KEY"
{
"webhook": {
"id": 14,
"dealer_id": 42,
"url": "https://example.com/webhooks/motorsdynamic",
"events": ["domain.ingested", "vehicle.added", "vehicle.price_changed", "vehicle.removed"],
"is_active": true
},
"recent_deliveries": [
{ "id": 8910, "event": "vehicle.price_changed", "status": "delivered", "response_code": 200 }
]
}
Update a webhook subscription
Update the target URL, subscribed event list, description, or active state of a webhook.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer (path) | Yes | Numeric resource identifier |
url | string (body) | No | Updated HTTPS webhook endpoint URL |
events | string[] (body) | No | Updated array of subscribed event types |
is_active | boolean (body) | No | Enable or pause deliveries |
description | string (body) | No | Updated description |
curl -sS -X PUT "https://api.motorsdynamic.com/api/webhooks/14" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"events": ["vehicle.added", "vehicle.price_changed", "vehicle.removed"], "is_active": true}'
{
"webhook": {
"id": 14,
"events": ["vehicle.added", "vehicle.price_changed", "vehicle.removed"],
"is_active": true
}
}
Delete a webhook subscription
Delete a webhook subscription and stop all future event deliveries.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer (path) | Yes | Numeric resource identifier |
curl -sS -X DELETE "https://api.motorsdynamic.com/api/webhooks/14" \ -H "X-API-Key: YOUR_API_KEY"
{
"message": "Webhook deleted",
"id": 14
}
Send a test webhook delivery
Queue a signed synthetic test event to verify that your endpoint validates the HMAC signature and returns 2xx.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer (path) | Yes | Numeric resource identifier |
curl -sS -X POST "https://api.motorsdynamic.com/api/webhooks/14/test" \ -H "X-API-Key: YOUR_API_KEY"
{
"message": "Test delivery queued",
"delivery_id": 8911
}
List webhook delivery history
Return a paginated log of webhook deliveries, HTTP status codes, and retry state.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer (path) | Yes | Numeric resource identifier |
page | integer (query) | No | 1-based page number for paginated responses |
limit | integer (query) | No | Maximum number of results to return per page |
status | string (query) | No | pending | delivered | failed |
curl -sS "https://api.motorsdynamic.com/api/webhooks/14/deliveries?status=delivered&page=1&limit=25" \ -H "X-API-Key: YOUR_API_KEY"
{
"deliveries": [
{
"id": 8910,
"event": "vehicle.price_changed",
"status": "delivered",
"response_code": 200,
"attempts": 1,
"delivered_at": "2026-10-30T06:14:02.000Z"
}
],
"pagination": { "total": 148, "page": 1, "limit": 25, "pages": 6 }
}