What Are Webhooks?
Webhooks allow you to receive real-time HTTP notifications whenever specific events occur in your Mindhunters workspace. Instead of continuously polling the API for updates, Mindhunters will send POST requests to your specified endpoint URL when events happen.Why Use Webhooks?
Real-time Updates
Get instant notifications when conversations end, status changes occur, or intents are triggered.
Reduced API Calls
No need to poll the API repeatedly. Webhooks push data to you automatically.
Event-Driven Architecture
Build reactive applications that respond immediately to conversation events.
Custom Integration
Integrate Mindhunters with your existing systems and workflows seamlessly.
Setting Up Webhooks
Prerequisites
Before configuring webhooks, ensure you have:- Admin or developer access to your Mindhunters workspace
- A publicly accessible HTTPS endpoint to receive webhook events
- (Recommended) A secret key for webhook signature verification
Configuration Steps
1
Access Developer Settings
- Log in to your Mindhunters workspace at
https://your-tenant.mindhunters.ai - Click on your profile icon in the top right corner
- Select “Developer” from the dropdown menu
2
Navigate to Webhooks
In the Developer section, find the “Webhooks” configuration area.
3
Enter Your Webhook URL
- In the “Webhook URL” field, enter your endpoint URL
- This must be a publicly accessible HTTPS URL
- Example:
https://api.yourcompany.com/webhooks/mihu
4
Add Secret Key (Recommended)
- Enter a “Secret Key” in the provided field
- This key will be used to sign webhook payloads
- Store this key securely - you’ll need it to verify webhook signatures
- Use a strong, random string (minimum 32 characters recommended)
5
Select Event Types
Choose which events you want to receive notifications for:
- ✅ Conversation Update: Real-time updates during conversations
- ✅ Conversation End Report: Detailed report when conversation completes
- ✅ Conversation Status: Status changes (initiated, in-progress, ended)
- ✅ Intent Call: Triggered when specific intents are detected
- ✅ Text Evaluation: Results from text-based evaluations
- ✅ Voice Evaluation: Results from voice conversation evaluations
Select only the events you need to reduce unnecessary webhook traffic.
6
Save Configuration
Click “Save” or “Update” to activate your webhook configuration.
Available Event Types
Conversation Update
Sent in real-time as the conversation progresses. Useful for live monitoring and transcription display. Event Type:conversation.update
Example Payload
Conversation End Report
Sent when a conversation completes. Contains comprehensive conversation analytics. Event Type:conversation.end
Example Payload
Conversation Status
Sent when conversation status changes (initiated → in-progress → ended/failed/missed). Event Type:conversation.status
Example Payload
Intent Call
Triggered when a specific intent is detected during the conversation. Useful for triggering actions or integrations. Event Type:intent.triggered
Example Payload
Text Evaluation
Results from text-based conversation evaluations. Event Type:evaluation.text
Example Payload
Voice Evaluation
Results from voice conversation quality evaluations. Event Type:evaluation.voice
Example Payload
Webhook Payload Structure
All webhook payloads follow a consistent structure:The type of event that triggered the webhook
ISO 8601 formatted timestamp when the event occurred
Event-specific payload containing relevant information
HMAC-SHA256 signature for payload verification (when secret key is configured)
Security & Verification
Verifying Webhook Signatures
When you configure a secret key, Mindhunters signs each webhook payload with an HMAC-SHA256 signature. Always verify this signature to ensure the webhook is genuine.Best Practices
Always verify signatures
Always verify signatures
Never process webhooks without verifying the signature when a secret key is configured. This prevents unauthorized access and spoofed requests.
Use HTTPS endpoints
Use HTTPS endpoints
Only use HTTPS endpoints for webhooks. HTTP is not supported for security reasons.
Respond quickly
Respond quickly
Return a 200 status code within 5 seconds. Process long-running tasks asynchronously in a background job.
Handle idempotency
Handle idempotency
Webhooks may be delivered more than once. Use the event ID to track processed events and prevent duplicate processing.
Implement retry logic
Implement retry logic
If your endpoint is temporarily unavailable, Mindhunters will retry delivery. Implement proper error handling to accept retries gracefully.
Log webhook events
Log webhook events
Keep logs of received webhooks for debugging and audit purposes.
Webhook Endpoint Requirements
Your webhook endpoint must: ✅ Accept POST requests with JSON payloads ✅ Use HTTPS (HTTP not supported) ✅ Return HTTP 200 status code to acknowledge receipt ✅ Respond within 5 seconds ✅ Be publicly accessible on the internetTesting Webhooks
Viewing Webhook Logs
You can view webhook delivery attempts in your Mindhunters dashboard:- Navigate to Developer section
- Click on “Logs” in the right panel
- Select “Webhook Logs”
- Delivery timestamps
- Event types
- HTTP status codes
- Response times
- Payload contents
- Error messages (if any)
Testing Locally
For local development, use tools like ngrok to expose your local server:Manual Testing
You can trigger test webhook events from the Developer section:- Go to Developer → Webhooks
- Click “Send Test Event”
- Select the event type
- Review the test payload
- Click “Send”
Example Webhook Handler
Here’s a complete example webhook handler with signature verification and event processing:Retry Policy
If your webhook endpoint fails or times out, Mindhunters will automatically retry delivery:- Initial retry: After 1 minute
- Subsequent retries: Exponential backoff (2min, 4min, 8min, 16min)
- Maximum retries: 5 attempts
- Timeout: 5 seconds per attempt
Troubleshooting
Common Issues
Webhooks not being received
Webhooks not being received
Possible causes:
- Endpoint URL is not publicly accessible
- Firewall blocking incoming requests
- Server is down or not responding
- Using HTTP instead of HTTPS
Signature verification failing
Signature verification failing
Possible causes:
- Incorrect secret key
- Payload modified before verification
- Character encoding issues
Timeouts occurring
Timeouts occurring
Possible causes:
- Processing taking longer than 5 seconds
- Database operations blocking response
Duplicate events
Duplicate events
Possible causes:
- Retry mechanism delivering same event
- Network issues causing retransmission
