Custom knowledge base removed from dashboard saves
# support
q
I created a custom knowledge base and added it to the assistant, but now every time I do anything in the dashboard, it overrides it. Is there any way to fix this or a better solution here?
v
To prevent the dashboard from overriding your custom knowledge base, manage your assistant configuration exclusively via the API. Here’s a sample cURL command to update your assistant with the custom knowledge base:
Copy code
bash
curl --location --request PATCH 'https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_VAPI_API_KEY' \
  --data '{
    "model": {
      "model": "gpt-4o",
      "provider": "openai",
      "messages": [
        { "role": "system", "content": "Your existing system prompt..." }
      ],
      "knowledgeBaseId": "YOUR_KNOWLEDGE_BASE_ID"
    }
  }'
Avoid making changes in the dashboard after this, as it will overwrite your API configuration ([documentation](https://docs.vapi.ai/knowledge-base/custom-knowledge-base)). Source: - [Custom Knowledge Base documentation](https://docs.vapi.ai/knowledge-base/custom-knowledge-base)
q
It looks like the dashboard updates came out and now this is resolved
c
Once you have used the API to configure your assistant with custom settings, you will need to continue using the API