Skip to main content

Using Webhooks with the Enrow API

This page describes how you'll be notified of Enrow's events through your webhook's endpoint.

Thomas Lucy avatar
Written by Thomas Lucy
Updated over a year ago

What is a webhook?

For those who aren't familiar with the concept, the following schema from Zoho explains it simply

Webhooks allow you to receive data without having to ask for it

Webhooks allow you to receive data without having to ask for it

A typical usage flow for the Enrow API

  1. You create a bulk search with the dedicated POST endpoint.

  2. The search runs asynchronously.

  3. The search ends, and Enrow notifies you by sending an HTTP request on the webhook.

  4. You fetch the search results' content using the dedicated GET endpoint.

Setup a webhook

Today, you can only edit one webhook from the web app on the integration page.

The format to follow is simple: provide your endpoint preceded by the HTTP protocol of your choice, for instance: https://randomwebsite.com/api/enrow_webhook

We plan to allow multiple webhooks and make their updates available through the API in the coming weeks.

Working with the webhook

As of today, two types of events in Enrow can trigger a webhook call:

  • A single search has finished

  • A bulk search has been finished

Here is the typical JSON payload you will receive on your webhook when the former event is triggered.

{ "event": "single_search_finished", "id": "910f3e13-b2bf-442d-ab0b-4cf44dfrij84fjrt", "credits": { "balance": 85053, "cost": 1 } }

And here is the typical payload for the later

{ "event": "bulk_search_finished", "id": "910f3e13-b2bf-442d-ab0b-4cf44dfrij84fjrt", "credits": { "balance": 82772, "cost": 2284 } }

These payloads allow you to retrieve your search using the dedicated GET endpoints.

Any questions?

Please don't hesitate to contact us using Intercom; we'll happily answer.

Did this answer your question?