---
title: "Ingest Text"
method: POST
path: "/ingest/text"
tags: ["Ingestion"]
---

# Ingest Text

`POST /ingest/text`

Ingest a **text** document.

Args:
    request: IngestTextRequest payload containing:
        • content – raw text to ingest.
        • filename – optional filename to help detect MIME-type.
        • metadata – optional JSON metadata dict.
        • folder_name – optional folder scope.
        • end_user_id – optional end-user scope.
    auth: Decoded JWT context (injected).

Returns:
    Document metadata row representing the newly-ingested text.

## Headers

- `authorization` string

## Request body

- IngestTextRequest — Request model for ingesting text content
  - `content` string, required
  - `filename` string, nullable
  - `metadata` object
  - `use_colpali` boolean, nullable
  - `folder_name` string, nullable — Optional folder scope for the operation
  - `end_user_id` string, nullable — Optional end-user scope for the operation

## Response `200`

Successful Response

- Document — Represents a document stored in the database documents collection
  - `external_id` string
  - `content_type` string, required
  - `filename` string, nullable
  - `metadata` object
  - `storage_info` object
  - `storage_files` StorageFileInfo[]
    - `bucket` string, required
    - `key` string, required
    - `version` integer
    - `filename` string, nullable
    - `content_type` string, nullable
    - `timestamp` string, date-time
  - `system_metadata` object
  - `additional_metadata` object
  - `chunk_ids` string[]
  - `folder_name` string, nullable
  - `end_user_id` string, nullable
  - `app_id` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2025-11-05** `9ade02dd7b1d` — 1 warning
  - removed the request property `rules`

[Change history](https://skmtc.dev/morphik-org/apis/fastapi/changes/ingest/text/post.md)

---

[API](https://skmtc.dev/morphik-org/apis/fastapi.md) · [All operations](https://skmtc.dev/morphik-org/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/morphik-org/fastapi/revisions/9ade02dd7b1d/schema)
