Export Knowledge Base

Stream a knowledge base as a bundle archive: its configuration, tag definitions, each workspace-visible document's file and chunk text, and optionally chunk vectors. Access-control lists, connector links, and credentials never leave. More than 2000 documents returns 413. Exports record an audit event. HEAD checks access with the same authorization as GET but skips side effects, returning an empty 200 without payload headers on success. HEAD omits Content-Length; use file metadata to size downloads.

OAuth scope: api:read.

GET/api/v2/knowledge/{knowledgeBaseId}/export
X-API-Key<token>

Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.

In: header

Path Parameters

knowledgeBaseId*string

Unique knowledge base identifier.

Length1 <= length

Query Parameters

workspaceId*string

Workspace that owns the knowledge base.

Length1 <= length <= 128
vectors?boolean

Include chunk vectors so an import into a deployment with the same embedding model reuses them instead of re-embedding.

Response Body

application/zip

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.sim.ai/api/v2/knowledge/string/export?workspaceId=string" \  -H "X-API-Key: YOUR_API_KEY"
"string"
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient workspace permissions",
    "details": {
      "code": "INSUFFICIENT_WORKSPACE_ROLE"
    }
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "PAYLOAD_TOO_LARGE",
    "message": "Request body is too large"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API rate limit exceeded",
    "details": {
      "retryAfter": "2026-01-01T00:00:30.000Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  }
}