Table of Contents
Webhook Documentation
Learn how to configure webhooks to receive real-time alerts from Leicbit
Overview
Leicbit webhooks allow you to receive real-time notifications when security events are detected on your monitored domains. Instead of checking for alerts manually, webhooks automatically send HTTP POST requests to your specified endpoint whenever new security incidents are found.
Real-time Notifications
Receive instant alerts when credential theft or security breaches are detected on your domains.
Secure Delivery
All webhook requests are signed and verified to ensure data integrity and authenticity.
Easy Integration
Simple setup process with comprehensive documentation and testing tools.
Detailed Information
Each webhook contains comprehensive data about the security event for immediate action.
Setup Guide
Follow these steps to configure webhooks for your Leicbit account:
Step 1: Access Settings
- Log in to your Leicbit dashboard
- Navigate to Settings in the main menu
- Click on the Integration tab
Step 2: Configure Webhook
- Enable the webhook by checking the "Enable Webhook" checkbox
- Enter your webhook URL in the "Webhook URL" field
- Click "Test Webhook" to verify the connection
- Click "Save Settings" to activate the webhook
Webhook URL Requirements
- Must be a valid HTTPS URL (HTTP is not supported for security reasons)
- Should be publicly accessible from the internet
- Must respond with HTTP 200 status code to acknowledge receipt
- Should respond within 10 seconds to avoid timeout
Webhook Payload
Each webhook request contains detailed information about the security event. Here's the structure of the payload:
Payload Fields
| Field | Type | Description |
|---|---|---|
event_id |
string | Unique identifier for this webhook event |
event_type |
string | Type of security event (see Event Types section) |
timestamp |
ISO 8601 | When the event occurred |
domain |
object | Information about the affected domain |
alert |
object | Detailed alert information |
user |
object | Account information |
webhook_id |
string | Identifier for your webhook configuration |
Event Types
Leicbit sends different types of events based on the security incidents detected:
credential_theft_detected
Triggered when: Compromised credentials are found for your domain
Severity: High
Action Required: Immediate password reset and security review
domain_compromise_suspected
Triggered when: Suspicious activity is detected on your domain
Severity: Medium
Action Required: Investigation and monitoring
monitoring_started
Triggered when: Domain monitoring is activated
Severity: Info
Action Required: None - confirmation only
threat_resolved
Triggered when: A previously detected threat is resolved
Severity: Info
Action Required: None - status update
Security
Leicbit implements several security measures to ensure the integrity and authenticity of webhook requests:
HTTPS Only
All webhook requests are sent over HTTPS to ensure data encryption in transit. HTTP endpoints are not supported.
Request Verification
Each webhook request includes a signature header that you can use to verify the request came from Leicbit:
Verification Process
To verify a webhook request:
- Extract the timestamp and signature from the
X-Leicbit-Signatureheader - Concatenate the timestamp and request body
- Generate HMAC-SHA256 using your webhook secret
- Compare the generated signature with the received signature
Testing
Leicbit provides built-in testing tools to verify your webhook configuration:
Test Webhook Button
Use the "Test Webhook" button in your settings to send a test payload to your endpoint:
Expected Response
Your endpoint should respond with:
- HTTP Status: 200 OK
- Response Time: Less than 10 seconds
- Content-Type: application/json (optional)
Troubleshooting
Common issues and their solutions:
Solution: Ensure your endpoint is publicly accessible and not behind a firewall that blocks incoming requests.
Solution: Check your server logs for errors and ensure your endpoint can handle the webhook payload format.
Solution: Optimize your webhook handler to respond quickly. Consider processing the webhook asynchronously if needed.
Solution: Check that webhooks are enabled in your settings and the URL is correct. Test the webhook to verify it's working.
Examples
Here are some examples of how to handle webhooks in different programming languages:
Node.js Example
Python Example
PHP Example
Need Help?
If you need assistance with webhook configuration or have questions about the integration: