Webhooks allow you to receive real-time notifications about call events. Configure a webhook URL on your agent to receive HTTP POST requests when events occur.Webhook Events#
| Event | When Triggered | Response Used |
|---|
assistant-request | Before call is answered | Yes - can configure agent |
tool-calls | Agent needs to execute a tool | Yes - return tool result |
status-update | Call status changes | No |
end-of-call-report | After call ends | No |
Configuring Webhooks#
Set the webhook URL and events on your agent:All webhook requests include these headers:| Header | Description |
|---|
Content-Type | application/json |
User-Agent | HMS-Sovereign/1.0 |
X-Webhook-Event | Event type (e.g., tool-calls) |
X-Webhook-Timestamp | Unix timestamp of the request |
X-Webhook-Signature | HMAC-SHA256 signature (if secret configured) |
Signature Verification#
If you configure a webhook_secret, verify the signature to ensure requests come from Flireo:Event Details#
Assistant Request#
Called before an inbound call is answered. Allows you to:Customize the agent configuration per call
Personalize the greeting based on caller
Reject calls (e.g., outside business hours)
Timeout: 5 seconds. If your endpoint doesn't respond in time, the call proceeds with default configuration.Called when the agent needs to execute a custom tool during the conversation.Timeout: 10 seconds for synchronous tools.Response formats supported:Object format: {"results": [{"toolCallId": "...", "result": {...}}]}
Simple format: {"result": {...}}
Direct format: {...} (your data directly)
Error format: {"error": "message"}
Status Update#
Called when the call status changes:in-progress - Call connected
ended - Call ended normally
ended-with-error - Call ended due to error
End of Call Report#
Called after the call ends with:Structured analysis (if analysis_plan configured)
Common Payload Fields#
All webhooks include this structure:{
"message": {
"type": "status-update",
"timestamp": "2025-12-13T12:00:00.000Z",
"call": {
"id": "5c4d030f-43e3-4e65-899e-8148521e660f",
"type": "inboundPhoneCall",
"status": "in-progress"
},
"phoneNumber": {
"number": "+31850835037",
"name": "Flireo Demo"
},
"customer": {
"number": "+31612345678"
}
}
}
Best Practices#
1.
Respond quickly - Return 200 OK as fast as possible, especially for status updates
2.
Process asynchronously - Queue heavy processing for later
3.
Verify signatures - Always verify webhook signatures in production
4.
Handle retries - Implement idempotency for duplicate deliveries
5.
Log everything - Keep webhook logs for debugging
Modified at 2025-12-29 14:21:52