Skip to main content

Receive API results with webhooks

Get each API result sent to your server as soon as it's ready: set up your webhook URL, pass the verification and fix delivery problems.

Written by Thomas Lucy

A webhook is a URL on your server where Enrow sends the result of each search as soon as it's done. Set a default URL in Webhook URL on the API page, or send one with a request in settings.webhook.

Why use a webhook

  • You don't need to ask for the result again and again: it comes to you as soon as it's ready.

  • Webhooks don't count toward your rate limits.

  • Webhooks are free. You pay only for the search itself.

Set your default webhook URL

  1. Go to API in the left menu.

  2. In Webhook URL, type the address of your endpoint, for example https://your-domain.com/api/webhooks/enrow.

  3. Click Save. The button appears once you change the field.

  4. Enrow sends a verification request to your endpoint (see below). If it passes, a green Valid badge appears in the field.

The Webhook URL field on the API page

Enrow uses this URL for every request that doesn't include its own webhook.

Pass the verification

When you save a URL, Enrow sends one POST request to it, with a __challenge__ field in the body. To pass the check, your endpoint must:

  • reply with a 2xx status code (for example 200) within 5 seconds;

  • send back the same __challenge__ field, with the same value, in a JSON body: {"__challenge__": "<value you received>"}.

If the check fails, the app shows "We couldn't verify" with the reason. Your existing webhook stays active until the new URL passes. The most common reasons:

  • "Your endpoint returned a non-2xx status code." Make your endpoint reply with 200.

  • "Your endpoint didn't echo the challenge value within 5 seconds." Add the code that sends back the __challenge__ value.

  • "We couldn't reach your endpoint." Check the URL, the DNS, and that your endpoint accepts POST requests.

  • "Your endpoint didn't reply within 5 seconds." Reply first, then do the slow work.

  • "The URL is malformed or uses an unsupported scheme." The URL must start with http:// or https://.

  • "The URL points to a private or internal address." Addresses such as localhost or a local network IP are refused. Use a public URL.

Use another URL for one request

To send one result somewhere else, add webhook to the settings of the request. This URL takes priority over your default URL:

{
  "fullname": "Jane Doe",
  "company_domain": "example.com",
  "settings": { "webhook": "https://your-domain.com/webhooks/enrow" }
}

What Enrow sends

Each webhook has an event field that says what finished, for example single_search_finished or bulk_search_finished. There is one event for each feature, in single and in bulk mode.

  • Single search: the webhook contains the full result: the email or the number, the qualification, your custom data and the final cost. You don't need to call the GET endpoint.

  • Bulk search: the webhook only tells you that the batch is finished, with its id. Then call the GET endpoint of the batch with this id to get the results.

See the list of events and examples of each webhook in How webhooks work.

Make your endpoint reliable

  • Reply 200 right away, within 5 seconds, then process the data in the background.

  • Use HTTPS. HTTP URLs are accepted, but HTTPS protects the data you receive.

  • Keep the id of each search. Enrow doesn't send a webhook again if the delivery fails. If your server was down, get the result with the GET endpoint and the id.

  • Ignore duplicates. In rare cases, the same webhook can arrive twice. Use the id to process it only once.

  • Send custom data with each search, such as your CRM record ID. It comes back as-is in the webhook, so you know which record the result belongs to.

You don't receive webhooks

  1. Check that your URL is public, accepts POST requests and replies with 200 within 5 seconds.

  2. Check which URLs are saved on your account: GET /account/info returns them in the webhooks field.

  3. If your request includes settings.webhook, check that URL: it replaces your default one.

  4. For a bulk search, remember that the webhook only contains the id of the batch, not the results.

  5. Get the missing results with the GET endpoint and the id of each search.

If it still doesn't work, contact support with the id of a search. Never send your API key.

Related articles

Did this answer your question?