Skip to main content
Webhooks let AutosnapAI push events to your server instead of making you poll. When a vehicle is added, updated, removed, or when an inventory import completes, we send a signed HTTP POST to a URL you configure.

When to use webhooks

  • Real-time inventory sync — keep your database in lockstep with AutosnapAI without polling
  • Marketing automation — trigger an email when a “Great Deal” vehicle hits inventory
  • Data warehouse pipelines — stream events into BigQuery, Snowflake, or similar
  • Alerting — notify your team when an important dealer’s inventory stops updating

Event types

Website Inventory Events

Dealer Health Check Events

IMS Feed Events

Website inventory events and IMS feed events are independent. If a dealership has both a website scraper and an IMS feed, you’ll receive events from both sources. Use the event prefix (ims.* vs no prefix) to distinguish the source.

Creating a webhook

You provide a secret (minimum 16 characters) when creating the webhook. This secret is used to sign every delivery so you can verify it came from AutosnapAI.
Response
The API creates one webhook record per event type. If you subscribe to 4 event types, the response created array will have 4 entries, each with its own webhook_id.

Webhook delivery format

Every webhook delivery is an HTTP POST with these headers:
The payload structure:

Per-Event Data Schemas

setup.complete

setup.failed

import.complete

vehicle.created / vehicle.updated / vehicle.removed

The data field contains the vehicle object directly (not wrapped in a {"vehicle": {...}} envelope):
Events are scoped per dealership. Each event’s top-level envelope includes the dealership_id the event belongs to. When a dealer group shares used-inventory across multiple rooftops, the same VIN may generate parallel events from each participating dealership — each event is legitimate for its own dealership scope. Deduplicate on (dealership_id, vin) if you need a unified view. See Concepts: Vehicles — Core identifiers for details.

ims.import.complete

Both events fire for every IMS feed import. If you subscribe to both, you will receive two webhooks per import with the same payload. Subscribe to one or the other, not both.

ims.feed.stale

ims.vehicle.created / ims.vehicle.updated / ims.vehicle.removed

For vehicle events (vehicle.created, vehicle.updated, vehicle.removed), the data field contains the vehicle object directly — it is NOT wrapped in a {"vehicle": {...}} envelope.

Signature verification

Always verify the signature on every webhook before acting on the payload. Anyone can POST to a public URL — signatures prove the request actually came from AutosnapAI. The X-Autosnap-Signature header contains an HMAC-SHA256 hex digest of the raw request body, computed using the secret you provided when creating the webhook:

Retry and delivery semantics

  • At-least-once delivery. You may receive the same event more than once — always make your handler idempotent.
  • Retry schedule. Failed deliveries are retried up to 3 total attempts with exponential backoff (approximately 4 seconds, then 8 seconds between retries). Only server errors (5xx) trigger retries — client errors (4xx) are not retried.
  • Auto-disable. After reaching the max_failures threshold (default 10, configurable when creating the webhook) of consecutive failures, the webhook subscription is automatically deactivated. Use the reactivate endpoint to re-enable it.
  • Timeout. Your endpoint must respond within 10 seconds. Longer responses are treated as failures. Do the minimum work synchronously (queue the event for background processing) and return a 2xx immediately.
  • Ordering. Events within a single dealership are generally ordered, but cross-dealership ordering is not guaranteed.

Inspecting deliveries

Returns delivery attempts (default 50, max 100) with status codes, response times, and error messages. Use the limit query parameter to control how many results are returned. Useful for debugging when events aren’t reaching your server.

Managing webhooks

Handling webhooks

Full end-to-end guide with receiver code and deployment tips

Webhook endpoints

Full webhook API reference