https://retellai.com/?utm_source=discord&utm_medium=seo logo
Error publishing agentCould not publish agenti kee...
# ❓・ai-evy-support
s
@AI Evy Error publishing agent Could not publish agent i keep getting this error why is this?
a
Thanks for tagging me @SolePurpose (Frizzy45). I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Publish Agent](https://docs.retellai.com/api-references/publish-agent) ​
### Answer The "Could not publish agent" error can occur when attempting to publish an agent using the Retell AI platform. Based on the available sources, here are potential causes and troubleshooting steps: Common Issues: The Publish Agent API endpoint requires proper authentication and a valid agent ID [(1) ]() . When publishing an agent, you're creating a new version and generating a new draft agent with a newer version . Potential Causes: - Invalid or missing API key in the authorization header - Incorrect agent ID format or non-existent agent - Issues with the agent configuration that prevent publishing What the API expects:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
await client.agent.publish('16b980523634a6dc504898cda492e939') ;
Troubleshooting Steps: 1. Verify your agent ID is correct 2. Ensure your API key is valid and properly formatted as "Bearer YOUR_API_KEY" 3. Check that the agent exists and has a draft version ready to publish 4. Review any validation errors in your agent configuration before attempting to publish The API can return several error codes including 400 (invalid request format) , 401 (authentication issues) , 404 (agent not found) , 422 (validation error) , or 500 (server error) . If the issue persists after checking these items, I recommend: - Visit [Contact Sales]() - Visit [Documentation]() Would you like a general answer based on my knowledge instead?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy im on version 230 iv done this coutless times why only now is it not working
a
Thanks for the follow-up, @SolePurpose (Frizzy45). I'll get back to you soon.
### Answer Since you're at version 230 and this has worked previously, here are specific troubleshooting steps: Check Agent Configuration: The agent must have valid configuration before publishing [(1) ]() . Key fields that could prevent publishing include: -
response_engine
- must reference a valid LLM ID and version -
voice_id
- must be a valid voice - Required fields like
language
Verify API Key Status: Your API key might have been invalidated or needs regeneration [(2) ]() . Go to Settings → API keys to verify your key is active . Identity Verification Issue: One community member experienced publishing failures related to persona identity verification not completing successfully [(3) ]() . If you see a "Verify your identity to make outbound calls" button that hasn't disappeared, this could be blocking publishing . In that case, contact support@retellai.com . Publishing Process: When you publish an agent, it creates a new version and generates a new draft agent with a newer version [(4) ]() . The
is_published
field should change to
true
after successful publishing [(1) ]() . Next Steps: 1. Verify your API key is still valid in Settings → API keys [(2) ]() 2. Check if there's an identity verification pending [(3) ]() 3. Review your agent configuration for any validation errors before publishing 4. If the issue persists, email support@retellai.com with your agent ID
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@User is their a way to see the error code or what the reason for the failed publish is?
@AI Evy is their a way to see the error code or what the reason for the failed publish is?
a
Thanks for the follow-up, @SolePurpose (Frizzy45). I'll get back to you soon.
### Answer The Publish Agent API returns specific error codes that indicate the reason for failure [(1) ]() : Error Response Codes: - **400**: "Invalid request format, please check API reference." - **401**: Authentication issues (invalid API key) - **404**: Agent not found - **422**: Validation error - **500**: Server error How to see the error: If you're using the Retell SDK, the error response will contain a status and message :
Copy code
javascript
{
 "status": "error",
 "message": "Invalid request format, please check API reference."
}
Checking via Dashboard: Unfortunately, the available sources don't specify if the Dashboard UI displays detailed error codes when publishing fails through the interface. The error codes listed above are from the API documentation . Recommendations: 1. If you're publishing through the Dashboard, check your browser's developer console (F12) for network errors that might show the actual API response 2. Try publishing via the API directly to see the specific error code and message 3. Use the Get Agent endpoint to verify your agent configuration before attempting to publish [(2) ]() If the Dashboard isn't showing detailed error information, you may need to contact support@retellai.com with your agent ID to get specific details about why publishing is failing.
​ To learn more, see the sources I considered: [[1] Publish Agent](https://docs.retellai.com/api-references/publish-agent) [[2] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.