https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> What is the webhook to get ...
# ❓・ai-evy-support
m
@AI Evy What is the webhook to get a transcript when call ended.
a
Thanks for tagging me @met123_383913. I'll look through relevant sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Webhook Overview]() * [Opt out of data storage]() * [Make & receive phone calls]() * [Setup guide]() -----------------------------
### Answer To get a transcript when a call ends with Retell AI, you need to set up the
call_ended
webhook event. [(1)]() Event Types Retell AI supports several webhook events, including: - `call_started`: Triggered when a new call begins - `call_ended`: Triggered when a call completes, transfers, or encounters an error - `call_analyzed`: Triggered when call analysis is complete The
call_ended
webhook event will include the transcript in its payload. [(1)]() [(2)]() Webhook Setup 1. Create a server endpoint that can accept webhook requests with a POST method. [(3)]() 2. Register your webhook at either the account level or agent level: - Account level: Set up through the dashboard's webhooks tab - Agent level: Set up through the dashboard's agent detail page 3. When the call ends, Retell will send a POST request to your webhook endpoint with a payload containing the transcript. [(1)]() [(2)]() Sample Webhook Payload
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
  }
}
[(1)]() Important Notes - The webhook will be triggered in order (call_started, call_ended, call_analyzed) but is not blocking. - If you're using Make.com, you'll need to filter for the
call_ended
event type since all events are sent to the same webhook URL. [(4)]() [(5)]() [(2)]() - If you opt out of sensitive data storage, you will still receive webhook events with the transcript, but the call recording link will expire after 10 minutes. [(6)]() For more details on setting up and handling webhooks, you can refer to the [Webhook Overview]() and [Setup guide](). [(1)]() [(3)]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.