https://retellai.com/?utm_source=discord&utm_medium=seo logo
when making updates on a conversational flow throu...
# ❓・ai-evy-support
n
@AI Evy when making updates on a conversational flow through the API, which endpoints should i use and which order?
a
Thanks for tagging me @Nicolas. I'll look through relevant sources and get back to you shortly.
### Answer To update a conversation flow through the API, use the Update Conversation Flow endpoint. [(1) ]() **Endpoint**:
PATCH /update-conversation-flow/{conversation_flow_id}
**Basic workflow**: 1. Retrieve the existing flow (optional but recommended) using
GET /get-conversation-flow/{conversation_flow_id}
to see current configuration [(2) ]() 2. Update the flow using
PATCH /update-conversation-flow/{conversation_flow_id}
with your modifications [(1) ]() **Example code**:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
}) ;
const conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
The update endpoint allows you to modify properties like
model_choice
,
model_temperature
,
tool_call_strict_mode
,
knowledge_base_ids
,
global_prompt
,
tools
,
components
,
nodes
, and other configuration options. If you need to work with shared components separately, you can use the component-specific endpoints (
/create-conversation-flow-component
,
/delete-conversation-flow-component
) before or after updating the main flow. [(3) ]() [(4) ]()
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] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[2] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[3] Create Conversation Flow Component](https://docs.retellai.com/api-references/create-conversation-flow-component) [[4] Delete Conversation Flow Component](https://docs.retellai.com/api-references/delete-conversation-flow-component) ​
n
@AI Evy what if i have a flow that updates the conversational flow and the agent, which order and endpoints should i call?
a
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
### Answer When updating both a conversation flow and an agent, the recommended order is: 1. Update the conversation flow first using
PATCH /update-conversation-flow/{conversation_flow_id}
[(1) ]() 2. Update the agent second to attach or reference the updated conversation flow as the response engine **Why this order matters**: The conversation flow needs to exist and be properly configured before you can attach it to an agent [(2) ]() . According to a Discord discussion, you need to create the conversation flow first, then attach it to the agent as the response engine . **Example workflow**:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: process.env['RETELL_API_KEY'],
}) ;

// Step 1: Update conversation flow
const conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
[(1) ]() After updating the conversation flow, you would then update your agent configuration to reference the updated
conversation_flow_id
as its response engine. The conversation flow serves as the response engine that can be attached to an agent [(3) ]() , so updating it first ensures the agent references the latest configuration.
​ To learn more, see the sources I considered: [[1] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[2] Discord message from @confident_beetle_30154 on 2025-09-11](https://discord.com/channels/1186424376300679209/1186462578310910112/1415779997657993216) [[3] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.