https://retellai.com/?utm_source=discord&utm_medium=seo logo
I get 422 "Unprocessable entity" error in add know...
# ❓・ai-evy-support
a
@AI Evy I get 422 "Unprocessable entity" error in add knowledgesources ? [ HTTP Request: POST https://api.retellai.com/add-knowledge-base-sources/knowledge_base_b4788b3abd53c07b "HTTP/1.1 422 Unprocessable Entity" ] Is there any limit in the urls added ?
a
Thanks for tagging me @afrah_85175. I'll look through relevant sources and get back to you shortly.
### Answer A 422 "Unprocessable Entity" error typically occurs when the request format or data is invalid. Based on the API documentation, here are the requirements for adding knowledge base sources [(1) ]() : The API accepts these parameters : -
knowledge_base_texts
(array of objects with title and text) -
knowledge_base_files
(file array, limited to 25 files where each file is limited to 50MB) -
knowledge_base_urls
(string array of valid URLs) For URLs specifically, the documentation shows this example format :
Copy code
json
[  
 "<https://www.example.com%22,>  
 "<https://www.retellai.com%22>  
]
The documentation doesn't specify a limit on the number of URLs, but it does require that URLs "Must be valid urls" . Your 422 error suggests the request format or URL validation is failing. Check that: 1. Your URLs are properly formatted and accessible 2. The request body follows the correct multipart/form-data format 3. Your knowledge base ID is valid If you continue experiencing issues, there have been reports of server errors with knowledge base APIs [(2) ]() [(3) ]() , so this might be a platform issue that needs support attention.
​ To learn more, see the sources I considered: [[1] Add Knowledge Base Sources](https://docs.retellai.com/api-references/add-knowledge-base-sources) [[2] internal server error on create knowledge base by API](https://discord.com/channels/1186424376300679209/1391417148215136376) [[3] Add Knowledge Base Source API is not working -Please help](https://discord.com/channels/1186424376300679209/1352422278930890772) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.