---
title: "Upload a file to a knowledge folder"
method: POST
path: "/knowledge/{folderId}"
---

# Upload a file to a knowledge folder

`POST /knowledge/{folderId}`

## Request

- Base URL: `https://api.langdock.com`
- URL: `https://api.langdock.com/knowledge/{folderId}`
- Auth: HTTP bearer

## Path parameters

- `folderId` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary: The file to upload
  - `url` string: The associated URL

## Response `200`

File uploaded successfully

## Other responses

- `400`: Invalid request or file validation failed
- `401`: Invalid or missing API key
- `403`: API key does not have access to the knowledge folder
- `404`: Knowledge folder not found
- `408`: Upload timed out
- `413`: File exceeds the size limit
- `429`: Rate limit exceeded
- `500`: Unexpected server error
- `503`: Storage capacity exceeded

## Changes

- **2026-11-03** `c62bf90b4013`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langdock/apis/langdock-api/changes/knowledge/:folderId/post.md)

---

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