Upload Document

Upload a document to a knowledge base. The document will be processed asynchronously (chunked and embedded). Maximum file size is 100MB.

POST/api/v1/knowledge/{id}/documents
X-API-Key<token>

Your SteelEngine API key (personal or workspace). Generate one from the SteelEngine dashboard under Settings > API Keys.

In: header

Path Parameters

id*string

Knowledge base ID.

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/knowledge/string/documents" \  -F file="string" \  -F workspaceId="string"
{  "success": true,  "data": {    "document": {      "id": "doc_abc123",      "knowledgeBaseId": "kb_abc123",      "filename": "Getting Started.pdf",      "fileSize": 204800,      "mimeType": "application/pdf",      "processingStatus": "pending",      "chunkCount": 0,      "tokenCount": 0,      "enabled": true,      "createdAt": "2026-01-15T10:30:00Z"    },    "message": "Document uploaded successfully. Processing will begin shortly."  }}