1. Webhooks
  • HMS Sovereign API
  • Get started
    • Authentication
    • Introduction
    • Quickstart
  • Core concepts
    • Assistants
    • Calls
    • Phone Numbers
    • Webhooks
  • Platform
    • Billing & Credits
    • EU Data Sovereignty
    • Voice Selection
    • Whitelabel Portal
  • Webhooks
    • Assistant Request
    • End of Call Report
    • Webhooks Overview
    • Webhook Security
    • Status Update
    • Tool Calls
  • Configuration
    • Analysis Templates
    • Custom Tools
    • SIP Trunks
    • Tool Templates
  • Features
    • AI Generation
    • Autonomous Silence Handling
    • Call Analysis
    • Call Transfers
    • Campaigns Setup
    • Outbound Campaigns
    • Voicemail Detection
    • Web Calls
  • Integrations
    • BYOK Setup
    • Provider Pricing
    • xAI Grok Integration
  • Reference
    • Error Codes
    • Rate Limits
    • Troubleshooting
Documentation
API Reference
Documentation
API Reference
Book a meeting
Linkedin
Github
  1. Webhooks

End of Call Report

Called after the call ends with a summary and optional structured analysis. This is the most commonly used webhook for CRM integrations.

When It's Called#

After the call ends, HMS Sovereign:
1.
Generates an AI summary of the conversation
2.
Runs structured analysis (if analysis_plan was configured)
3.
Sends the report to your webhook

Request Payload#

{
  "message": {
    "type": "end-of-call-report",
    "timestamp": "2025-12-13T12:05:30.000Z",
    "call": {
      "id": "5c4d030f-43e3-4e65-899e-8148521e660f",
      "type": "inbound_phone_call",
      "status": "ended"
    },
    "phone_number": {
      "number": "+31850835037",
      "name": "HMS Sovereign Demo"
    },
    "customer": {
      "number": "+31612345678"
    },
    "duration_seconds": 84,
    "summary": "Klant vroeg naar openingstijden en wilde een afspraak maken voor volgende week.",
    "analysis": {
      "sentiment": 8,
      "hoofdonderwerp": "Afspraak maken",
      "vraag_beantwoord": true,
      "gesprek_kwaliteit": "Goed"
    }
  }
}

Payload Fields#

FieldTypeAlways PresentDescription
duration_secondsintegerYesTotal call duration
summarystringYesAI-generated summary
analysisobjectNoStructured analysis (if configured)

Response#

The response body is ignored. Return any 2xx status code to acknowledge receipt.

Analysis Configuration#

To get structured analysis, configure analysis_plan on your assistant:
{
  "analysis_plan": {
    "structured_data_plan": {
      "enabled": true,
      "schema": {
        "type": "object",
        "properties": {
          "sentiment": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "description": "Customer sentiment score 1-10"
          },
          "intent": {
            "type": "string",
            "enum": ["support", "sales", "complaint", "other"]
          },
          "resolved": {
            "type": "boolean",
            "description": "Whether the customer's issue was resolved"
          },
          "follow_up_needed": {
            "type": "boolean"
          }
        }
      },
      "messages": [
        {
          "role": "system",
          "content": "Analyze the call transcript according to the provided schema. Return valid JSON matching the schema."
        },
        {
          "role": "user",
          "content": "Schema: {{schema}}\n\nTranscript: {{transcript}}\n\nCall ended because: {{ended_reason}}"
        }
      ]
    },
    "min_messages_threshold": 5
  }
}

Analysis Plan Fields#

FieldDescription
structured_data_plan.enabledEnable/disable analysis
structured_data_plan.schemaJSON Schema for output
structured_data_plan.messagesPrompt template with placeholders
min_messages_thresholdMin conversation messages before running

Available Placeholders#

PlaceholderDescription
{{schema}}Your JSON Schema
{{transcript}}Full call transcript
{{ended_reason}}Why the call ended

Use Cases#

Sync call summaries to CRM
Track customer sentiment over time
Identify sales opportunities
Measure call quality
Detect escalation needs
Build analytics dashboards

Example Implementation (Node.js)#

See EndOfCallReportPayload Schema and AnalysisPlan Schema for complete details.
Modified at 2026-03-17 10:59:50
Previous
Assistant Request
Next
Webhooks Overview
Built with