justfeisgro
09/13/2025, 5:22 AMAI Evy
09/13/2025, 5:22 AMAI Evy
09/13/2025, 5:23 AMis_published property in the agent response indicates whether the agent version is published [(3) ]() [(4) ]() [(5) ]() [(6) ]() , but simply saving changes to a prompt doesn't automatically publish them - you need to explicitly publish for production use [(1) ]() .AI Evy
09/13/2025, 5:23 AMAI Evy
09/13/2025, 5:23 AMjustfeisgro
09/13/2025, 5:24 AMjustfeisgro
09/13/2025, 5:25 AMAI Evy
09/13/2025, 5:25 AMAI Evy
09/13/2025, 5:25 AMDraft as the version for your phone number . When you select Draft, it will always fetch the latest version of the agent . This means any changes you make to your agent will automatically be used in production without needing to publish a new version.
This is different from selecting a specific version number (like version 0, 1, 2, etc.) which would lock your phone number to that exact published version . With draft mode, your phone number will always use whatever the current state of your agent is, including any recent modifications you've made.
The versioning system works because published versions cannot be changed , but the draft version can be continuously updated . This gives you the flexibility to have changes take effect immediately without going through the publishing process each time.AI Evy
09/13/2025, 5:25 AMAI Evy
09/13/2025, 5:25 AMjustfeisgro
09/13/2025, 5:27 AMAI Evy
09/13/2025, 5:27 AMAI Evy
09/13/2025, 5:27 AMcreate_phone_call . For example, when creating phone calls, you can use the override_agent_version parameter to specify which version to use for that particular call [(1) ]() :
javascript
const phoneCallResponse = await client.call.createPhoneCall({
from_number: '+14157774444',
to_number: '+12137774445',
}) ;
The override_agent_version parameter allows you to override the agent version used for a specific call, which doesn't bind the agent version to the phone number - it's just for that one-time override .
If you're using the Retell SDK and don't specify a version number, it will default to the latest version of the agent [(2) ]() . But when you explicitly specify a version in your API calls, that takes precedence.
So setting your phone number to draft mode affects calls made directly to that phone number, while your HTTP API calls with explicit version parameters will continue to use the versions you specify in those calls.AI Evy
09/13/2025, 5:27 AMAI Evy
09/13/2025, 5:27 AMjustfeisgro
09/13/2025, 5:30 AMAI Evy
09/13/2025, 5:30 AMAI Evy
09/13/2025, 5:30 AMoverride_agent_version parameter is optional and is used only when you want to override the agent version for that particular call .
Looking at your payload, you're using both override_agent_id and override_agent_version . According to the documentation, these are both optional parameters that allow you to override the agent and agent version used for that specific call without binding them to the phone number .
If you don't specify the override_agent_version parameter, the system will use the default version associated with your phone number or agent [(2) ]() . As mentioned in the versioning documentation, if you're using the Retell SDK and don't specify a version number, it will default to the latest version of the agent .
So you have the flexibility to:
- Include override_agent_version to use a specific version for that call [(1) ]()
- Omit override_agent_version to use the default version [(2) ]()
- Use just override_agent_id without specifying a version [(1) ]()
Your current payload structure is valid, but you could remove the override_agent_version field if you want to use the default version instead of version 6 .AI Evy
09/13/2025, 5:30 AMAI Evy
09/13/2025, 5:30 AMjustfeisgro
09/13/2025, 5:32 AMAI Evy
09/13/2025, 5:32 AMAI Evy
09/13/2025, 5:32 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
from_number: '+14157774444',
to_number: '+12137774445',
}) ;
console.log(phoneCallResponse.agent_id) ;
The minimal required parameters for creating a phone call are :
- `from_number`: The number you own in E.164 format
- `to_number`: The number you want to call, in E.164 format
When you don't use override functions, the system will use the default agent that's bound to your phone number . This means you need to ensure your phone number is properly configured with the correct agent in the Retell AI dashboard before making the API call .
Your payload would be:
json
{
"from_number": "+15053873040",
"to_number": "{{ $json.body.phone }}"
}
The agent will be determined by whatever agent is configured for that from_number in your phone number settings .AI Evy
09/13/2025, 5:32 AMAI Evy
09/13/2025, 5:32 AMjustfeisgro
09/13/2025, 5:34 AMAI Evy
09/13/2025, 5:35 AMAI Evy
09/13/2025, 5:35 AMAI Evy
09/13/2025, 5:35 AMjson
{
"from_number": "+15053873040",
"to_number": "{{ $json.body.phone }}",
"metadata": {
"customer_name": "{{ $json.body.firstName }}",
"customer_email": "{{ $json.body.email || 'unknown' }}",
"company": "{{ $json.body.companyName || 'Unknown' }}",
"campaign_id": "{{ $json.body.campaignId || 'unknown' }}",
"source": "lemlist_webhook",
"lead_is_paused": "{{ $json.body.isPaused }}"
},
"retell_llm_dynamic_variables": {
"customer_name": "{{ $json.body.firstName }}",
"company_name": "{{ $json.body.companyName }}",
"phone-number": "{{ $json.body.phone }}",
"mobile_phone": "{{ $json.body.Mobile }}",
"hubspotLeadId": "{{ $json.body.hubspotLeadId }}"
},
"custom_sip_headers": {
"X-Custom-Header": "Custom Value"
}
}
[(3) ]()
### Key changes:
1. Removed override_agent_id - Since your phone number is already configured with the correct agent, this isn't needed
2. Removed override_agent_version - This was forcing version 6, but you want to use the draft version
With the phone number set to draft mode, the system will automatically use whatever the current state of your agent is, including any recent modifications you've made [(5) ]() . This means when you press save on the agent, your HTTP calls will use the latest version without needing to publish [(11) ]() .
The system will determine the agent to use based on your from_number configuration [(3) ]() , and since you've set it to draft at the phone level, it will always fetch the latest version of the agent [(5) ]() .AI Evy
09/13/2025, 5:35 AMAI Evy
09/13/2025, 5:35 AM