---
title: "Upload a document to the knowledge base and extract memories from it. If a document with the same ID already exists, it will be overwritten and the memories previously extracted will be updated. Note: a document can contain multiple files."
method: POST
path: "/upload"
tags: ["Microsoft.KernelMemory.ServiceAssembly"]
---

# Upload a document to the knowledge base and extract memories from it. If a document with the same ID already exists, it will be overwritten and the memories previously extracted will be updated. Note: a document can contain multiple files.

`POST /upload`

Upload a new document to the knowledge base and extract memories from it.

## Response `202`

Accepted

- UploadAccepted
  - `index` string, nullable
  - `documentId` string, nullable
  - `message` string, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `503` — Service Unavailable

## Changes

- **2024-12-17** `f1234181a074` — 1 info
  - api operation id `UploadDocument` was added
- **2024-10-19** `10e0db8acfa5` — 2 breaking, 1 info
  - removed the request body
  - removed the success response with the status `200`
  - api operation id `UploadDocument` removed and replaced with ``

[Change history](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly/changes/upload/post.md)

---

[API](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly.md) · [All operations](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/microsoft-kernelmemory-serviceassembly/revisions/f1234181a074/schema)
