---
title: "Apply AI-suggested depth changes to the book layout"
method: POST
path: "/api/notebooks/{notebook}/book/reorganize-layout/apply"
tags: ["notebook-books-controller"]
---

# Apply AI-suggested depth changes to the book layout

`POST /api/notebooks/{notebook}/book/reorganize-layout/apply`

## Request

- Base URL: `` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/notebooks/{notebook}/book/reorganize-layout/apply`
- Auth: none declared

## Path parameters

- `notebook` integer, required

## Request body

- BookLayoutReorganizationSuggestionFull
  - `blocks` BlockDepthSuggestionFull[], required
    - `id` integer, required
    - `depth` integer, required

## Response `200`

OK

- BookMutationResponseFull
  - `id` integer, required
  - `bookName` string, required
  - `format` string, required
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `blocks` BookBlockMutationResponseFull[], required: Book blocks in depth-first preorder (parent before descendants, then siblings). Order matches ascending book layout sequence in persistence.
    - `id` integer, required
    - `depth` integer, required: Nesting depth in the book layout; root-level blocks are 0.
    - `title` string, required
    - `contentLocators` union[]: Locators for this block; present only when geometry changed (e.g. cancel merge).
      - union
        - EpubLocatorFull
          - `type` string, required
          - `href` string, required
          - `fragment` string
          - `cfi` string
        - PdfLocatorFull
          - `type` string, required
          - `pageIndex` integer, required
          - `bbox` number[], required
          - `contentBlockId` integer
          - `derivedTitle` string
  - `notebookId` string, required

## Changes

- **2026-09-29** `feba4ecd7257`: 1 info
  - added the optional property `blocks/items/contentLocators/items/oneOf[#/components/schemas/EpubLocator_Full]/allOf[subschema #2]/cfi` to the response with the `200` status

[Operation history](https://skmtc.dev/nerds-odd-e/apis/odd-e-open-api/changes/api/notebooks/:notebook/book/reorganize-layout/apply/post.md)

---

[API](https://skmtc.dev/nerds-odd-e/apis/odd-e-open-api.md) - [All operations](https://skmtc.dev/nerds-odd-e/apis/odd-e-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nerds-odd-e/apis/odd-e-open-api/revisions/193c5e89085a?raw)
