Webhook Configuration To set up webhooks for your integration, visit the Unizo Console Webhooks section for step-by-step configuration guide.
Overview
Unizo's EDR/XDR API provides webhooks to notify your application when critical security events occur across your endpoint detection and response platforms. These real-time notifications enable you to build automated security response workflows, maintain compliance, and quickly react to threats.
Our platform normalizes webhook events from various EDR/XDR providers (CrowdStrike, SentinelOne, Microsoft Defender, etc.) into a consistent format, simplifying security event handling across multiple platforms.
Supported Event Types
Event Type Description Trigger Conditions Triggered when a new threat is detected on an endpoint Triggered when a threat is successfully remediated Triggered when a file or process is quarantined Triggered when an endpoint is isolated from the network Triggered when an endpoint is restored to the network Triggered when an endpoint goes offline Triggered when a security policy is violated Triggered when a security scan completes Triggered for critical security alerts requiring immediate attention
Webhook Security All webhooks from Unizo include security headers to verify authenticity:
Headers Header Description x-unizo-event-typeThe type of event that triggered the webhook x-unizo-signatureHMAC SHA-256 signature for request validation x-unizo-timestampUnix timestamp when the event was sent x-unizo-delivery-idUnique identifier for this webhook delivery
Signature Verification Verify the authenticity of incoming webhooks using HMAC SHA-256:
const crypto = require('crypto');
function verifyWebhookSignature(payload, signature, secret) {
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature, 'hex'),
Buffer.from(expectedSignature, 'hex')
);
}
Event Details
Threat Events
Triggered when a new threat, malware, or suspicious activity is detected on an endpoint by the EDR/XDR platform.
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: threat:detected x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery attempt ID x-unizo-signaturestring Yes HMAC SHA256 signature for verification
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version data.threat.idstring Yes Unique threat identifier data.threat.namestring Yes Threat name or signature data.threat.typestring Yes Threat classification (malware, ransomware, trojan, pup, suspicious_activity) data.threat.severitystring Yes Threat severity level (critical, high, medium, low) data.threat.file_pathstring No Full path of the affected file data.threat.file_hashstring No SHA256 hash of the file data.threat.process_namestring No Name of the affected process data.threat.detected_atstring Yes Detection timestamp (ISO 8601) data.endpoint.idstring Yes Endpoint identifier data.endpoint.hostnamestring Yes Endpoint hostname data.endpoint.ip_addressstring No Endpoint IP address data.endpoint.osstring Yes Operating system data.endpoint.userstring No Logged-in user data.detection_methodstring No How the threat was detected data.recommended_actionstring No Recommended remediation action integration.idstring Yes Integration ID integration.namestring Yes Integration name integration.providerstring Yes EDR provider name
Example Payload Copy {
"type" : "threat:detected" ,
"version" : "1.0.0" ,
"data" : {
"threat" : {
"id" : "thr_abc123def456" ,
"name" : "Trojan:Win32/Emotet" ,
"type" : "trojan" ,
"severity" : "critical" ,
"file_path" : "C:\\Users\\john.doe\\Downloads\\invoice.exe" ,
"file_hash" : "a123b456c789d012e345f678g901h234" ,
"process_name" : "invoice.exe" ,
"detected_at" : "2024-06-15T14:30:00Z"
} ,
"endpoint" : {
"id" : "ep_workstation_123" ,
"hostname" : "DESKTOP-ABC123" ,
"ip_address" : "192.168.1.100" ,
"os" : "Windows 10 Pro" ,
"user" : "CORP\\john.doe"
} ,
"detection_method" : "Behavioral Analysis" ,
"recommended_action" : "Quarantine and remove file"
} ,
"integration" : {
"id" : "int_crowdstrike_789" ,
"name" : "Company CrowdStrike" ,
"provider" : "crowdstrike"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Triggered when a detected threat has been successfully remediated or removed from an endpoint.
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: threat:remediated x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery attempt ID x-unizo-signaturestring Yes HMAC SHA256 signature for verification
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version data.threat_idstring Yes Original threat identifier data.threat_namestring Yes Threat name data.remediation.actionstring Yes Action taken (removed, quarantined, restored, blocked) data.remediation.statusstring Yes Remediation status (success, partial, failed) data.remediation.completed_atstring Yes Completion timestamp (ISO 8601) data.remediation.performed_bystring Yes Who initiated the remediation data.endpoint.idstring Yes Endpoint identifier data.endpoint.hostnamestring Yes Endpoint hostname integration.idstring Yes Integration ID integration.namestring Yes Integration name integration.providerstring Yes EDR provider name
Example Payload Copy {
"type" : "threat:remediated" ,
"version" : "1.0.0" ,
"data" : {
"threat_id" : "thr_abc123def456" ,
"threat_name" : "Trojan:Win32/Emotet" ,
"remediation" : {
"action" : "removed" ,
"status" : "success" ,
"completed_at" : "2024-06-15T14:35:00Z" ,
"performed_by" : "Automated Response"
} ,
"endpoint" : {
"id" : "ep_workstation_123" ,
"hostname" : "DESKTOP-ABC123"
}
} ,
"integration" : {
"id" : "int_crowdstrike_789" ,
"name" : "Company CrowdStrike" ,
"provider" : "crowdstrike"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Endpoint Events
Triggered when an endpoint is isolated from the network as a containment measure.
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: endpoint:isolated x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery attempt ID x-unizo-signaturestring Yes HMAC SHA256 signature for verification
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version data.endpoint.idstring Yes Endpoint identifier data.endpoint.hostnamestring Yes Endpoint hostname data.endpoint.ip_addressstring No Last known IP address data.endpoint.osstring Yes Operating system data.endpoint.last_userstring No Last logged-in user data.isolation.reasonstring Yes Reason for isolation data.isolation.initiated_bystring Yes Who initiated isolation data.isolation.isolated_atstring Yes Isolation timestamp (ISO 8601) data.isolation.expected_durationstring No Expected isolation duration data.related_threat_idstring No Related threat ID if applicable integration.idstring Yes Integration ID integration.namestring Yes Integration name integration.providerstring Yes EDR provider name
Example Payload Copy {
"type" : "endpoint:isolated" ,
"version" : "1.0.0" ,
"data" : {
"endpoint" : {
"id" : "ep_workstation_123" ,
"hostname" : "DESKTOP-ABC123" ,
"ip_address" : "192.168.1.100" ,
"os" : "Windows 10 Pro" ,
"last_user" : "CORP\\john.doe"
} ,
"isolation" : {
"reason" : "Critical malware detected - Emotet trojan" ,
"initiated_by" : "Automated Response Policy" ,
"isolated_at" : "2024-06-15T14:31:00Z" ,
"expected_duration" : "Until manual review"
} ,
"related_threat_id" : "thr_abc123def456"
} ,
"integration" : {
"id" : "int_sentinelone_456" ,
"name" : "Company SentinelOne" ,
"provider" : "sentinelone"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Alert Events
Triggered when a critical security alert is generated that requires immediate attention.
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: alert:critical x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery attempt ID x-unizo-signaturestring Yes HMAC SHA256 signature for verification
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version data.alert.idstring Yes Alert identifier data.alert.titlestring Yes Alert title data.alert.descriptionstring Yes Detailed alert description data.alert.severitystring Yes Alert severity (critical) data.alert.categorystring Yes Alert category data.alert.created_atstring Yes Alert creation time (ISO 8601) data.affected_endpointsarray Yes List of affected endpoints data.indicatorsarray No Threat indicators data.recommended_actionsarray No Recommended response actions integration.idstring Yes Integration ID integration.namestring Yes Integration name integration.providerstring Yes EDR provider name
Example Payload Copy {
"type" : "alert:critical" ,
"version" : "1.0.0" ,
"data" : {
"alert" : {
"id" : "alrt_789xyz" ,
"title" : "Ransomware Activity Detected" ,
"description" : "Multiple endpoints showing signs of ransomware encryption activity" ,
"severity" : "critical" ,
"category" : "Ransomware" ,
"created_at" : "2024-06-15T14:45:00Z"
} ,
"affected_endpoints" : [
{
"id" : "ep_workstation_123" ,
"hostname" : "DESKTOP-ABC123"
} ,
{
"id" : "ep_workstation_456" ,
"hostname" : "DESKTOP-XYZ789"
}
] ,
"indicators" : [
"Mass file encryption detected" ,
"Known ransomware file extensions created" ,
"Volume shadow copy deletion attempts"
] ,
"recommended_actions" : [
"Isolate affected endpoints immediately" ,
"Initiate incident response protocol" ,
"Check backups availability" ,
"Contact security team"
]
} ,
"integration" : {
"id" : "int_defender_123" ,
"name" : "Microsoft Defender" ,
"provider" : "microsoft_defender"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Webhook Delivery & Retries
Unizo implements a robust delivery system with automatic retries to ensure your webhooks are delivered reliably:
Timeout : 30 seconds per delivery attempt
Retry Schedule : 5 attempts with exponential backoff
Attempt 1: Immediate
Attempt 2: 1 minute delay
Attempt 3: 5 minutes delay
Attempt 4: 30 minutes delay
Attempt 5: 2 hours delay
Success Criteria : HTTP status codes 200-299
Failure Handling : After 5 failed attempts, the webhook is marked as failed
Best Practices
1. Idempotency
Always implement idempotent webhook handlers using the x-unizo-delivery-id header:
Idempotent Webhook Handler // Example: Handling webhooks idempotently
app.post('/webhooks/edr', async (req, res) => {
const deliveryId = req.headers['x-unizo-delivery-id'];
// Check if we've already processed this delivery
const existingDelivery = await db.webhookDeliveries.findOne({
deliveryId
});
if (existingDelivery) {
console.log(`Duplicate delivery detected: ${deliveryId}`);
return res.status(200).json({
status: 'already_processed'
});
}
// Process the webhook
try {
await processSecurityEvent(req.body);
// Record the delivery
await db.webhookDeliveries.create({
deliveryId,
processedAt: new Date()
});
res.status(200).json({ status: 'success' });
} catch (error) {
console.error('Webhook processing failed:', error);
res.status(500).json({ status: 'error' });
}
});
2. Security Response Automation
Implement automated security responses for critical events:
Automated Security Response // Example: Automated threat response
app.post('/webhooks/edr', async (req, res) => {
const { type, data } = req.body;
// Acknowledge receipt immediately
res.status(200).json({ status: 'received' });
switch (type) {
case 'threat:detected':
if (data.threat.severity === 'critical') {
// Auto-isolate for critical threats
await edrApi.isolateEndpoint(data.endpoint.id);
// Create incident ticket
await ticketingApi.createIncident({
title: `Critical threat: ${data.threat.name}`,
priority: 'P1',
endpoint: data.endpoint.hostname,
assignTo: 'security-team'
});
// Send alerts
await alertingService.sendCriticalAlert({
channel: 'security-incidents',
message: `Critical threat detected on ${data.endpoint.hostname}`
});
}
break;
case 'alert:critical':
// Trigger incident response workflow
await incidentResponse.initiate({
alertId: data.alert.id,
affectedEndpoints: data.affected_endpoints,
playbook: 'critical-security-incident'
});
break;
}
});
3. Compliance and Audit Logging
Maintain comprehensive audit logs for compliance:
Compliance Logging // Example: Compliance and audit logging
app.post('/webhooks/edr', async (req, res) => {
const { type, data, integration } = req.body;
// Create audit log entry
const auditEntry = {
eventType: type,
timestamp: new Date(),
source: {
integration: integration.name,
provider: integration.provider
},
details: {
// Extract key fields for audit
threatId: data.threat?.id,
endpointId: data.endpoint?.id,
severity: data.threat?.severity || data.alert?.severity,
action: data.remediation?.action
},
rawEvent: req.body // Store full event for compliance
};
// Store in compliance database
await complianceDb.securityEvents.create(auditEntry);
// Forward to SIEM if configured
if (config.siem.enabled) {
await siemConnector.sendEvent({
source: 'unizo-edr-webhook',
event: auditEntry
});
}
res.status(200).json({ status: 'logged' });
});
Need Help?
For webhook-related support: