---
title: "Bulk Ingest"
method: POST
path: "/v1/scopes/{scope_name}/ingest/batch"
tags: ["memory"]
---

# Bulk Ingest

`POST /v1/scopes/{scope_name}/ingest/batch`

## Request

- Base URL: `https://api.tmcra.com`
- URL: `https://api.tmcra.com/v1/scopes/{scope_name}/ingest/batch`
- Auth: HTTP bearer

## Path parameters

- `scope_name` string, required

## Headers

- `X-TMCRA-On-Behalf-Of-Subject` string, nullable: Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.

## Request body

- BulkIngestRequest
  - `items` BulkIngestItem[], required
    - `consistency` 'eventual' | 'read_your_writes'
    - `idempotency_key` string, required
    - `messages` MemoryMessage[], required
      - `content` string, required
      - `message_id` string, required
      - `metadata` object
      - `role` 'user' | 'assistant' | 'system' | 'tool', required
      - `timestamp` string, date-time, required
    - `metadata` object
    - `session_id` string, required
    - `slow_policy` 'auto' | 'deferred' | 'force'

## Response `202`

Successful Response

- BulkIngestResponse
  - `jobs` JobView[], required
    - `attempts` integer, required
    - `consistency_contract` ConsistencyContract
      - `mode` 'eventual' | 'read_your_writes', required
      - `recall_wait_for_job_id` string, nullable
      - `visible_after_job_id` string, required
    - `created_at` number, required
    - `error` object, nullable
    - `finished_at` number, nullable
    - `heartbeat_at` number, nullable
    - `idempotent_replay` boolean, nullable
    - `idempotent_retry` boolean, nullable
    - `job_id` string, required
    - `job_type` string, required
    - `lease_expires_at` number, nullable
    - `result` object, nullable
    - `resume_mode` string, nullable
    - `scope_name` string, required
    - `started_at` number, nullable
    - `status` string, required
    - `status_url` string, required
    - `tenant_id` string, required
    - `updated_at` number, required
  - `scope_name` string, required

## Other responses

- `422`: Validation Error
- `429`: Too Many Requests
- `503`: Service Unavailable

---

[API](https://skmtc.dev/tmcra/apis/tmcra-memory-api.md) · [All operations](https://skmtc.dev/tmcra/apis/tmcra-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tmcra/apis/tmcra-memory-api/revisions/597be9dc7a3d?raw)
