Overview
Webhooks enable you to receive real-time notifications when important events occur in Explorium’s data ecosystem. This guide will walk you through setting up a webhook to receive push notifications for business and prospect events you’re interested in monitoring.Quick Start
- Register a webhook - Create a single webhook endpoint that will receive all event notifications
- Implement a secure receiver - Set up your handler to validate and process incoming events
- Test connectivity - Verify your webhook is configured correctly
- Enroll for events - Subscribe to specific events using the enrollment endpoints
- Process events - Receive and handle real-time events as they occur
Webhook Architecture
Each partner can register one webhook URL that serves as the destination for all event notifications. When you enroll businesses or prospects for event monitoring, all triggered events are sent to this webhook.To differentiate between various monitoring use cases, you can assign a unique enrollment_key when enrolling entities. This key is included in every event notification, allowing you to route and process events according to your internal systems.
Step 1: Register Your Webhook
Register a webhook URL where Explorium will send event notifications.Endpoint
- Method:
POST - URL:
https://api.explorium.ai/v1/webhooks
Request
JSON
Response
JSON
Webhook Limitations
- You can register only one webhook URL per partner ID
- Registering a new webhook will override any previous webhook configuration and generate a new webhook secret
- All event notifications for a partner ID are sent to this single URL
Step 2: Implement Your Webhook Handler
Your webhook handler needs to:- Accept HTTP POST requests.
- Validate the signature to ensure event authenticity
- Process incoming event data based on the event type and enrollment key
Example Implementation (Python with FastAPI)
Python
Step 3: Test Webhook Connectivity
After implementing your webhook handler, verify it’s working correctly:Endpoint
- Method:
POST - URL:
https://api.explorium.ai/v1/webhooks/check_connectivity
Request
JSON
Response
JSON
- The system will send a test event to your webhook and return the response from your handler
Advanced Testing
Once your webhook is set, You can run more enhanced testing, that will allow you to:- Test with mock data for specific event types
- Validate your event handling logic with realistic event payloads
- Simulate various event scenarios for better integration testing
- event_name: event type to simulate (currently available types: new_office, closing_office, funding_round, new_investment, outages_and_security_breaches)
- number_of_events: the number of simulated events to receive.
Request:
JSON
Response:
JSON
- This will result in pushing 3 “funding_round” events to your webhook.
You can use the response to validate your event handling logic.
Step 4: Enroll for Events
Once your webhook is set up, you can enroll entities (businesses or prospects) for event monitoring.Business Enrollment Endpoint
Method:POSTURL:
https://api.explorium.ai/v1/businesses/events/enrollments
Example Request
JSON
Prospect Enrollment Endpoint
Method:POSTURL:
https://api.explorium.ai/v1/prospects/enrollments
Example Request
JSON
Key Enrollment Parameters:
enrollment_key: A custom identifier you provide to categorize this set of enrollments. You can use this to:- Group enrollments by customer/client ID
- Segment by monitoring campaign or use case
- Differentiate between different business processes
- This key will be included in each event notification, allowing you to route events appropriately
business_ids/prospect_ids: Business or prospect IDs to monitor (up to 20 per request)- While each request is limited to 20 IDs, there’s no limit on the total number of IDs you can enroll across multiple requests
- You can enroll thousands of entities by making multiple enrollment requests
Event Payload Structure
When an enrolled event is triggered, you’ll receive a payload like this:JSON
Key Fields:
enrollment_key: The identifier you provided during enrollmentevent_id: A unique identifier for this specific event event_name: The type of event that was triggered entity_type: Either “business” or “prospect” entity_id: The ID of the business or prospect that triggered the event data: Event-specific data (varies by event type)
Managing Your Webhook
Get Webhook Details
Endpoint
Method: GETURL: https://api.explorium.ai/v1/webhooks/
Delete Your Webhook
Endpoint
Method: DELETEURL: https://api.explorium.ai/v1/webhooks/
Best Practices
- Use the enrollment_key effectively: Structure your enrollment keys to match your internal systems and use cases.
- Set up monitoring: Implement monitoring for your webhook endpoint to detect any delivery failures.
- Validate all signatures: Always verify the event signature to ensure authenticity before processing.
- Use proper Content-Type: Ensure your webhook handler accepts and responds with the application/json JSON Content-Type.
Frequently Asked Questions
How many webhooks can I register per partner ID?
How many webhooks can I register per partner ID?
You can register only one webhook URL per partner ID. This URL will receive all event notifications.
Is there a limit to how many businesses or prospects I can enroll?
Is there a limit to how many businesses or prospects I can enroll?
While each enrollment request is limited to 20 IDs, there’s no limit on the total number of IDs you can enroll across multiple requests.
How do I differentiate between different monitoring use cases?
How do I differentiate between different monitoring use cases?
Use the enrollment_key parameter when enrolling entities. This key is included in every event notification, allowing you to route and process events according to your internal systems.
What happens if I register a new webhook?
What happens if I register a new webhook?
Registering a new webhook will override your previous webhook configuration and generate a new webhook secret. All event notifications will be sent to the new URL.
How can I test my webhook implementation?
How can I test my webhook implementation?
Use the /webhooks/check_connectivity endpoint to validate your webhook handler is properly receiving and processing events.