Webhook Integration
Learn how to integrate webhook notifications into your widget to receive real-time data updates.
Webhook integration allows your widget to send real-time notifications to your server whenever specific events occur. This enables you to build powerful automations and keep your systems in sync.
Setting Up Webhook Integration
1. Navigate to Integrations
- Open your widget in the editor
- Click on the Integrations panel
- Select Webhook from the available integration options
2. Configure Webhook Credentials
You'll need to provide two essential credentials:
Callback URL
- Description: The endpoint URL where webhook notifications will be sent
- Format: Must be a valid HTTPS URL (e.g.,
https://your-domain.com/webhooks/widget
) - Requirements: Your server must be able to receive POST requests at this URL
Signing Secret
- Description: A secret key used to sign webhook payloads for security
- Format: Any string value (recommended: 32+ random characters)
- Purpose: Allows you to verify that webhook requests are genuinely from our platform
3. Save Configuration
Once you've entered both credentials, click Save to activate the webhook integration.
How Webhook Data is Sent
When events occur in your widget, we'll send HTTP POST requests to your callback URL with the following structure:
Request Headers
Request Body
The request body contains a JSON payload with the submission data directly:
The payload structure depends on your widget's form fields and will contain all the data submitted by the user.
Signature Validation
For security, all webhook requests include an X-Signature
header that you should validate to ensure the request is genuine.
Signature Format
The signature is generated using HMAC-SHA256 and formatted as:
Validation Process
Here's how to validate the signature in different programming languages:
Node.js / Next.js
Python
PHP
Best Practices
Security
- Always validate the webhook signature before processing the payload
- Use HTTPS for your callback URL
- Keep your signing secret secure and never expose it in client-side code
- Consider implementing rate limiting on your webhook endpoint
Reliability
- Return a
200
status code when successfully processing the webhook - Implement proper error handling and logging
- Consider implementing idempotency using the event ID to handle duplicate deliveries
- Set up monitoring to track webhook delivery success rates
Performance
- Process webhooks asynchronously when possible
- Respond quickly (within 10 seconds) to avoid timeouts
- Implement queuing for heavy processing tasks
Troubleshooting
Common Issues
Webhook not received
- Verify your callback URL is accessible from the internet
- Check that your server accepts POST requests
- Ensure your endpoint returns a 2xx status code
Signature validation fails
- Verify you're using the correct signing secret
- Ensure you're validating the raw request body (before JSON parsing)
- Check that your HMAC implementation matches the examples above
Timeout errors
- Ensure your webhook endpoint responds within 10 seconds
- Consider processing webhooks asynchronously
Testing Your Webhook
You can test your webhook endpoint using tools like:
- ngrok: For exposing local development servers
- curl: For manual testing
- Postman: For API testing and debugging
Example test request:
Support
If you encounter issues with webhook integration, please check:
- Your server logs for error messages
- That your callback URL is accessible
- Your signature validation implementation
For additional support, contact our team with your webhook configuration details and any error messages you're seeing.