---
title: "Reorder blocks in a notebook"
method: POST
path: "/notebooks/{notebookId}/reorder-blocks"
tags: ["Notebooks"]
---

# Reorder blocks in a notebook

`POST /notebooks/{notebookId}/reorder-blocks`

Moves one or more active blocks as a group. Blocks omitted from `blockIds` keep their relative order.

## Path parameters

- `notebookId` string, required — Opaque notebook identifier.

## Request body

- ReorderNotebookBlocksBody
  - `blockIds` string[], required — Non-empty list of unique block IDs to move, in the desired moved-block order.
  - `placement` union, required
    - object
      - `type` 'start', required
    - object
      - `type` 'end', required
    - object
      - `type` 'after', required
      - `blockId` string, required — Active block after which the moved blocks are inserted.

## Response `200`

Blocks reordered

- ReorderNotebookBlocksResponse
  - `blockIds` string[], required — Final active block order for the notebook.

## Other responses

- `400` — Validation error, e.g. unknown blockId or invalid placement
- `401` — Unauthorized
- `403` — Insufficient permissions
- `404` — Notebook not found
- `409` — Project is suspended
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/deepnote/apis/deepnote-public-api.md) · [All operations](https://skmtc.net/deepnote/apis/deepnote-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepnote/deepnote-public-api/revisions/726970fd2992/schema)
