Data Model
Data Model
This document explains the core data entities in Unhook and how they relate to each other.
Entity Relationships
Core Entities
Webhook Entity
The primary entity that manages webhook routing and configuration.
Unique identifier with ‘t’ prefix
Client identifier for routing
Associated webhook ID
Local port to deliver requests to
Current webhook status. Can be ‘active’ or ‘inactive’
Connection status. Can be ‘connected’ or ‘disconnected’
Webhook configuration object
Owner user ID
Organization ID
Event Entity
Represents a webhook notification received by the system.
Unique identifier with ‘evt’ prefix
Associated webhook ID
Original incoming webhook data (RequestPayload)
Current status. Can be ‘pending’, ‘processing’, ‘completed’, or ‘failed’
Number of retry attempts made
Maximum allowed retries
Failure explanation if applicable
When the event was received (ISO date string)
Request Entity
Represents an attempt to deliver a webhook to a local development environment.
Unique identifier with ‘req’ prefix
Associated webhook ID
Associated event ID
Associated webhook ID
Active connection ID if applicable
Request details (RequestPayload)
Current status. Can be ‘pending’, ‘completed’, or ‘failed’
Response if completed (ResponsePayload)
Response time in milliseconds
When the request was made (ISO date string)
When the request completed (ISO date string)
RequestPayload Entity
Unique request identifier
HTTP method used
Request URL
HTTP headers as key-value pairs
Request size in bytes
Base64 encoded request body
Unix timestamp of the request
Content-Type of the request
IP address of the client
Data Flow
Webhook Reception
- System creates an Event with the original request
- Event is associated with the target Webhook
- Initial status is set to ‘pending’
Processing
- System creates a Request for delivery attempt
- Request inherits Event and Webhook properties
- System attempts to deliver to local environment
Completion
- Request status updated to ‘completed’ or ‘failed’
- Event status updated based on Request outcome
- If failed and retries available, new Request created
Security Considerations
API Keys
API keys are required for webhook reception and authentication
Header Protection
Sensitive headers can be redacted via configuration
Size Limits
Request/response body size limits enforced
Organization Isolation
Organization-level isolation of data
Access Control
User-level access control to resources