Overview
Entity webhook events allow you to receive real-time notifications when entities (persons, companies, devices, etc.) are created, updated, or their status changes in the Gu1 platform. These events enable you to keep your systems synchronized with Gu1 and automate workflows based on entity lifecycle changes.Why Use Entity Events?
Real-Time Sync
Keep your database synchronized with Gu1 entity data
Automated Workflows
Trigger actions when entity status changes
Audit Trail
Track all entity changes for compliance
Efficient
No need to poll the API for updates
Available Events
entity.created
Triggered when a new entity is created in Gu1. When it fires:- A new person, company, device, or other entity is created via
POST /entities
entityTypes: Only receive events for specific entity types (e.g.,["person", "company"])
entity.updated
Triggered when an entity’s data is updated (excluding status changes). When it fires:- Entity information is updated via
PATCH /entities/:id - Changes to name, attributes, entity data, tax ID, etc.
entity.status_changed instead.
Filters available:
entityTypes: Only receive events for specific entity types
entity.status_changed
Triggered when an entity’s status changes. When it fires:- Entity status transitions (e.g.,
under_review→active,active→blocked) - Status updates via
PATCH /entities/:idor automated compliance actions
entityTypes: Filter by entity typestatusChanges.from: Only trigger when changing FROM specific statusstatusChanges.to: Only trigger when changing TO specific status
Event Payload Examples
entity.created
entity: Complete entity object with all dataentity.externalId: Your unique identifier for the entityentity.type: Entity type (person, company, device, etc.)entity.status: Current status (under_review, active, blocked, etc.)createdBy: User ID who created the entitymetadata: Additional context about the creation
entity.updated
entity: Complete entity object with updated datachanges: Object showing what changed (old vs new values)updatedBy: User ID who updated the entityreason: Optional reason for the update
entity.status_changed
status: New statuspreviousStatus: Previous statusreason: Why the status changedentity: Complete entity object
Filter Configuration
Filter by Entity Type
Only receive events for specific entity types:Filter by Status Change
Only receive events when entity status changes to specific values:blocked status.
Filter when changing FROM a specific status:
active to suspended.
Code Examples
Node.js - Handling Entity Events
Python - Handling Entity Events
Use Cases
Use Case 1: Real-Time Database Sync
Keep your local database synchronized with Gu1:Use Case 2: Automated Account Activation
Automatically activate customer accounts when status changes toactive:
Use Case 3: Compliance Monitoring
Track and respond to entity status changes for compliance:Use Case 4: Customer Notifications
Notify customers when their information changes:Best Practices
Use externalId for Lookups
Use externalId for Lookups
The
entity.externalId is your unique identifier. Use it to look up entities in your database:Store Gu1 Entity ID
Store Gu1 Entity ID
Always store the Gu1 entity ID in your database for reference:
Handle All Event Types
Handle All Event Types
Even if you only subscribe to specific events, handle all event types gracefully:
Log Changes for Audit
Log Changes for Audit
Keep an audit trail of all entity changes:
Implement Idempotency
Implement Idempotency
Use the entity ID and timestamp to prevent duplicate processing:
Use Filters to Reduce Noise
Use Filters to Reduce Noise
Configure filters to only receive relevant events:
Troubleshooting
Not Receiving entity.created Events
Not Receiving entity.created Events
Check:
- Webhook is subscribed to
entity.createdevent - Entity type matches your filters (if configured)
- Webhook is enabled in dashboard
- Endpoint is publicly accessible
Missing Changes in entity.updated
Missing Changes in entity.updated
The Only
changes object only includes fields that actually changed. If you don’t see a field, it means it wasn’t updated.Example:name changed, other fields remain the same.entity.status_changed Not Firing
entity.status_changed Not Firing
Check:This will ONLY fire when status changes TO
- Status actually changed (not just entity updated)
- Filters match the status change (from/to)
- Status change is not being filtered out
blocked.