https://retellai.com/?utm_source=discord&utm_medium=seo logo
I set webhook url on agent, the only webhook I rec...
# ❓・ai-evy-support
z
@AI Evy I set webhook url on agent, the only webhook I recieve is call_inbound. How can I get call end webhook with transcript and summary?
a
Thanks for tagging me @zabloon_24854_87367. I'll look through relevant sources and get back to you shortly.
### Answer To get call end + transcript/summary webhooks, you need to use the Call Event Webhook, which is separate from the inbound-call webhook you’re seeing on the agent. [(1) ]() [(2) ]() 1. What your agent webhook is doing now The
call_inbound
webhook is specifically for deciding how to handle an inbound call/SMS (e.g., override agent, dynamic variables, etc.) . [(1) ]() It does not deliver call-end events or transcripts. 2. What you need for call end + transcript Call-level events (
call_started
,
call_ended
,
call_analyzed
) are sent via the Call Event Webhook system. [(2) ]() -
call_ended
includes all fields from the call object except
call_analysis
. -
call_analyzed
includes full call data including the
call_analysis
object (this is where analysis/summary lives) . Example payload for `call_ended`:
Copy code
json
   {
    "event": "call_ended",
    "call": {
      "call_type": "phone_call",
      "from_number": "+12137771234",
      "to_number": "+12137771235",
      "direction": "inbound",
      "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
      "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
      "call_status": "registered",
      "metadata": {},
      "retell_llm_dynamic_variables": {
        "customer_name": "John Doe"
      },
      "start_timestamp": 1714608475945,
      "end_timestamp": 1714608491736,
      "disconnection_reason": "user_hangup",
      "transcript": "...",
      "transcript_object": [ [Object], [Object], [Object], [Object] ],
      "transcript_with_tool_calls": [ [Object], [Object], [Object], [Object] ],
      "opt_out_sensitive_data_storage": false
    }
   }
3. How to set up the Call Event Webhook You must register a separate HTTP(S) endpoint that accepts POSTs and returns 2xx quickly: [(3) ]() [(2) ]() Example Node.js endpoint: [(3) ]()
Copy code
ts
   // install the sdk: <https://docs.retellai.com/get-started/sdk>
   import { Retell } from "retell-sdk";
   import express, { Request, Response } from "express";
   const app = express() ;
   app.use(express.json() ) ;
   app.post("/webhook", (req: Request, res: Response) => {
    const {event, call} = req.body;
    switch (event) {
    case "call_started":
    console.log("Call started event received", call.call_id) ;
    break;
    case "call_ended":
    console.log("Call ended event received", call.call_id) ;
    break;
    case "call_analyzed":
    console.log("Call analyzed event received", call.call_id) ;
    break;
    default:
    console.log("Received an unknown event:", event) ;
    }
    // Acknowledge the receipt of the event
    res.status(204) .send() ;
   }) ;
The Call Event Webhook will POST payloads like the sample above to your endpoint, with a 10s timeout and up to 3 retries if a 2xx is not returned. [(2) ]() 4. What to change in your setup - Keep your agent inbound webhook URL for
call_inbound
logic (if you need it) . [(1) ]() - Additionally, configure the Call Event Webhook at the account/monitoring level (not just the agent webhook) to your
/webhook
(or similar) endpoint so you receive
call_ended
and
call_analyzed
events with transcript and analysis. [(3) ]() [(2) ]() If you need help locating where to configure the Call Event Webhook in your account UI, say what you’ve already set (agent-level vs account-level webhook) , and I can point to the most relevant part of the docs.
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[3] Setup guide](https://docs.retellai.com/features/register-webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.