Flireo AI
WebsiteLinkedin
WebsiteLinkedin
  1. Webhooks
  • 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. Webhooks

Assistant request

Called before an inbound call is answered, allowing you to dynamically configure the agent based on caller information.

When It's Called#

1.
Inbound call arrives at your phone number
2.
Agent has webhook_url configured with assistant-request event enabled
3.
Flireo sends POST request to your webhook
4.
Your endpoint responds with configuration overrides (or empty object)
5.
Call is answered with the configured settings

Timeout#

Your endpoint must respond within 5 seconds. If it doesn't respond in time, the call proceeds with the default agent configuration.

Request Payload#

{
  "message": {
    "type": "assistant-request",
    "timestamp": "2025-12-13T12:00:00.000Z",
    "call": {
      "id": "5c4d030f-43e3-4e65-899e-8148521e660f",
      "type": "inboundPhoneCall",
      "status": "ringing"
    },
    "phoneNumber": {
      "number": "+31850835037",
      "name": "Flireo Demo"
    },
    "customer": {
      "number": "+31612345678"
    }
  }
}

Response Options#

Use Default Configuration#

Return an empty object to use the default agent configuration:
{}

Personalize Greeting#

{
  "assistant": {
    "firstMessage": "Hallo Jan, leuk dat je belt! Hoe kan ik je helpen?"
  }
}

Override LLM Configuration#

{
  "assistant": {
    "llm_config": {
      "provider": "openai",
      "model": "gpt-4o",
      "messages": [
        {
          "role": "system",
          "content": "Je spreekt met Jan de Vries, een VIP klant. Wees extra behulpzaam."
        }
      ]
    }
  }
}

Set Call Duration Limit#

{
  "maxDurationSeconds": 300
}

Reject the Call#

Return an error message to reject the call. The message is spoken to the caller:
{
  "error": "Sorry, we zijn op dit moment gesloten. Bel terug tijdens kantooruren."
}

Enable Call Analysis#

{
  "assistant": {
    "analysisPlan": {
      "structuredDataPlan": {
        "enabled": true,
        "schema": {
          "type": "object",
          "properties": {
            "intent": { "type": "string" },
            "sentiment": { "type": "string", "enum": ["positive", "neutral", "negative"] },
            "appointment_booked": { "type": "boolean" }
          }
        },
        "messages": [
          {
            "role": "system",
            "content": "Analyze the call transcript according to the schema: {{schema}}"
          },
          {
            "role": "user",
            "content": "Transcript: {{transcript}}"
          }
        ]
      }
    }
  }
}

Use Cases#

CRM Integration: Look up caller in your CRM and personalize greeting
Business Hours: Reject calls outside business hours
VIP Handling: Use premium model for important customers
A/B Testing: Route callers to different agent configurations
Language Detection: Adjust language based on caller's region

Example Implementation (Node.js)#

See AssistantRequestPayload Schema and AssistantRequestResponse Schema for complete details.
Modified at 2025-12-29 14:26:38
Previous
Overview
Next
Tool calls
Built with