---
title: "Ingest content"
method: POST
path: "/context/ingest"
tags: ["context"]
---

# Ingest content

`POST /context/ingest`

Ingest knowledge documents or memories for a tenant.

## Response `202`

Accepted

- HandlerEnvelopeIngestionV2SourceUploadResponse
  - `data` IngestionV2SourceUploadResponse
    - `failed_count` integer — Number of uploaded files that failed to queue.
    - `message` string — Human-readable result message.
    - `results` IngestionV2SourceUploadResultItem[] — Per-item results.
      - `error` string — Error message for this file, empty string on success.
      - `error_code` string — Machine-readable error classification code.
      - `filename` string — Original filename as submitted.
      - `id` string — Unique identifier for this resource.
      - `relations_created` integer — Number of graph relations extracted from this file.
      - `relations_error` string — Error message from relation extraction, if any.
      - `status` 'queued' | 'processing' | 'completed' | 'failed'
    - `success` boolean — Whether the request succeeded.
    - `success_count` integer — Number of files successfully queued for processing.
  - `error` HandlerApiError
    - `code` string — Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).
    - `message` string — Human-readable description of the error.
  - `meta` HandlerResponseMeta
    - `api_version` string — APIVersion echoes the version of the API that served the request (PRO-1209), sourced from reqmeta.APIVersion — the same value carried by OpenAPI info.version and /health — so a client always knows which API version produced a response. Always present (no omitempty).
    - `collection` string — Collection scope. Defaults to the default collection when omitted. Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still accepted (deprecated).
    - `database` string — Owning database. Formerly `tenant_id`; the `tenant_id` alias is still accepted (deprecated).
    - `deprecation` HandlerDeprecationNotice[] — Deprecation lists any migration nudges that apply to this request — the caller used a legacy /tenants route, a legacy tenant_id/sub_tenant_id field, or the deprecated sub_tenant_ids selector. It is a non-breaking signal (the status code is unchanged); omitempty keeps it absent for fully-migrated requests. A list so independent deprecations coexist without clobbering.
      - `deprecated` boolean — Whether this response concerns a deprecated field or route.
      - `deprecated_field` string — The deprecated field name.
      - `deprecated_since` string — API version when the field was deprecated.
      - `message` string — Migration guidance message.
      - `preferred_field` string — The canonical replacement for the deprecated field.
    - `latency_ms` number — Server-side processing time in milliseconds.
    - `request_id` string — Unique identifier for this request, useful for support and tracing.
    - `source_type` string — Type of the parent source (e.g. `file`, `slack`, `notion`).
    - `sub_tenant_id` string
    - `tenant_id` string
  - `success` boolean — Whether the request succeeded.

## Other responses

- `400` — Bad Request
- `413` — Request Entity Too Large
- `415` — Body is not multipart/form-data (e.g. a JSON body)
- `422` — Unprocessable Entity

---

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