Defining Events and Payloads
Document webhook event types with trigger conditions, categories, HTTP headers, payload schemas, and concrete JSON examples. Covers thin versus fat event strategies, event naming conventions, header standards, and schema integration for end-to-end data lineage.
Webhook event definitions are the core of any webhook API. Each event type describes what happened, when it happened, and what data is included in the delivery. Well-documented events enable consumers to build targeted integrations that subscribe only to the events they need, verify payload structures against documented schemas, and process events correctly using the provided headers and metadata.
Event Structure
Each webhook event definition in NeoArc captures the following elements.
Event Naming Conventions
Consistent event naming is essential for discoverability, subscription filtering, and consumer routing logic.
Event Categories
Categories group related events for navigation and subscription management. Each event type belongs to exactly one category.
Trigger Conditions
Trigger conditions describe the precise business event that causes the webhook to fire. This is one of the most valuable fields in webhook documentation because it answers the question that every consumer asks: "When exactly will I receive this event?"
HTTP Headers
Webhook deliveries include HTTP headers that provide metadata about the event. Document all headers so consumers can implement verification, deduplication, and routing logic.
Thin versus Fat Events
The payload strategy determines how much data is included in each webhook delivery. This is a fundamental design decision that affects consumer architecture, network bandwidth, and API coupling.
Payload Schema Integration
Webhook event payloads reference schemas from your workspace's shared schema library. This provides type safety, reusability, and end-to-end data lineage.
Concrete Examples
Every event definition should include at least one concrete JSON example showing both headers and payload. Examples serve as the single most useful reference for consuming developers.
Example: E-Commerce Webhook Events
The following event definitions demonstrate the documentation format for a complete e-commerce webhook API.
Order Events
Order lifecycle events fire as orders progress from creation through fulfilment.