https://retellai.com/?utm_source=discord&utm_medium=seo logo
is it possible to end a call programatically
# ❓・ai-evy-support
y
@AI Evy is it possible to end a call programatically
a
Thanks for tagging me @yunoo212. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can end a call programmatically in Retell AI using the End Call tool [(1) ]() . To configure this: 1. Add the "End Call" tool in the tools section of your agent 2. Define specific conditions for when the call should terminate 3. Update your agent's prompt to include instructions about when to use the end_call tool For example, you can configure conditions like: "If the user says 'thank you', 'goodbye', or 'bye', use the end_call tool to terminate the conversation." Important note: There's a known behavior where calling
end_call
programmatically may end the call before the final AI message is spoken out [(2) ]() . Users have reported this issue when streaming responses with
end_call=True
. Additionally, you can set the end_call tool as a global node and configure max call duration and max silence duration in settings to ensure calls end eventually [(3) ]() .
​ To learn more, see the sources I considered: [[1] End call](https://docs.retellai.com/build/single-multi-prompt/end-call) [[2] Calling end_call programatically ends the call before the final AI message is spoken out](https://discord.com/channels/1186424376300679209/1346423473765093376) [[3] Discord message from @stackdev02 on 2025-03-15](https://discord.com/channels/1186424376300679209/1294891368505937952/1350536888913760356) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
y
@AI Evy using an API route maybe given the call_id or smth like this
a
Thanks for the follow-up, @yunoo212. I'll get back to you soon.
### Answer Based on the available documentation, I don't see a direct API endpoint specifically for ending an ongoing call programmatically using just the
call_id
. The Update Call API endpoint allows you to modify certain call parameters during an active call, but the available update operations focus on modifying agent behavior, dynamic variables, and metadata rather than terminating the call [(1) ]() . The documented approach for programmatically ending calls is through the End Call tool that your agent can invoke during the conversation, as mentioned in the previous response. If you need to forcefully terminate a call from your backend using an API route with the
call_id
, this specific functionality isn't explicitly documented in the available sources. You may want to check the full API documentation or contact Retell AI support for this capability. **
​ To learn more, see the sources I considered: [[1] Update Call](https://docs.retellai.com/api-references/update-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.