Documentation Index
Fetch the complete documentation index at: https://mintlify.com/helicone/helicone/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Helicone webhooks enable you to receive real-time HTTP notifications when events occur in your account. Send request data, alerts, and custom events to your own endpoints for processing, logging, or integration with other systems.Webhooks are perfect for:
- Real-time logging and monitoring
- Custom analytics pipelines
- Triggering workflows based on AI responses
- Integrating with internal tools and dashboards
- Building audit trails
Key Benefits
Real-Time Events
Receive notifications instantly as requests are processed
Flexible Filtering
Use property filters to only receive relevant events
Sample Rate Control
Control webhook volume with configurable sample rates
Secure Delivery
HMAC signatures verify webhook authenticity
Setup
1. Create a Webhook Endpoint
First, create an endpoint in your application to receive webhooks:- Node.js/Express
- Python/Flask
- Next.js API Route
2. Register Your Webhook
Use the Helicone API to create a webhook:Webhook Configuration
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
destination | string | Yes | HTTPS URL where webhooks will be sent |
config.sampleRate | number | No | Percentage of events to send (0-100, default: 100) |
config.propertyFilters | array | No | Filter events by property key-value pairs |
includeData | boolean | No | Include full request/response data (default: true) |
Sample Rate
Control webhook volume by sampling events:Property Filters
Only receive webhooks for specific properties:Webhook Payload
Webhooks contain detailed request and response data:Managing Webhooks
List Webhooks
Test a Webhook
Send a test event to verify your endpoint:Delete a Webhook
Security
HMAC Signature Verification
Every webhook includes anX-Helicone-Signature header with an HMAC SHA-256 signature:
Best Practices
Always verify signatures
Always verify signatures
Validate the HMAC signature on every webhook to ensure it came from Helicone and hasn’t been tampered with.
Respond quickly
Respond quickly
Acknowledge webhooks with a 200 status code within 5 seconds. Process heavy work asynchronously:
Handle retries gracefully
Handle retries gracefully
Helicone retries failed webhooks with exponential backoff. Make your endpoint idempotent using the
requestId to avoid duplicate processing.Use sample rates for high volume
Use sample rates for high volume
If you’re processing millions of requests, use sample rates to reduce webhook volume while maintaining visibility.
Filter with properties
Filter with properties
Use property filters to only receive webhooks for critical events, reducing noise and processing overhead.
Monitor webhook health
Monitor webhook health
Track webhook delivery success rates and response times to ensure your endpoint is healthy.
Use Cases
Custom Analytics
Stream request data to your data warehouse or analytics platform for custom reporting
Compliance Logging
Maintain audit trails of all AI interactions for regulatory compliance
Real-Time Monitoring
Trigger alerts or dashboards based on latency, cost, or error patterns
Workflow Automation
Trigger downstream processes when specific AI responses are detected
Troubleshooting
Webhooks not being received
Webhooks not being received
- Verify your endpoint is publicly accessible via HTTPS
- Check that your server responds with 200 status codes
- Ensure firewall rules allow incoming traffic
- Test with the test endpoint first
Signature verification failing
Signature verification failing
- Use the raw request body for signature verification (before parsing)
- Ensure you’re using the correct HMAC key from webhook creation
- Check that you’re using SHA-256 hashing
- Use timing-safe comparison to prevent timing attacks
High latency or timeouts
High latency or timeouts
- Process webhooks asynchronously after acknowledging
- Optimize your endpoint for quick responses (< 1 second)
- Consider using a message queue for processing
Related Features
Alerts
Get notified via email or Slack for threshold-based conditions
API Reference
Full API documentation for webhook management
