---
title: "Save Or Export Notebook Route"
method: POST
path: "/notebook/save"
tags: ["runtime_mutations", "notebook"]
---

# Save Or Export Notebook Route

`POST /notebook/save`

Save handler for notebooks and text files.

For notebooks, this now saves to the session draft store first, then
promotes to canonical with CAS conflict detection.

## Request body

- FileSaveRequest
  - `cells` Cell[]
    - `type` 'code' | 'markdown' | 'raw'
    - `content` string
    - `outputs` SerializedOutput[]
      - `type` string, required
      - `content` unknown, required
      - `execution_time_ms` integer, nullable
    - `cellId` string
    - `executionCount` integer, nullable
    - `executionTimeMs` integer, nullable
    - `executedAtMs` integer, nullable
    - `metadata` object
  - `metadata` object
  - `path` string, required
  - `content` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-18** `abf76937a751` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/quadrillion/apis/quadrillion-cloud-api/changes/notebook/save/post.md)

---

[API](https://skmtc.dev/quadrillion/apis/quadrillion-cloud-api.md) · [All operations](https://skmtc.dev/quadrillion/apis/quadrillion-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quadrillion/apis/quadrillion-cloud-api/revisions/d7f2f3b8e82d?raw)
