---
title: "Reorder the reading queue"
method: POST
path: "/api/books/{book_id}/queue-position"
tags: ["books"]
---

# Reorder the reading queue

`POST /api/books/{book_id}/queue-position`

## Request

- Base URL: `https://leafle.org` (the document declares no server; this is the origin it was published from)
- URL: `https://leafle.org/api/books/{book_id}/queue-position`
- Auth: HTTP bearer

**Access: write token.**

Move a queued book to a 1-based position, clamped to the queue length. Returns 404 if the book is not queued for this reader.

## Path parameters

- `book_id` integer, required

## Request body

- QueuePositionIn
  - `position` integer, required
  - `reader_id` integer, nullable

## Response `200`

Successful Response

- QueueChanged: POST /api/books/to-read and /api/books/{id}/queue-position: where the book now sits in the to-read queue.
  - `ok` boolean, required
  - `id` integer, required
  - `position` integer, required

## Other responses

- `401`: Missing or unusable credential.
- `403`: Insufficient token scope or the reader is outside your account.
- `404`: No such resource for this reader, or the requested daily find is unavailable.
- `422`: Validation Error

---

[API](https://skmtc.dev/leafle/apis/leafle-api.md) · [All operations](https://skmtc.dev/leafle/apis/leafle-api/llms.txt) · [OpenAPI document](https://skmtc.dev/leafle/apis/leafle-api/revisions/f2e56cb74495?raw)
