Webhooks
A webhook is a way for one system to send real-time data to another system as soon as an event happens. Instead of constantly checking (polling) for updates, a webhook lets your application receive updates automatically.
Think of it like a notification system: when something important happens, the system calls your provided URL (usually an API endpoint) with the event data.
How to Use a Webhook
- Provide a URL: You give the system a public URL (your webhook endpoint) that can receive
POST
requests. - Wait for Events: When a specific event occurs (like a person enrichment completing), the system sends a request to your URL with the relevant data.
- Handle the Request: Your server processes the data and responds with a
200 OK
to confirm receipt.
Example Use Case
You want to be notified when a person's enrichment is completed. You provide a webhookUrl
in the request. Once the enrichment is done, we send a POST
request to your URL with the result data.
This approach is efficient, reduces load on your system, and gives you near-instant updates.
Supported event types
Example notification event:
"person.enrichment.completed"
Will be triggered when a contact within a bulk enrichment has been completed.
Source: POST /v2/people/enrich
If the notificationOptions.webhookUrl
field is set, our server will send a POST
request to that URL each time a person enrichment is completed.
To acknowledge successful receipt of the event, your server should respond with an HTTP 200 OK
. If a different status is returned, we may retry the request depending on your configuration.
The request body sent by our server will include the details of the completed person enrichment, as shown below:
Request Body
application/json
RequiredeventType
Requiredstring"person.enrichment.completed"
data
RequiredobjectExample webhook request from our server to your server
Note that the data.person
field is of type EnrichedPersonResponse
, the same type used in the people
field of the GET /v2/people/enrich/:id endpoint.
Example enrichment request with webhookUrl provided