---
title: "POST /api/export/ipynb"
method: POST
path: "/api/export/ipynb"
---

# POST /api/export/ipynb

`POST /api/export/ipynb`

## Headers

- `Marimo-Session-Id` string, required

## Request body

- ExportAsIPYNBRequest
  - `download` boolean, required
  - `includeOutputs` boolean
  - `sortMode` 'top-down' | 'topological'

## Response `200`

Export the notebook as IPYNB

## Other responses

- `400` — File must be saved before downloading

---

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