---
title: "Create or replace a memory document"
method: PUT
path: "/memory"
tags: ["Memory"]
---

# Create or replace a memory document

`PUT /memory`

Create or replace a curated project memory document. Embeds on success.

## Request body

- object
  - `projectId` string, uuid — Project that owns the document. Auto-filled from CLI and SDK context when omitted.
  - `path` string, required — Relative path for the curated document.
  - `body` string, required — Document body stored in project memory.
  - `kind` 'note' | 'runbook' — Curated document kind. Only note and runbook may be written through the API.
  - `title` string — Optional display title. Defaults to the path basename.

## Response `200`

OK

- object
  - `document` object, required
    - `id` string, uuid, required
    - `projectId` string, uuid, required
    - `kind` 'note' | 'runbook' | 'change', required
    - `managed` boolean, required
    - `path` string, nullable, required
    - `title` string, nullable, required
    - `contentHash` string, required
    - `attrs` object, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `body` string, required — Document body stored in project memory.

---

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