---
title: "Persist a user-edited document (non-AI autosave)."
method: POST
path: "/v1/sessions/{session_id}/documents/{document_id}/save"
tags: ["v1", "sessions"]
---

# Persist a user-edited document (non-AI autosave).

`POST /v1/sessions/{session_id}/documents/{document_id}/save`

## Request

- Base URL: `https://api.superdocs.app`
- URL: `https://api.superdocs.app/v1/sessions/{session_id}/documents/{document_id}/save`
- Auth: HTTP bearer

Persist a HUMAN-edited document — the editor's debounced autosave + save-on-blur — WITHOUT
an AI turn. Re-indexes the html into the target document (preserving its durable identity so it
UPDATES the same Files entry), then saves it so pure typing is preserved AND other sessions with
the same document open stay in sync. The AI-edit flow is unaffected (autosave saves first; a
later AI result is merged with your saved edits). Non-billable, REST-only (a UI affordance, not an MCP tool).

## Path parameters

- `session_id` string, required
- `document_id` string, required

## Headers

- `authorization` string, nullable

## Request body

- SaveDocumentRequest: Body for the human-edit autosave.
  - `html` string, required
  - `page_setup` object, nullable
  - `window_id` string, nullable
  - `base_html` string, nullable
  - `base_digest` string, nullable
  - `touched_chunk_ids` string[], nullable
  - `deleted_part_chunk_ids` string[], nullable
  - `accept_rebased_committed` boolean, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/superdocs/apis/universal-document-ai-api.md) · [All operations](https://skmtc.dev/superdocs/apis/universal-document-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/superdocs/apis/universal-document-ai-api/revisions/37d03122940b?raw)
