Documentation
API Reference
Documentation
API Reference
Book a meeting
Linkedin
Github
  1. Core concepts
  • Introduction
  • Get started
    • Quickstart
    • Authentication
  • Core concepts
    • Agents
    • Phone numbers
    • Calls
    • Webhooks
  • Webhooks
    • Overview
    • Assistant request
    • Tool calls
    • Status update
    • End of call report
    • Security
  • Guides
    • Campaigns
    • xAI Realtime Integration
    • Voice selection psychology
    • Analysis templates
    • BYOK Setup
    • Call analysis
    • Call Transfers
    • Custom Tools
    • Sip Trunks
    • Tool templates
    • Voicemail detection
    • Autonomous silence detection
    • Billing
    • Error codes
    • Rate limits
    • Troubleshooting
  • Api's
    • Campaigns
    • Agents
    • Voices
    • BYOK
    • Analysis templates
    • Tool templates
    • Organization
    • Phone numbers
    • Sip trunks
    • Calls
    • Call control
    • Usage
    • Domains
Documentation
API Reference
Documentation
API Reference
Book a meeting
Linkedin
Github
  1. Core concepts

Webhooks

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#

EventWhen TriggeredResponse Used
assistant-requestBefore call is answeredYes - can configure agent
tool-callsAgent needs to execute a toolYes - return tool result
status-updateCall status changesNo
end-of-call-reportAfter call endsNo

Configuring Webhooks#

Set the webhook URL and events on your agent:

Webhook Headers#

All webhook requests include these headers:
HeaderDescription
Content-Typeapplication/json
User-AgentHMS-Sovereign/1.0
X-Webhook-EventEvent type (e.g., tool-calls)
X-Webhook-TimestampUnix timestamp of the request
X-Webhook-SignatureHMAC-SHA256 signature (if secret configured)

Signature Verification#

If you configure a webhook_secret, verify the signature to ensure requests come from Flireo:
Python:
Node.js:

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.
Response format:
{
  "agent_id": "uuid",  // Reference mode: use saved agent
  "agent": { ... },    // Transient mode: full agent config
  "agent_override": { ... }  // Hybrid mode: merge with agent_id
}
See Dynamic Assistant Configuration Webhook for payload details.

Tool Calls#

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": [{"tool_call_id": "...", "result": {...}}]}
Simple format: {"result": {...}}
Direct format: {...} (your data directly)
Error format: {"error": "message"}
See Tool/Function Call Webhook for payload details.

Status Update#

Called when the call status changes:
in-progress - Call connected
ended - Call ended normally
ended-with-error - Call ended due to error
Response is ignored.
See Call Status Update Webhook for payload details.

End of Call Report#

Called after the call ends with:
Call duration
AI-generated summary
Structured analysis (if analysis_plan configured)
Response is ignored.
See End of Call Report Webhook for payload details.

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": "inbound_phone_call",
      "status": "in-progress"
    },
    "phone_number": {
      "number": "+31850835037",
      "name": "Flireo Demo"
    },
    "customer": {
      "number": "+31612345678"
    },
    "agent": {
      "id": "agent-uuid",
      "name": "Customer Support Agent",
      "llm_config": { ... },
      "tts_config": { ... },
      "stt_config": { ... }
    }
  }
}

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

Related#

Custom Tools Guide - Building tools for your agent
Call Analysis Guide - Structured post-call data
Webhook Security - Securing your webhooks
Modified at 2026-01-30 12:18:42
Previous
Calls
Next
Overview
Built with