---
title: "Read Notebook"
method: POST
path: "/notebook"
tags: ["runtime_mutations", "notebook"]
---

# Read Notebook

`POST /notebook`

Load a file by path, checking for a session draft first.

If a session draft exists for this notebook:
- Returns the draft state instead of the canonical file.
- If the draft's canonical base revision has drifted, includes a
  ``draft_conflict`` field so the frontend can prompt the user.

Non-notebook files bypass draft logic entirely.

Returns:
- .ipynb  -> JSON: { path, cells, metadata, draft_revision?, draft_conflict? }
- text    -> raw UTF-8 text (text/plain or application/json)
- binary  -> raw bytes (image/*, application/pdf, etc.)

## Request body

- NotebookReadRequest
  - `path` string, required

## 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/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)
