---
title: "Upload Workspace Knowledge Base Document"
method: POST
path: "/api/workspaces/{workspace_id}/knowledge-base/documents"
---

# Upload Workspace Knowledge Base Document

`POST /api/workspaces/{workspace_id}/knowledge-base/documents`

## Request

- Base URL: `https://api.outcallerai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outcallerai.com/api/workspaces/{workspace_id}/knowledge-base/documents`
- Auth: none declared

## Path parameters

- `workspace_id` string, required

## Request body `multipart/form-data`

- BodyUploadWorkspaceKnowledgeBaseDocumentApiWorkspacesWorkspaceIdKnowledgeBaseDocumentsPost
  - `file` string, binary, required
  - `mime_type` string, required
  - `knowledgeBaseId` string, nullable
  - `label` string, nullable

## Response `201`

Successful Response

- KnowledgeBaseDocumentUploadResponse
  - `success` boolean
  - `id` string, required
  - `url` string, nullable
  - `name` string, required
  - `size` integer, nullable
  - `uploadedAt` string, date-time, required
  - `operation` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/outcallerai/apis/outcallerai-api.md) - [All operations](https://skmtc.dev/outcallerai/apis/outcallerai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outcallerai/apis/outcallerai-api/revisions/40736cf433b4?raw)
