---
title: "CreateBook"
method: POST
path: "/v1/shelves/{shelf}/books"
tags: ["LibraryService"]
---

# CreateBook

`POST /v1/shelves/{shelf}/books`

Creates a book, and returns the new Book.

## Path parameters

- `shelf` string, required

## Request body

- Book — A single book in the library.
  - `name` string, required — The resource name of the book. Book names have the form `shelves/{shelf_id}/books/{book_id}`. The name is ignored when creating a book.
  - `author` string — The name of the book author.
  - `title` string — The title of the book.
  - `read` boolean — Value indicating whether the book has been read.
  - `borrow_time` string, date-time — The previous borrowing timestamp.
  - `created_at` string, date-time — The creation date and time.
  - `updated_at` string, date-time — The last update date and time.

## Response `200`

OK

- Book — A single book in the library.
  - `name` string, required — The resource name of the book. Book names have the form `shelves/{shelf_id}/books/{book_id}`. The name is ignored when creating a book.
  - `author` string — The name of the book author.
  - `title` string — The title of the book.
  - `read` boolean — Value indicating whether the book has been read.
  - `borrow_time` string, date-time — The previous borrowing timestamp.
  - `created_at` string, date-time — The creation date and time.
  - `updated_at` string, date-time — The last update date and time.

## Other responses

- `default` — Default error response

---

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