Flireo AI
WebsiteLinkedin
WebsiteLinkedin
  1. Core concepts
  • API Reference
    • Agents
      • List all agents
      • Create a new agent
      • Get an agent
      • Update an agent
      • Delete an agent
    • Tool Templates
      • List all tool templates
      • Create a new tool template
      • Get a tool template
      • Update a tool template
      • Delete a tool template
    • Numbers
      • List all phone numbers
      • Register a phone number
      • Get a phone number
      • Update a phone number
      • Delete a phone number
    • Calls
      • List calls
      • Get call by ID
      • Initiate outbound call
    • Call Control
      • Send control command to active call
    • Usage
      • Get usage logs
    • SIP Trunks
      • List SIP trunks
      • Create a SIP trunk
      • Get a SIP trunk
      • Delete a SIP trunk
    • Voices
      • List available voices
    • BYOK
      • Get BYOK configurations
      • Add BYOK configuration
      • Delete BYOK configuration
      • Get BYOK provider configurations
    • Domains
      • Get your domain
      • Add a domain
      • Delete your domain
      • List available Resend domains
      • Select and sync a Resend domain
      • Verify domain DNS records
      • Refresh domain status
    • Webhooks
      • Dynamic assistant configuration webhook
      • Tool/Function Call
      • Call Status Update
      • End of Call Report
    • Analysis Templates
      • List analysis templates
      • Create analysis template
      • Get analysis template
      • Update analysis template
      • Delete analysis template
    • Organization
      • Get organization information
    • Campaigns
      • List all campaigns
      • Create a campaign
      • Get a campaign
      • Update a campaign
      • Delete a campaign
      • List campaign leads
      • Add a lead
      • Remove a lead
  • Documentation
    • Get started
      • Quickstart
      • Introduction
      • Authentication
    • Core concepts
      • Agents
      • Phone numbers
      • Calls
      • Webhooks
    • Api's
      • Organization
      • Agents
      • Phone numbers
      • Sip trunks
      • Calls
      • Call control
      • Usage
      • Voices
      • BYOK
      • Domains
      • Analysis templates
      • Tool templates
    • Webhooks
      • Overview
      • Assistant request
      • Tool calls
      • Status update
      • End of call report
      • Security
    • Guides
      • BYOK Setup
      • Call analysis
      • Custom Tools
      • Call Transfers
      • xAI Realtime Integration
      • Analysis templates
      • Billing
      • Error codes
      • Rate limits
      • Sip Trunks
      • Tool templates
      • Troubleshooting
WebsiteLinkedin
WebsiteLinkedin
  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.
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": [{"toolCallId": "...", "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": "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

Related#

Custom Tools Guide - Building tools for your agent
Call Analysis Guide - Structured post-call data
Webhook Security - Securing your webhooks
Modified at 2025-12-29 14:21:52
Previous
Calls
Next
Organization
Built with