Create Knowledge Base
Create a new knowledge base in a workspace. Optionally configure chunking parameters for document processing.
POST
/api/v1/knowledgeAuthorization
apiKey X-API-Key<token>
Your Sim API key (personal or workspace). Generate one from the Sim dashboard under Settings > API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST \ "https://www.sim.ai/api/v1/knowledge" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workspaceId": "YOUR_WORKSPACE_ID", "name": "Product Documentation", "description": "Internal product docs for search", "chunkingConfig": { "maxSize": 1024, "minSize": 100, "overlap": 200 } }'{
"success": true,
"data": {
"knowledgeBase": {
"id": "kb_abc123",
"name": "Product Docs",
"description": "Product documentation and FAQs",
"docCount": 0,
"tokenCount": 0,
"embeddingModel": "text-embedding-3-small",
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-01-15T10:30:00Z"
},
"message": "Knowledge base created successfully"
}
}{
"error": "string",
"details": [
{}
]
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}