https://retellai.com/?utm_source=discord&utm_medium=seo logo
Is it possible to use the API to update only one n...
# ❓・ai-evy-support
s
@AI Evy Is it possible to use the API to update only one node in the update convesation flow by sending only that node details to the API or so I have to send the entire node array
a
Thanks for tagging me @Sanjay. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, the Update Conversation Flow API does not appear to support partial node updates. The
nodes
parameter is defined as an array of nodes in the conversation flow. [(1) ]() When updating a conversation flow, you would need to send the entire
nodes
array with all your nodes, not just the single node you want to modify. Recommended approach: 1. First retrieve the current conversation flow using the Get Conversation Flow endpoint [(2) ]() 2. Modify the specific node in your local copy of the nodes array 3. Send the complete updated nodes array back via the Update Conversation Flow endpoint [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
[(2) ]() This retrieves the full conversation flow, after which you can modify the specific node in the
nodes
array and submit the complete array back.
​ 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) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.