> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesolab.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Document ingestion

> Store, extract and index a teacher's uploaded document.

Uploads a document into the teacher's library. The endpoint does three things in
sequence: stores the file, extracts its text, and indexes that text for
retrieval.

```bash cURL theme={null}
curl -X POST "$BASE_URL/ingest-teacher-document" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F "file=@scheme-of-work.pdf"
```

## Retrieval

Indexed documents are searchable by **full-text** search.

> [!WARNING]
>
> There is no `pgvector` extension in this database. Document retrieval is
> full-text, not vector similarity. Do not write integrations that assume an
> embedding-based search path over teacher documents — the outcome recommenders
> use embeddings, teacher document retrieval does not.

> [!NOTE]
>
> Uploads are real: the file is persisted and its text extracted. An earlier
> revision of this table discarded the file on upload — any integration written
> against that behaviour should be revisited.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.