Webhooks
Receive notifications from AutoGrab system on events to power your own experiences.
The Webhooks API allows you to configure endpoints which will receive PUSH events from AutoGrab.
This API requires authentication and an appropriate license attached to it.
Webhook Events
There are several types of events that you can listen to using the Webhooks API. The names and descriptions of each of these events are included below.
You can find example payloads for each of these events at the bottom of this page.
ping
If you use the POST /v2/webhooks/{WEBHOOK_ID}/ping endpoint, your webhook will be called with the ping event to test the connection.
recapture_new
One of your Recapture customers was spotted on a used car listing website.
recapture_price_change
The listing price on one of your active Recapture customers changed.
recapture_delist
One of your Recapture customers removed their vehicle listing - either to cancel the sale or because it has been sold.
valuation_change
One of your previous price predictions has changed by (at least) the threshold defined in your valuation changes config (/valuations/changes)
Currently, only the ping, recapture_new and price_change events are in use. You can still configure your webhooks to listen to the other events to enable these events once they are supported.
If you need immediate access to Recapture price change and delist events for your use case, please reach out to us at [email protected]
Create a new Webhook
To set up a webhook event subscriber, you'll first need to create the webhook using the webhook API.
You must provide a few options in the request body:
name: A name for the webhook. This is used for reference only.region: The region that you want to subscribe to events in (uk)format: The format that you want the PUSH events to be sent in (Currently, onlyjsonis supported)endpoint: The HTTP endpoint that you want the webhook to push to. You can include URL parameters in this to facilitate token-based auth.
Example
To perform an example request:
An example response payload is:
You can explore this request further in the API Playground.
Get a list of your webhooks
A GET request to /v2/webhooks?region=uk will return a list of all your configured webhooks in the given region.
Example
To perform an example request:
An example response payload is:
You can explore this request further in the API Playground.
Get the configuration of a single webhook
A GET request to /v2/webhooks/{WEBHOOK_ID}?region={REGION} will return the configuration of the webhook with the corresponding ID.
The payloads are the same as the /v2/webhooks route but only a single webhook is returned instead of an array.
If you try to access a webhook in a different region to the one specified in the request, you will receive an Invalid Region error. Additionally, accessing a webhook that your account does not have permission to view will return a You don't have permission to access that webhook error.
If you attempt to view a webhook that doesn't exist, you will receive an Invalid Webhook ID error.
Example
To perform an example request:
An example response payload is:
You can explore this request further in the API Playground.
Modify the configuration of a single webhook
A PATCH request to /v2/webhooks/{WEBHOOK_ID}?region={REGION} allows you to modify any of the properties of the corresponding Webhook.
Only the fields specified in the request body will be modified, and passing a blank ("") value will remove the property from the webhook where applicable.
The response includes the updated webhook, as well as a map of every property that changed.
The same errors as the above (GET /v2/webhooks/${WEBHOOK_ID}) request apply, and a Request validation failed error may also be thrown if you provide any invalid Webhook Event names. Refer to the top of this page for a list of Webhook Events and their descriptions.
Example
To perform an example request:
An example response payload is:
You can explore this request further in the API Playground.
Delete a webhook
A DELETE request to /v2/webhooks/{WEBHOOK_ID}?region={REGION} will permenantly delete the webhook.
The response payload includes the configuration of the deleted webhook, as seen in the examples below.
You may receive a small number of additional messages on your webhook's endpoint after deleting the webhook due to queued messages being sent through, but no new messages will be sent to your webhook after it has been deleted, and there is no way to recover the webhook without re-creating it.
Example
To perform an example request:
An example response payload is:
You can explore this request further in the API Playground.
Ping a webhook
A POST request to /v2/webhooks/{WEBHOOK_ID}/ping?region={REGION} will send a ping event to your webhook with an example payload.
You can't explicitly subscribe to ping events, as it is a special event type that is only sent when requested using this endpoint.
Example
To perform an example request:
An example response payload is:
You can explore this request further in the API Playground.
Webhook Payloads
Example payloads for the webhook events that are currently in use are included below.
ping
pingrecapture_new
recapture_newvaluation_change
valuation_changeLast updated
Was this helpful?