Creating Webhook Endpoints
Set up webhook endpoints to receive event notifications from Voxifi.
Prerequisites
- [ ] A publicly accessible HTTPS URL
- [ ] Server capable of handling POST requests
- [ ] Understanding of JSON payloads
Step-by-Step Guide
Step 1: Navigate to Webhooks
- Click Integrations in the sidebar
- Select Webhooks
- Click Add Webhook
Step 2: Configure Endpoint
| Field | Description | Example |
|---|---|---|
| URL | Your webhook endpoint (HTTPS required) | https://api.yoursite.com/webhooks/voxifi |
| Description | Optional label | "Production CRM Webhook" |
Step 3: Select Events
Choose events to subscribe to:
- [ ]
call.started- Call begins - [ ]
call.ended- Call ends (basic completion info) - [ ]
call.completed- Call ends with full details (transcript, cost, sentiment) - [ ]
call.failed- Call failed to connect
Start Small
Begin with call.completed — it contains the most useful data for most integrations.
Step 4: Save
- Click Create Webhook
- Copy the Signing Secret — it is only shown once
- Test immediately using Send Test Event
Endpoint Requirements
Technical Requirements
| Requirement | Details |
|---|---|
| Protocol | HTTPS required |
| Method | Accept POST requests |
| Response | Return 2xx within 30 seconds |
| Content-Type | Accept application/json |
Example Server (Node.js)
javascript
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhooks/voxifi', (req, res) => {
const event = req.body;
console.log('Received event:', event.event_type);
console.log('Data:', event.data);
// Process the event...
res.status(200).send('OK');
});
app.listen(3000);Example Server (Python)
python
from flask import Flask, request
app = Flask(__name__)
@app.route('/webhooks/voxifi', methods=['POST'])
def handle_webhook():
event = request.json
print(f"Received event: {event['event_type']}")
print(f"Data: {event['data']}")
# Process the event...
return 'OK', 200Testing Your Endpoint
Send Test Event
- Go to your webhook in Integrations > Webhooks
- Click Send Test Event
- Select an event type
- Click Send
- Verify your server received it
Check Logs
- View the Delivery Log for the webhook
- See the status of each delivery attempt
Common Issues
"Connection Failed"
- Verify URL is correct and uses HTTPS
- Ensure server is publicly accessible
- Check firewall rules
- Verify TLS certificate is valid
"Timeout"
- Respond within 30 seconds
- Process asynchronously if needed
- Return 200 immediately, then process in the background
Next Steps
- Event Types - All available events
- Security - Verify webhook signatures