Example Implementations
See the Webhook Warden in action with these practical examples
Basic Webhook Validation
// Basic validation example
const inputData = {
body: {
timestamp: new Date().toISOString(),
batch_info: { batch_id: "test123" },
messages: [{ bot_name: "test-bot", message_count: 1 }]
}
};
// Validate structure
if (!inputData.body?.messages?.length || !inputData.body.timestamp) {
console.error("Invalid webhook structure");
}
This basic example shows the minimum required fields for a valid webhook structure.