https://retellai.com/?utm_source=discord&utm_medium=seo logo
Can I duplicate a conversation flow agent using th...
# ❓・ai-evy-support
s
@AI Evy Can I duplicate a conversation flow agent using the API?
a
Thanks for tagging me @summerpuppet471. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[2] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) [[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.
### Answer Yes, you can duplicate a conversation flow agent using the API. The Conversation Flow API is now available in the SDK. [(1) ]() Here's the approach: 1. Get the existing conversation flow using
client.conversationFlow.list()
to retrieve your conversation flows. [(2) ]() 2. Create a new conversation flow with the same configuration using
client.conversationFlow.create()
. [(3) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
  model_choice: { model: 'gpt-4.1', type: 'cascading' },
  nodes: [
    {
      id: 'start',
      instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
      type: 'conversation',
    },
  ],
  start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
You would retrieve the configuration from your existing conversation flow and pass those same parameters (nodes, model_choice, tools, global_prompt, etc.) to the create endpoint to duplicate it.