{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/xmemory/main/json-schema/xmemory-post-instances-instanceid-write-request-schema.json",
  "title": "PostInstancesInstanceidWriteRequest",
  "x-generated": "2026-10-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/xmemory-openapi-generated.yml#/components/schemas/PostInstancesInstanceidWriteRequest",
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "Free-form text to extract from. Exactly one of text / structured_mutations must be provided."
    },
    "structured_mutations": {
      "type": "array",
      "description": "Ordered list of deterministic, LLM‑free object create/update/delete and relation create/delete mutations — see Structured writes."
    },
    "extraction_logic": {
      "type": "string",
      "description": "\"fast\" (default) or \"deep\". Text writes only."
    },
    "trace_id": {
      "type": "string",
      "description": "Caller‑supplied ID echoed back on the response for log correlation."
    },
    "session_id": {
      "type": "string",
      "description": "Session ID for grouping related calls in tracing."
    },
    "use_diff_engine": {
      "type": "boolean",
      "description": "Override the instance's diff‑engine setting for this write. Text writes only."
    },
    "scope": {
      "type": "object",
      "description": "Anchor a text write to specific existing records."
    }
  }
}