https://retellai.com/?utm_source=discord&utm_medium=seo logo
Working on a full stack app
# ❓・ai-evy-support
s
Working on a full stack app. My backend call retell python client sdk on request call. I want to understand, after calling client .create_phone_call(), i should add webhook to update the call status for this outnound call? How adding webhook for my current app that works only locally, and are there any ready to ise webhok @AI Evy
a
Thanks for tagging me @so16. I'll look through relevant sources and get back to you shortly.
### Answer --- Yes, webhooks are the way to receive real-time call status updates for outbound calls created via
create_phone_call()
. [(1) ]() ## Webhook Events for Outbound Calls Retell AI supports these webhook event types: -
call_started
– Triggered when a new call begins (basic call information) -
call_ended
– Triggered when a call completes, transfers, or encounters an error -
call_analyzed
– Triggered when call analysis is complete (includes full call data with
call_analysis
object) Note: If the call did not connect (like dial failed) , the
call_started
webhook will not be triggered. ## Setting Up Webhooks The webhook is configured at the agent level, not per-call. You set the
webhook_url
in your agent configuration. The webhook will
POST
the payload to your endpoint with a 10-second timeout and up to 3 retries if no 2xx response is received. Sample payload structure:
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",
    "disconnection_reason": "user_hangup",
    "transcript": "..."
  }
}
## Local Development For testing webhooks locally, you'll need to expose your local server to the internet. Common tools include: - ngrok – Creates a public URL that tunnels to your localhost - localtunnel – Similar tunneling service The documentation doesn't provide a ready-to-use webhook implementation, but your endpoint simply needs to: 1. Accept POST requests 2. Return a 2xx status code Check out these resources for more details: - [Webhook Overview]() - [Create Phone Call]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) ​