---
title: "Upload a document"
method: POST
path: "/documents"
tags: ["Documents"]
---

# Upload a document

`POST /documents`

## Request

- Base URL: `https://app.jitprompt.com`
- URL: `https://app.jitprompt.com/documents`
- Auth: HTTP bearer

Upload a Markdown, text, PDF or Word file as multipart form data
(`file`, and optionally `title`). Ingestion starts at once; poll the
document until its `status` is `ready` or `failed`. Identical content to a
document already in the namespace returns that document with
`deduped: true` and uses no ingestion. Counts against the plan's documents
per namespace, ingestions per day and document size (402/413).

## Response `200`

Successful Response

- Uploaded
  - `document_id` string, uuid, required
  - `status` 'pending' | 'parsing' | 'structuring' | 'embedding' | 'ready' | 'failed', required
  - `deduped` boolean, required

## Other responses

- `422`: Validation Error

---

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