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

# POST /api/export/markdown

`POST /api/export/markdown`

## Headers

- `Marimo-Session-Id` string, required

## Request body

- ExportAsMarkdownRequest
  - `download` boolean, required
  - `flavor` 'mdx' | 'mystmd' | 'pymdown' | 'qmd', nullable

## Response `200`

Export the notebook as a markdown

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