Skip to main content

Public Cloud (Infra) Webhooks

Webhook Configuration

To set up webhooks for your integration, visit the Unizo Console Webhooks section for step-by-step configuration guide.

Overview

Unizo's Public Cloud (Infra) API provides webhooks to notify your application when important infrastructure events occur across your integrated cloud platforms. These real-time notifications enable you to build automated infrastructure workflows, maintain synchronized resource tracking, and ensure timely response to infrastructure changes.

Our platform normalizes webhook events from various cloud providers (AWS, Azure, Google Cloud, etc.) into a consistent format, making it easy to handle infrastructure events regardless of the underlying platform.

Supported Event Types

Event TypeDescriptionTrigger Conditions
user:updatedEvent broadcast when a user has been updatedUser profile or permissions modified
user:deletedEvent broadcast when a user is deletedUser permanently removed
resource:createdEvent broadcast when a resource has been createdNew resource created
resource:updatedEvent broadcast when a resource has been updatedResource configuration modified
resource:deletedEvent broadcast when a resource is deletedResource deleted

User Updated

user:updated

Triggered when a user's profile, permissions, or configuration is modified in your cloud platform.
POSThttps://api.yourapp.com/webhooks/unizo/infrastructure
Headers
NameTypeRequiredDescription
x-unizo-event-typestringYesThe type of event that was triggered
x-unizo-signaturestringYesHMAC SHA-256 signature
Request Body Schema
PropertyTypeRequiredDescription
typestringYesEvent type identifier
versionstringYesWebhook payload version
contentTypestringYesContent type of the payload
userobjectYesUser object
user.idstringYesUser ID
user.namestringYesUser display name
user.emailstringYesUser email address
user.rolestringNoUser role
user.updatedDateTimestringYesUpdate timestamp
integration.typestringYesIntegration type
integration.idstringYesIntegration ID
integration.namestringYesIntegration display name
Example Payload
{
"type": "user:updated",
"version": "1.0.0",
"contentType": "application/json",
"user": {
"id": "usr-0012345",
"name": "John Doe",
"email": "[email protected]",
"role": "admin",
"updatedDateTime": "2026-01-15T14:00:00Z"
},
"integration": {
"type": "INFRASTRUCTURE",
"id": "906e3a3c-e317-4114-8cd5-38bfacbf02a3",
"name": "AWS Production"
}
}
Response
200 OKWebhook processed successfully
400 Bad RequestInvalid webhook payload
401 UnauthorizedInvalid or missing signature

User Deleted

user:deleted

Triggered when a user is permanently deleted and removed from your cloud platform.
POSThttps://api.yourapp.com/webhooks/unizo/infrastructure
Headers
NameTypeRequiredDescription
x-unizo-event-typestringYesThe type of event that was triggered
x-unizo-signaturestringYesHMAC SHA-256 signature
Request Body Schema
PropertyTypeRequiredDescription
typestringYesEvent type identifier
versionstringYesWebhook payload version
contentTypestringYesContent type of the payload
userobjectYesUser object
user.idstringYesUser ID
user.namestringYesUser display name
user.emailstringYesUser email address
user.deletedDateTimestringYesDeletion timestamp
integration.typestringYesIntegration type
integration.idstringYesIntegration ID
integration.namestringYesIntegration display name
Example Payload
{
"type": "user:deleted",
"version": "1.0.0",
"contentType": "application/json",
"user": {
"id": "usr-0012345",
"name": "John Doe",
"email": "[email protected]",
"deletedDateTime": "2026-01-15T16:00:00Z"
},
"integration": {
"type": "INFRASTRUCTURE",
"id": "906e3a3c-e317-4114-8cd5-38bfacbf02a3",
"name": "AWS Production"
}
}
Response
200 OKWebhook processed successfully
400 Bad RequestInvalid webhook payload
401 UnauthorizedInvalid or missing signature

Resource Created

resource:created

Triggered when a new infrastructure resource is created such as a VM, container, database, or other cloud resource.
POSThttps://api.yourapp.com/webhooks/unizo/infrastructure
Headers
NameTypeRequiredDescription
x-unizo-event-typestringYesThe type of event that was triggered
x-unizo-signaturestringYesHMAC SHA-256 signature
Request Body Schema
PropertyTypeRequiredDescription
typestringYesEvent type identifier
versionstringYesWebhook payload version
contentTypestringYesContent type of the payload
resourceobjectYesResource object
resource.idstringYesUnique resource identifier
resource.namestringYesResource name
resource.typestringYesResource type (vm, container, database, etc.)
resource.regionstringYesDeployment region
resource.providerstringYesCloud provider
resource.createdDateTimestringYesCreation timestamp
resource.createdBystringNoUser or system that created the resource
integration.typestringYesIntegration type
integration.idstringYesIntegration ID
integration.namestringYesIntegration display name
Example Payload
{
"type": "resource:created",
"version": "1.0.0",
"contentType": "application/json",
"resource": {
"id": "i-1234567890abcdef0",
"name": "prod-web-server-01",
"type": "vm",
"region": "us-east-1",
"provider": "aws",
"createdDateTime": "2026-01-15T14:00:00Z",
"createdBy": "[email protected]"
},
"integration": {
"type": "INFRASTRUCTURE",
"id": "906e3a3c-e317-4114-8cd5-38bfacbf02a3",
"name": "AWS Production"
}
}
Response
200 OKWebhook processed successfully
400 Bad RequestInvalid webhook payload
401 UnauthorizedInvalid or missing signature

Resource Updated

resource:updated

Triggered when a resource configuration is modified, including scaling changes, tag updates, or configuration modifications.
POSThttps://api.yourapp.com/webhooks/unizo/infrastructure
Headers
NameTypeRequiredDescription
x-unizo-event-typestringYesThe type of event that was triggered
x-unizo-signaturestringYesHMAC SHA-256 signature
Request Body Schema
PropertyTypeRequiredDescription
typestringYesEvent type identifier
versionstringYesWebhook payload version
contentTypestringYesContent type of the payload
resourceobjectYesResource object
resource.idstringYesUnique resource identifier
resource.namestringYesResource name
resource.typestringYesResource type
resource.updatedDateTimestringYesUpdate timestamp
resource.updatedBystringNoUser or system that updated the resource
integration.typestringYesIntegration type
integration.idstringYesIntegration ID
integration.namestringYesIntegration display name
Example Payload
{
"type": "resource:updated",
"version": "1.0.0",
"contentType": "application/json",
"resource": {
"id": "i-1234567890abcdef0",
"name": "prod-web-server-01",
"type": "vm",
"updatedDateTime": "2026-01-15T15:00:00Z",
"updatedBy": "[email protected]"
},
"integration": {
"type": "INFRASTRUCTURE",
"id": "906e3a3c-e317-4114-8cd5-38bfacbf02a3",
"name": "AWS Production"
}
}
Response
200 OKWebhook processed successfully
400 Bad RequestInvalid webhook payload
401 UnauthorizedInvalid or missing signature

Resource Deleted

resource:deleted

Triggered when a resource is deleted, indicating it has been removed from the system.
POSThttps://api.yourapp.com/webhooks/unizo/infrastructure
Headers
NameTypeRequiredDescription
x-unizo-event-typestringYesThe type of event that was triggered
x-unizo-signaturestringYesHMAC SHA-256 signature
Request Body Schema
PropertyTypeRequiredDescription
typestringYesEvent type identifier
versionstringYesWebhook payload version
contentTypestringYesContent type of the payload
resourceobjectYesResource object
resource.idstringYesUnique resource identifier
resource.namestringYesResource name
resource.typestringYesResource type
resource.deletedDateTimestringYesDeletion timestamp
resource.deletedBystringNoUser or system that deleted the resource
integration.typestringYesIntegration type
integration.idstringYesIntegration ID
integration.namestringYesIntegration display name
Example Payload
{
"type": "resource:deleted",
"version": "1.0.0",
"contentType": "application/json",
"resource": {
"id": "i-1234567890abcdef0",
"name": "prod-web-server-01",
"type": "vm",
"deletedDateTime": "2026-01-15T16:00:00Z",
"deletedBy": "[email protected]"
},
"integration": {
"type": "INFRASTRUCTURE",
"id": "906e3a3c-e317-4114-8cd5-38bfacbf02a3",
"name": "AWS Production"
}
}
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/infrastructure', 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 processInfraEvent(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. Resource Tracking

Track infrastructure resource lifecycle events:

Resource State Tracking

async function processResourceEvent(payload) {
const { resource, type } = payload;

switch (type) {
  case 'resource:created':
    await addToInventory(resource);
    break;

  case 'resource:updated':
    await updateInventory(resource);
    break;

  case 'resource:deleted':
    await removeFromInventory(resource);
    break;

  case 'user:updated':
    await updateUserPermissions(payload.user);
    break;

  case 'user:deleted':
    await revokeUserAccess(payload.user);
    break;
}
}

Need Help?

For webhook-related support: