https://retellai.com/?utm_source=discord&utm_medium=seo logo
Retell ai api does it let you import a json agent ...
# ❓・ai-evy-support
r
@AI Evy Retell ai api does it let you import a json agent via api to see if it works
a
Thanks for tagging me @Reetam. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, I don't have direct documentation for a dedicated "import agent via JSON" API endpoint. However, there are a couple of relevant approaches: 1. Create Agent API – The documentation references using the Create Agent endpoint to programmatically set up agents. For detailed guidance on the required parameters and format, refer to the [Create Agent documentation]() . [(1) ]() 2. Get Agent + Get LLM APIs for backup/export – Community members have noted that you can use the Get Agent and Get LLM APIs to export agent configurations as JSON for backup purposes, which could then be used to recreate agents. [(2) ]() If you're trying to import a JSON configuration and receiving errors like
"Cannot read properties of undefined (reading 'type') "
, this typically indicates a formatting issue with the JSON structure. [(1) ]() Check out these potentially useful sources: - [Create Agent API Reference]() - [Update Voice Agent]() - [Update Chat Agent]() Would you like me to provide a general answer on how agent creation via API typically works?
​ To learn more, see the sources I considered: [[1] How to import an agent using .json so it is not rejected for error](https://discord.com/channels/1186424376300679209/1361987361042599978) [[2] Discord message from @helloamitkg on 2025-08-02](https://discord.com/channels/1186424376300679209/1294891368505937952/1401132045924569190) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Reetam. I'll get back to you soon.
r
@AI Evy Is there generally a way to check via api whether a json will be a valid agent in retell without uploading manually in dashboard
a
### Answer Based on the available sources, there is no dedicated "validation-only" API endpoint that checks whether a JSON payload would create a valid agent without actually creating one. Practical approach: The recommended workflow from community members is to: 1. Create a "template agent" in the dashboard first [(1) ]() 2. Use the Get Agent and Get LLM APIs to see how the structure looks and understand the expected format 3. Then use the Create Agent API to create agents programmatically This lets you understand the valid JSON structure before attempting to create agents via API. What happens on invalid JSON: When you submit an invalid payload to the Create Agent or Update Agent endpoints, you'll receive error responses (400, 422 status codes) indicating validation failures. [(2) ]() [(3) ]() So while there's no pre-validation endpoint, you could: - Test against a non-production environment - Examine the API response codes and error messages to identify issues Check out these potentially useful sources: - [Create Voice Agent]() - [Update Voice Agent]() Would you like a general answer on common JSON validation patterns for API payloads?
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] Discord message from @sanava.ai on 2025-06-04](https://discord.com/channels/1186424376300679209/1294891368505937952/1379811281292230776) [[2] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[3] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​