---
title: "Ingest raw text or Markdown"
method: POST
path: "/v1/tables/{table_name}/ingest/text"
tags: ["ingestion"]
---

# Ingest raw text or Markdown

`POST /v1/tables/{table_name}/ingest/text`

Enqueue plain text or Markdown content for background ingestion. The content will be chunked, organized into a tree structure, and optionally summarized by the LLM.

Returns a `job_id`. Poll `GET /v1/jobs/{job_id}` for status and the resulting document ID.

## Path parameters

- `table_name` string, required

## Request body

- IngestTextBody
  - `title` string, required — Document title
  - `content` string, required — Document content (plain text or Markdown)
  - `generate_summaries` boolean — Whether to generate LLM summaries (default: true)
  - `tags` string[] — Document tags for filtering
  - `metadata` object — Custom metadata (author, contract_type, etc.)

## Response `202`

Ingestion job queued

- JobStatusResponse
  - `job_id` string — Unique job ID
  - `status` 'queued' | 'processing' | 'completed' | 'failed' — Current job status
  - `progress` string — Progress message (only present when status is 'processing')
  - `result` IngestResponse
    - `document_id` string — Unique document ID
    - `title` string — Document title
    - `total_nodes` integer — Total number of nodes in the tree
    - `max_depth` integer — Maximum depth of the tree
    - `stats` IngestStats
      - `chars_extracted` integer — Characters extracted from source
      - `chunks_created` integer — Text chunks created
      - `nodes_created` integer — Tree nodes created
      - `summaries_generated` integer — Summaries generated by LLM
      - `total_time_ms` integer — Total processing time in milliseconds
  - `error` string — Error message (only present when status is 'failed')
  - `created_at` string, date-time — Job creation timestamp
  - `updated_at` string, date-time — Last status update timestamp

## Other responses

- `404` — Table not found
- `422` — Validation failed

---

[API](https://skmtc.net/brainfish-ai/apis/reasondb-api.md) · [All operations](https://skmtc.net/brainfish-ai/apis/reasondb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brainfish-ai/reasondb-api/versions/f8665c1a5239/schema)
