Webhooks
Testing Webhook
Testing your webhook handler implementation
Option A: Use Caret settings
To test your webhook integration:
- Navigate to Workspace Settings > Integrations > Webhooks
- Find your webhook configuration
- Click Verify Webhook
A test event will be sent to your endpoint with type
set to test
.
Option B: Use third-party tools
For local development testing:
ngrok
ngrok creates a secure tunnel to your local server:
Use the provided HTTPS URL as your webhook endpoint in Caret.
Webhook.site
Webhook.site provides a temporary URL to inspect webhook requests without writing any code.
Common Test Cases
We recommend testing your webhook handler implementation with the following:
- Signature Validation: Verify your endpoint correctly validates webhook signatures
- Idempotency: Test handling of duplicate events with the same
eventId
- Error Handling: Ensure your endpoint returns appropriate status codes
Troubleshooting & FAQs
Why isn’t my webhook receiving events?
- Verify that your webhook URL is publicly accessible. Private or localhost URLs won’t receive events unless tunneled through a service like ngrok.
I’m getting signature validation errors.
- Ensure you’re using the raw request body for validation, not a parsed JSON object. Any modification to the body will cause signature validation to fail.
What status code should my webhook endpoint return?
- Your endpoint should return a 2xx status code (like 200 or 202) to indicate successful processing of the webhook event.
- For detailed webhook logs, contact Caret support to get the logs.