Customize Webhook - Web Hook Box
Customize Your Webhook
Custom Responses
With Web Hook Box, you can configure custom HTTP responses for your webhook endpoints. This is particularly useful when integrating with third-party services that expect specific responses when delivering webhooks.
Response Configuration Options
- Status Code: Set any HTTP status code for your webhook response
- Headers: Add custom HTTP headers to your response
- Body Content: Define custom response body content
- Content Type: Specify the content type of your response (JSON, XML, etc.)
How to Configure Custom Responses
- Navigate to your webhook details in the dashboard
- Click on the "Customize Response" tab
- Enter your desired status code (default is 200)
- Add any custom headers using the key-value editor
- Enter the response body content
- Select the appropriate content type
- Save your configuration
Example Custom Response Configuration
Status Code: 200
Headers:
Content-Type: application/json
X-Webhook-Processed: true
Body:
{
"status": "success",
"message": "Webhook received successfully",
"timestamp": "2023-07-15T14:22:34Z"
}
Header Transformations
For donor accounts, Web Hook Box allows you to transform headers before forwarding webhooks. This feature helps you adapt to different webhook providers' requirements.
Available Header Transformations
- Add Headers: Include additional headers when forwarding
- Remove Headers: Exclude specific headers
- Rename Headers: Change header names for compatibility
- Transform Values: Modify header values using simple expressions
Webhook Filtering
Donor accounts can set up filtering rules to determine which webhooks are processed, forwarded, or stored. This helps reduce noise and focus on the webhooks that matter to your application.
Filter Types
Path-based Filtering
Filter webhooks based on their request path patterns
Example: /payments/*
to only process webhooks related to payments
Header-based Filtering
Filter webhooks based on header values
Example: X-Event-Type: payment.created
to only process payment creation events
Body Content Filtering
Filter webhooks based on their payload content
Example: $.event.type == "user.created"
to process specific event types
IP Address Filtering
Filter webhooks based on source IP addresses
Example: Whitelist or blacklist IPs for enhanced security