---
title: "Ingest inline text into a POT"
method: POST
path: "/pots/{pot_id}/ingest"
tags: ["ingestion"]
---

# Ingest inline text into a POT

`POST /pots/{pot_id}/ingest`

Submit raw text content for ingestion into a POT. The request returns immediately with a `job_id` (HTTP 202); the actual work — chunking, fact extraction, scoring, edge detection vs. the Constitution, score propagation — happens asynchronously.

**Poll** `GET /jobs/{job_id}` for progress and the final result. Typical small documents (< 5 KB) complete in 5–15 seconds; larger ones scale with chunk count.

**Use this endpoint for:** programmatic ingestion of text already in memory — snippets, structured exports, conversation summaries, ADR bodies, etc.

**This endpoint's text limit is 100 KB (102,400 chars).** It's enforced at the request schema level: an oversize `content` field returns `422` with a Pydantic validation error. The 100 KB ceiling is specific to this inline-text route — it is NOT a per-document limit on SciPot as a whole.

**For documents larger than 100 KB**, or for file formats SciPot needs to convert (PDF, DOCX, PPTX, XLSX, HTML), use the upload pipeline instead:
1. `POST /documents/upload` (multipart/form-data, default 50 MB cap, auto-conversion via MarkItDown).
2. `POST /pots/{pot_id}/extract-from-document` to extract facts from the stored document into one or more POTs.

**Provenance:** every fact extracted will carry the `source` block you provide here. Be specific (`path`, `author`, `tags`) — provenance is the audit trail your agents will rely on later.

## Path parameters

- `pot_id` string, uuid, required

## Request body

- IngestionRequest — Request to ingest a document into a POT. The ``/pots/{pot_id}/ingest`` path takes inline content and creates the Document on the fly — it does NOT accept ``context_attachment_ids`` (that requires an existing document_id; use ``POST /pots/{pot_id}/extract-from-document`` after a separate document create + attachment create). ``extra='forbid'`` rejects any such field at the API boundary with a 422 so integrators get a clear error instead of having the field silently ignored. Matches M21 D-C from /plan-eng-review.
  - `content` string, required — Document content (max 100KB)
  - `source` SourceMetadata, required — Metadata about a document source.
    - `path` string, required — Path or URL of the source document
    - `type` 'markdown' | 'text' | 'pdf' | 'html' | 'docx' | 'pptx' | 'xlsx' | 'image' — Document type
    - `author` string, nullable — Document author or creator
    - `created_at` string, date-time, nullable — When the document was created
    - `tags` string[] — Tags associated with this source (max 20)
    - `authoritative` boolean — Whether this is an authoritative source (affects POT Index boost)
  - `language` string, nullable — ISO 639-1 override for extraction language. When provided, skips auto-detection and forces facts + edge rationales into this language. Falls back to POT default and then auto-detect when omitted.

## Response `202`

Document ingestion queued; poll /jobs/{job_id} for progress

- IngestionAccepted — Response for POST /ingest (202 Accepted).
  - `job_id` string, uuid, required — Unique identifier for this ingestion job
  - `pot_id` string, uuid, required — Target POT ID
  - `status` 'pending' — Job status (always 'pending' for initial response)
  - `message` string — Human-readable status message

## Other responses

- `404` — POT not found in this workspace
- `409` — Document with same content hash already ingested
- `422` — Validation error — including `content` exceeding the 100 KB inline-text limit (use /documents/upload for larger inputs).
- `429` — Workspace quota exceeded (storage, documents-per-POT, or tokens)
- `503` — Job queue unavailable

---

[API](https://skmtc.dev/scipot/apis/scipot-core-api.md) · [All operations](https://skmtc.dev/scipot/apis/scipot-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scipot/scipot-core-api/revisions/e8712e9ffeae/schema)
