Data Versioning
Understanding how HookStack handles webhook payload versioning
HookStack implements a robust versioning system for webhook payloads to ensure compatibility and reliability across different API versions. This guide explains how payload versioning works and how to handle different versions in your implementations.
Overview
When HookStack sends webhooks to your endpoints, each payload includes version information in both the headers and the payload structure. This allows your systems to handle different versions of the webhook data format appropriately.
Webhook Payload Structure
Every webhook payload follows this standardized structure:
Version Headers
HookStack includes version information in the HTTP headers of each webhook request:
The X-HookStack-Version
header allows you to validate the payload version before processing the
data, enabling version-specific handling if needed.
See Verification docs for more information on how to verify webhook requests from HookStack.
Version Compatibility
HookStack maintains backward compatibility for all supported versions. When we introduce breaking changes, we:
- Release a new version number
- Maintain support for older versions for a deprecation period
- Notify users through our changelog and email notifications
Best Practices
- Always check the version header before processing webhooks
- Implement version-specific handlers if you need to support multiple versions
- Subscribe to our changelog to stay informed about version updates
- Use type definitions for better payload handling:
HookStack provides TypeScript definitions for all supported versions to help you implement type-safe webhook handlers.
Migration Guide
When upgrading to a new version:
- Add support for the new version while maintaining old version handlers
- Test your implementation with our webhook testing tools
- Monitor webhook delivery success rates during the transition
- Remove old version handlers only after the deprecation period
Always test your webhook handlers with our testing tools before deploying to production.