---
title: "Persist a snapshot of a note's collaborative document"
method: PUT
path: "/projects/{project_id}/notes/{note_id}/doc"
tags: ["project-notes"]
---

# Persist a snapshot of a note's collaborative document

`PUT /projects/{project_id}/notes/{note_id}/doc`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/projects/{project_id}/notes/{note_id}/doc`
- Auth: HTTP bearer

## Path parameters

- `project_id` string, uuid, required
- `note_id` string, uuid, required

## Request body

- SaveNoteDocDto
  - `yjs_state` string, base64, required
  - `content` object

## Response `200`

- NoteDocResponseDto
  - `yjs_state` string, nullable, required: Base64-encoded Y.Doc, or null if the note has no CRDT state yet.
  - `content` object, nullable, required: Rendered ProseMirror JSON snapshot, used to seed a fresh Y.Doc.
  - `updated_at` string: When the document was last persisted.

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
