Webhooks enable your applications to receive real-time notifications when events occur in your identity and access management systems. This eliminates the need for polling and ensures your systems stay synchronized with user provisioning, authentication, and access control changes across all integrated platforms.
Unizo normalizes webhook events from Okta, Auth0, Azure AD, OneLogin, and other identity providers into a consistent format. This means you write your webhook handler once and it works with all supported platforms.
Webhook Configuration To set up webhooks for your integration, visit the Unizo Console Webhooks section for step-by-step configuration guide.
Supported Event Types
These are the event types currently supported by Unizo's Identity webhooks. The list keeps growing as we add support for more events across different platforms.
Event Type Description Trigger Conditions user:created A new user has been created User account creation via UI, API, or sync user:updated User profile information has been modified Profile updates, attribute changes, or status updates user:deleted A user account has been deleted User deletion or deactivation
Webhook Security All webhooks from Unizo include security headers to verify authenticity:
Headers Header Description x-unizo-event-type
The type of event that triggered the webhook x-unizo-signature
HMAC SHA-256 signature for request validation x-unizo-timestamp
Unix timestamp when the event was sent x-unizo-delivery-id
Unique 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
Triggered when a new user account is created in the identity system
Headers Name Type Required Description Content-Type
string Yes Always application/json x-unizo-event-type
string Yes Event type: user:created x-unizo-webhook-id
string Yes Unique webhook configuration ID x-unizo-delivery-id
string Yes Unique delivery ID for idempotency x-unizo-signature
string Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description type
string Yes Event type identifier version
string Yes Webhook payload version user.id
string Yes Unique user identifier user.email
string Yes User's email address user.username
string No User's username user.firstName
string Yes User's first name user.lastName
string Yes User's last name user.status
string Yes User status: active, pending, suspended user.createdDateTime
string Yes ISO 8601 timestamp user.createdBy
object No User who created this account integration
object Yes Integration details
Example Payload Copy {
"type" : "user:created" ,
"version" : "1.0.0" ,
"user" : {
"id" : "user-123456" ,
"email" : "john.doe@example.com" ,
"username" : "john.doe" ,
"firstName" : "John" ,
"lastName" : "Doe" ,
"status" : "active" ,
"createdDateTime" : "2024-01-15T14:00:00Z" ,
"createdBy" : {
"id" : "admin-789" ,
"email" : "admin@example.com"
}
} ,
"integration" : {
"type" : "IDENTITY" ,
"id" : "int_123456" ,
"name" : "Okta Production" ,
"provider" : "okta"
}
}
Response 200 OK
Webhook processed successfully 400 Bad Request
Invalid webhook payload 401 Unauthorized
Invalid or missing signature
Triggered when user profile information is modified
Headers Name Type Required Description Content-Type
string Yes Always application/json x-unizo-event-type
string Yes Event type: user:updated x-unizo-webhook-id
string Yes Unique webhook configuration ID x-unizo-delivery-id
string Yes Unique delivery ID for idempotency x-unizo-signature
string Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description type
string Yes Event type identifier version
string Yes Webhook payload version user.id
string Yes Unique user identifier user.email
string Yes User's email address user.changes
object Yes Object containing changed fields user.updatedDateTime
string Yes ISO 8601 timestamp user.updatedBy
object No User who made the update integration
object Yes Integration details
Example Payload Copy {
"type" : "user:updated" ,
"version" : "1.0.0" ,
"user" : {
"id" : "user-123456" ,
"email" : "john.doe@example.com" ,
"changes" : {
"lastName" : {
"from" : "Doe" ,
"to" : "Smith"
} ,
"department" : {
"from" : "Engineering" ,
"to" : "Product"
}
} ,
"updatedDateTime" : "2024-01-15T15:00:00Z" ,
"updatedBy" : {
"id" : "admin-789" ,
"email" : "admin@example.com"
}
} ,
"integration" : {
"type" : "IDENTITY" ,
"id" : "int_123456" ,
"name" : "Okta Production" ,
"provider" : "okta"
}
}
Response 200 OK
Webhook processed successfully 400 Bad Request
Invalid webhook payload 401 Unauthorized
Invalid or missing signature
Triggered when a user account is deleted or deactivated
Headers Name Type Required Description Content-Type
string Yes Always application/json x-unizo-event-type
string Yes Event type: user:deleted x-unizo-webhook-id
string Yes Unique webhook configuration ID x-unizo-delivery-id
string Yes Unique delivery ID for idempotency x-unizo-signature
string Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description type
string Yes Event type identifier version
string Yes Webhook payload version user.id
string Yes Unique user identifier user.email
string Yes User's email address user.deletedDateTime
string Yes ISO 8601 timestamp user.deletedBy
object No User who deleted this account integration
object Yes Integration details
Example Payload Copy {
"type" : "user:deleted" ,
"version" : "1.0.0" ,
"user" : {
"id" : "user-123456" ,
"email" : "john.doe@example.com" ,
"deletedDateTime" : "2024-01-15T16:00:00Z" ,
"deletedBy" : {
"id" : "admin-789" ,
"email" : "admin@example.com"
}
} ,
"integration" : {
"type" : "IDENTITY" ,
"id" : "int_123456" ,
"name" : "Okta Production" ,
"provider" : "okta"
}
}
Response 200 OK
Webhook processed successfully 400 Bad Request
Invalid webhook payload 401 Unauthorized
Invalid or missing signature
Webhook Delivery & Retries
Unizo implements automatic retry logic for failed webhook deliveries:
Initial Delivery : Immediate
First Retry : After 1 minute
Second Retry : After 5 minutes
Third Retry : After 15 minutes
Final Retry : After 1 hour
Webhooks are considered failed if:
Your endpoint returns a non-2xx status code
Connection timeout (30 seconds)
SSL/TLS errors
Best Practices
1. Idempotency
Idempotent Webhook Handler async function handleWebhook(request) {
const deliveryId = request.headers['x-unizo-delivery-id'];
// Check if already processed
if (await isProcessed(deliveryId)) {
return { status: 200, message: 'Already processed' };
}
// Process webhook
await processWebhook(request.body);
// Mark as processed
await markProcessed(deliveryId);
return { status: 200 };
}
2. Async Processing
Asynchronous Processing app.post('/webhooks/identity', (req, res) => {
// Validate signature
if (!verifySignature(req)) {
return res.status(401).send('Invalid signature');
}
// Queue for processing
identityQueue.add(req.body);
// Return immediately
res.status(200).send('OK');
});
3. Error Handling
Comprehensive Error Handling async function processWebhook(payload) {
try {
switch (payload.type) {
case 'user:created':
await handleUserCreated(payload);
break;
case 'role:assigned':
await handleRoleAssigned(payload);
break;
default:
logger.warn(`Unknown webhook type: ${payload.type}`);
}
} catch (error) {
logger.error('Webhook processing failed', {
error: error.message,
payload,
stack: error.stack
});
throw error;
}
}
Need Help?
For webhook-related support: