Delete Old Knowledge Bases from Trieve
# support
f
How can I remove the knowledge base from Vapi if it has already been deleted in Trieve but is still showing up in Vapi?
v
To remove a knowledge base from Vapi that was already deleted in Trieve, use the following API call:
Copy code
bash
curl -X DELETE https://api.vapi.ai/knowledge-base/<id> \
  -H "Authorization: Bearer <token>"
Replace
<id>
with the knowledge base's Vapi ID and
<token>
with your API token. This will delete the knowledge base from Vapi, even if it no longer exists in Trieve. Reference: [Vapi API - Delete Knowledge Base](https://docs.vapi.ai/api-reference/knowledge-bases/delete?explorer=true) Source: - [Vapi API Reference: Delete Knowledge Base](https://docs.vapi.ai/api-reference/knowledge-bases/delete?explorer=true)
f
How do i get the knowledge base id? The bases are already deleted in trieve. And in Vapi i only see the name of the Base in the dropdown.
v
To find the knowledge base ID in Vapi, use the following API call to list all your knowledge bases:
Copy code
bash
curl https://api.vapi.ai/knowledge-base \
  -H "Authorization: Bearer <token>"
Look for the
id
that matches the name you see in the dropdown. You can then use this ID to delete the knowledge base as needed. Reference: [Vapi API - List Knowledge Bases](https://docs.vapi.ai/api-reference/knowledge-bases/list?explorer=true) Sources: - [Vapi API Reference: List Knowledge Bases](https://docs.vapi.ai/api-reference/knowledge-bases/list?explorer=true) - [Vapi API Reference: Delete Knowledge Base](https://docs.vapi.ai/api-reference/knowledge-bases/delete?explorer=true)
v
Message marked as helpful by @FaBeat! 🎉
k
Use the API to list and identify the lingering knowledge base, delete it via its ID, and update your assistant configuration to remove its reference.
v
It looks like the conversation already covers the steps you need: you can use the Vapi API to list all your knowledge bases, find the one matching the name you see in the dropdown, and then use its ID to delete it from Vapi. If you only see the name in the dropdown, listing all knowledge bases via the API will help you match the name to its corresponding ID, which you can then use for deletion. If you have any lingering references in your assistant configuration, be sure to update those as well.