---
title: "Upload Document Endpoint"
method: POST
path: "/projects/{project_id}/documents/upload"
---

# Upload Document Endpoint

`POST /projects/{project_id}/documents/upload`

## Request

- Base URL: `https://usemeridian.us` (the document declares no server; this is the origin it was published from)
- URL: `https://usemeridian.us/projects/{project_id}/documents/upload`
- Auth: none declared

f1c7e7d1 — tunnel-free document upload (plain .txt/.md only, v1).

The dashboard Documents panel reads a picked file's text client-side and
POSTs ``{filename, content}`` here. We validate the extension is .txt/.md
and the text is a sane size, then reuse the existing
``db.ingest_document`` **content** path (no server-side file access / tunnel
needed): it stores a queryable ``kind='document'`` note, applies the body
cap, and appears in the Documents list. Returns the ingested note.

Rejections are 400 with a clear message: a non-.txt/.md extension (e.g.
.pdf/.docx/.exe), an empty/oversize body, or a missing filename.

## Path parameters

- `project_id` string, required

## Request body

- object

## Response `201`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/usemeridian/apis/meridian.md) · [All operations](https://skmtc.dev/usemeridian/apis/meridian/llms.txt) · [OpenAPI document](https://skmtc.dev/usemeridian/apis/meridian/revisions/f37a894bd374?raw)
