https://retellai.com/?utm_source=discord&utm_medium=seo logo
when publishing an agent version on API, im gettin...
# ❓・ai-evy-support
n
@AI Evy when publishing an agent version on API, im getting this error: "Cannot update response engine of agent version > 0"
a
Thanks for tagging me @Nicolas. I'll look through relevant sources and get back to you shortly.
### Answer [(1) ]() [(2) ]() The error "Cannot update response engine of agent version > 0" indicates that you're trying to modify the
response_engine
field on an agent version that's already been created (version 1 or higher) . Based on the Update Voice Agent and Update Chat Agent API documentation, once an agent has versions beyond 0, you cannot change its
response_engine
configuration. Solution: If you need to change the response engine, you have two options: 1. Create a new agent with the desired response engine configuration 2. Update only version 0 of the existing agent before any subsequent versions are created When updating agents with version > 0, you can modify other fields like
agent_name
,
voice_id
,
webhook_url
, etc., but the
response_engine
field is locked after the initial version.
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 Chat Agent](https://docs.retellai.com/api-references/update-chat-agent) [[2] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
n
@AI Evy when workin with a update conversation flow, how can i guarantee its in a draft version to update?
a
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
4. Optional: Specify a version when retrieving If you need to retrieve a specific version (not for updating, but for reference) , you can use the optional
version
query parameter: [(3) ]() The key point: you don't need to explicitly set a conversation flow to "draft" mode. After publishing, a new draft is automatically created for you to edit safely while the published version remains in production. [(2) ]() [(1) ]()
### Answer When updating a conversation flow, the system automatically works with draft versions. [(1) ]() Published versions cannot be changed—only the latest draft version can be modified. [(2) ]() To ensure you're updating a draft version: 1. Check the current version status Use the Get Conversation Flow API to retrieve the current version number: [(3) ]()
Copy code
javascript
const conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id') ;
console.log(conversationFlowResponse.version) ;
2. Understand the versioning behavior When you publish a conversation flow (via the "Deployment" button in the dashboard) , it creates a new published version and automatically generates a new draft for future edits. [(2) ]() [(1) ]() The conversation flow is "always in draft"—when you publish, it creates a new draft that you can edit. [(1) ]() 3. Update the conversation flow When calling the Update Conversation Flow API, you're always updating the current draft version: [(4) ]()
Copy code
javascript
const conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id') ;
​ To learn more, see the sources I considered: [[1] Discord message from @mauvatar on 2026-02-03](https://discord.com/channels/1186424376300679209/1186462578310910112/1468376961603862692) [[2] Setup versioning for agents](https://docs.retellai.com/agent/version) [[3] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[4] 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.
n
@AI Evy im workin with the APIs, so when i publish a new version it does not generate a new draft automatically, so how can i guarantee it wont generate when updating again: "message": "Cannot update published conversation flow"
a
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
### Answer I don't have information in the available sources about how the API handles draft creation after publishing a conversation flow or how to explicitly create a draft version via API to avoid the "Cannot update published conversation flow" error. The available API documentation covers retrieving [(1) ]() , creating [(2) ]() , updating [(3) ]() , and listing [(4) ]() conversation flows, but doesn't specify the workflow for creating draft versions programmatically after publishing. Check out these potentially useful sources: [Get Conversation Flow]() , [Update Conversation Flow]() , [Create Conversation Flow]() Would you like me to try to answer generally based on my knowledge instead? For additional help with API-specific workflows, visit [Documentation]() or [Hire certified Retell partner]() .
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[4] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
n
@AI Evy how about creating draft of voice agent?
a
### Answer When you publish a voice agent using the Publish Agent API, it automatically creates a new draft version with a higher version number. [(1) ]() The Publish Agent endpoint publishes the latest version of the agent and creates a new draft agent with a newer version. To publish an agent via API:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: process.env['RETELL_API_KEY'],
}) ;
await client.agent.publish('16b980523634a6dc504898cda492e939') ;
After publishing, the system automatically generates a new draft version that you can update. [(2) ]() Published versions cannot be changed—only the latest draft version can be modified. To check which versions exist for your agent, use the Get Agent Versions API:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: process.env['RETELL_API_KEY'],
}) ;
const agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939') ;
console.log(agentResponses) ;
[(3) ]() The response includes an
is_published
field that indicates whether each version is published. [(4) ]() [(3) ]()
​ To learn more, see the sources I considered: [[1] Publish Agent](https://docs.retellai.com/api-references/publish-agent) [[2] Setup versioning for agents](https://docs.retellai.com/agent/version) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) [[4] List Voice Agents](https://docs.retellai.com/api-references/list-agents) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.