https://retellai.com/?utm_source=discord&utm_medium=seo logo
i have 80 agents, how to update them all at once
# ❓・ai-evy-support
v
@AI Evy i have 80 agents, how to update them all at once
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
### Answer There isn't a built-in bulk update endpoint in Retell AI. To update all 80 agents at once, you'll need to loop through each agent and call the update endpoint individually using the SDK or API. Here's an example approach using the JavaScript SDK: [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;

const agentIds = ['agent_id_1', 'agent_id_2', /* ...all 80 agent IDs */];

for (const agentId of agentIds) {
  const agentResponse = await client.agent.update(agentId, {
    agent_name: 'Updated Name', // your update parameters here
  }) ;
  console.log(agentResponse.agent_id) ;
}
You would: 1. Retrieve all your agent IDs (you can use the List Agents endpoint if needed) 2. Loop through each ID and call
client.agent.update()
with the desired changes For conversation flow agents, the update method is similar: [(2) ]()
Copy code
javascript
const conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id') ;
Consider adding error handling and rate limiting if you're updating many agents in quick succession.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[2] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.