Files
bookhoard/docs/developer/api/libraries/add_library_folder.md
T
John O'Keefe b77eab7ffd docs(libraries): Beam WO5 batch 5 — 11 endpoints backfilled + pilot recovery
Beam backfilled 11 library docs (CRUD, folders, visibility, browse, stats,
media-items) and re-attached frontmatter to create_collection.md — which had
silently lost its pilot version in cc893f75: the negative-test
'git checkout --' restored the OLD file because the pilot was never staged,
and a frontmatter-less doc is invisible to the gate. Claude restored the full
corrected pilot content (priority higher-wins, time.String() note, 409).

Claude registry: 11 entries + one inverted catch — DELETE /:id/folders DOES
bind {folder_path} (handler reuses AddLibraryFolderRequest); registry first
draft said bodyless. GET /:id/visibility returns joined
GetUserVisibleLibrariesRow (type_name etc.), not bare Libraries.

Gate-driven merges fixed create/get library response shapes (sqlc row keys:
created_by_admin_id, library_type_id, updated_at; dropped invented type/
folders/is_visible). Fixed invented request fields (user_id in
set-visibility; library_type_id in update). make test 9/9.
2026-10-24 16:18:48 -04:00

1.2 KiB

method, path, auth, area
method path auth area
POST /api/libraries/:id/folders jwt+admin libraries

Add Library Folder

Add a folder to an existing library (Admin only).

Endpoint: POST /api/libraries/{library_id}/folders Auth: Required (Admin only) Content-Type: application/json

Path Parameters

Parameter Type Required Description
library_id string Yes Library UUID

Request Body

Field Type Required Description
folder_path string Yes Absolute path to folder

Example Request

{
  "folder_path": "/path/to/comics"
}

Response (201 Created)

{
  "id": "uuid",
  "library_id": "uuid",
  "folder_path": "/path/to/comics",
  "created_at": "2026-01-31T10:00:00Z"
}

Error Responses

Code Description
400 Invalid folder path
401 Invalid or expired token
403 User is not an admin
404 Library not found