{"openapi":"3.1.0","info":{"title":"1BZ Reading Platform API","version":"0.1.0"},"paths":{"/api/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_api_v1_auth_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]},"patch":{"tags":["auth"],"summary":"Update Me","description":"Change the account's display name (My Account page, /account).\n\nThe display name is what a first filing copies into the Author row and the\nnotice's claimant, so it has to be right *before* the first work is filed.\nIt is deliberately NOT propagated afterwards: an existing Author name and\nthe claimant on a published CopyGuard notice are records, and rewriting\nthem silently would make the register disagree with what was published.\nThe response still carries `author_name` so the page can say so.","operationId":"update_me_api_v1_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/auth/upgrade-role":{"post":{"tags":["auth"],"summary":"Upgrade Role","description":"Reader -> author -> publisher, self-service (My Account page, /account).\n\nFiling a work (/copyguard/submit) needs author, publisher or admin, so an\naccount registered as a reader hit \"You do not have permission\" with no way\nforward. Same whitelist as registration: anyone could already register as\nan author, so this grants nothing new; it only stops the choice being\npermanent. Never downgrades, never touches admin.","operationId":"upgrade_role_api_v1_auth_upgrade_role_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleUpgrade"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","description":"Needs the current password: a stolen session token alone must not be\nenough to lock the owner out of their own account.","operationId":"change_password_api_v1_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/auth/password-reset/request":{"post":{"tags":["auth"],"summary":"Request Password Reset","description":"Always 202, whether or not the address exists.\n\nAnswering \"no such user\" here would turn this endpoint into a free account\nenumerator for anyone who wants to know which addresses are registered.","operationId":"request_password_reset_api_v1_auth_password_reset_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Request Password Reset Api V1 Auth Password Reset Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password-reset/confirm":{"post":{"tags":["auth"],"summary":"Confirm Password Reset","description":"Consumes the code and signs the user straight in -- being bounced back to\na login form immediately after proving control of the mailbox is friction\nwith no security value.","operationId":"confirm_password_reset_api_v1_auth_password_reset_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authors/me/tiers":{"get":{"tags":["authors"],"summary":"List Tiers","description":"The commercial terms, straight from app/core/pricing.py so no page can\never show a price that disagrees with what is charged. Public -- the price\nlist is the sign-up page.","operationId":"list_tiers_api_v1_authors_me_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Tiers Api V1 Authors Me Tiers Get"}}}}}}},"/api/v1/authors/me/dashboard":{"get":{"tags":["authors"],"summary":"My Dashboard","operationId":"my_dashboard_api_v1_authors_me_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response My Dashboard Api V1 Authors Me Dashboard Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/authors/me/books":{"get":{"tags":["authors"],"summary":"My Books","description":"Every book this account may manage, for the author and publisher pages.\n\nDeliberately NOT scoped through `_my_author`: the 1BZ accounts are split --\nthe author account (the byline) and the publisher account (1BZ Publishing,\nthe publisher of record external channels require) are different users. A\npublisher has no Author row at all, so `_my_author` 404s for them, which is\nwhy the dashboard looks broken from that account.\n\nThis returns the union that `can_manage_book` (app/api/deps.py) already\nauthorizes: books where I am the author, plus books where I am the\npublisher. Each row says which, because the two carry different rights and\nthe pages show different things.","operationId":"my_books_api_v1_authors_me_books_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response My Books Api V1 Authors Me Books Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/authors/me/payout-wallet":{"put":{"tags":["authors"],"summary":"Set Payout Wallet","description":"The wallet payouts are sent to. Collected from the author -- never\ninferred from a transaction they once made, which would be a guess about\nwhere someone's money should go.","operationId":"set_payout_wallet_api_v1_authors_me_payout_wallet_put","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Payout Wallet Api V1 Authors Me Payout Wallet Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/authors/me/reader-insights":{"get":{"tags":["authors"],"summary":"Reader Insights","description":"Reader questions and knowledge level, aggregated across this author's\nbooks. Deliberately anonymous: counts and averages, never \"reader X got\nquestion Y wrong\".","operationId":"reader_insights_api_v1_authors_me_reader_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Reader Insights Api V1 Authors Me Reader Insights Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/authors/admin/overview":{"get":{"tags":["authors"],"summary":"Admin Overview","description":"Platform-wide counts for the admin panel (owner spec 2026-08-22:\nregistrations, interactivity, author and publication registrations, and\nwhat authors are owed).","operationId":"admin_overview_api_v1_authors_admin_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Admin Overview Api V1 Authors Admin Overview Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/books/{book_id}/links":{"put":{"tags":["books"],"summary":"Update Book Links","description":"Author-editable community links (owner 2026-08-24): a readers' group\n(WhatsApp preferred), Telegram, the book/author website, and a YouTube\nchannel (owner 2026-09-19). Full replace:\nNone clears a link. http(s)-only guards against javascript: URIs -- these\nrender as public <a href> on the book page.","operationId":"update_book_links_api_v1_books__book_id__links_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookLinksIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/supersedes/{placeholder_id}":{"post":{"tags":["books"],"summary":"Link Placeholder","description":"Tell a pre-order placeholder which real book replaces it.\n\nseed_preorders.py lists an announced title before the manuscript exists, so\nreaders can pre-order. The real work is filed later through CopyGuard and\nbecomes a different Book row. This links the two; when the real book\npublishes, publishing_pipeline moves the pre-orders across and deletes the\nplaceholder in the same transaction.\n\nAdmin only, and deliberately so: it decides where somebody's paid pre-order\nends up. Refused unless the placeholder really is one -- no manuscript and\nnot published -- so this can never be pointed at a live book.","operationId":"link_placeholder_api_v1_books__book_id__supersedes__placeholder_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"placeholder_id","in":"path","required":true,"schema":{"type":"integer","title":"Placeholder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Link Placeholder Api V1 Books  Book Id  Supersedes  Placeholder Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/by-isbn/{isbn}":{"get":{"tags":["books"],"summary":"Get Book By Isbn","description":"Public, unauthenticated lookup -- AIBIZ's purchase-success resolver\ncalls this server-to-server to build the ebook.1bz.biz redirect. Exact\npath/shape agreed in q1.md #3 (E:\\legion\\books\\q1.md).","operationId":"get_book_by_isbn_api_v1_books_by_isbn__isbn__get","parameters":[{"name":"isbn","in":"path","required":true,"schema":{"type":"string","title":"Isbn"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookIdOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books":{"get":{"tags":["books"],"summary":"List Books","operationId":"list_books_api_v1_books_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BookOut"},"title":"Response List Books Api V1 Books Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["books"],"summary":"Create Book","description":"`author_id` is a money field, not a label: payouts.record_sale() credits\nAuthorEarning to whoever books.author_id points at, and /books/{id}/links\nplus the whole author-questions surface authorize off it too. Until\n2026-08-29 it was taken from the request body unchecked, so any account with\nthe author role could publish under another author's identity and, on a paid\ntitle, into their earnings ledger.\n\nWho may attribute what, mirroring _is_books_author and the Author model's\nown note that a publisher may publish \"on their behalf\":\n  admin     -- any author, any publisher.\n  author    -- only an Author row that is their own (Author.user_id).\n  publisher -- any author, but only under their own Publisher row, which\n               they must name; that is what makes the attribution traceable.","operationId":"create_book_api_v1_books_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}":{"get":{"tags":["books"],"summary":"Get Book","operationId":"get_book_api_v1_books__book_id__get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/buy/quote":{"get":{"tags":["books"],"summary":"Buy Quote","description":"What to pay to buy this book in BZeUSD on ebook.1bz.biz: the treasury to send to,\nthe token, the amount, and the message the paying wallet must sign. Public -- it\nreveals nothing secret, and the price is already on the book.","operationId":"buy_quote_api_v1_books__book_id__buy_quote_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Buy Quote Api V1 Books  Book Id  Buy Quote Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/buy":{"post":{"tags":["books"],"summary":"Buy Book","description":"Grant access after a verified native BZeUSD payment (owner 2026-09-04). The\non-chain check + signature binding live in book_sale.verify_payment; this route owns\nidempotency and one-tx-one-grant anti-replay, mirroring redeem_aibiz_purchase.","operationId":"buy_book_api_v1_books__book_id__buy_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/preorders/titles":{"get":{"tags":["books"],"summary":"Preorder Titles","description":"The announcement page's catalogue: every title on pre-order, with its cover, its price\nand whether it has published yet. Public -- it is an advertisement.","operationId":"preorder_titles_api_v1_books_preorders_titles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Preorder Titles Api V1 Books Preorders Titles Get"}}}}}}},"/api/v1/books/preorders/buyers":{"get":{"tags":["books"],"summary":"Preorder Buyers","description":"The pre-order mailing list, kept apart from the membership (owner request 2026-09-12).\n\nA pre-order is an ordinary Purchase row with ``source=\"preorder\"`` -- that is what makes the\nbuyer's shelf open by itself on publication day, and it is also the only thing that marks the\nbuyer as a pre-order buyer. So the list is a query, not a second table: nothing to keep in\nstep, and an address can never appear here without a paid order behind it.\n\nAdmin only. It is a list of customers' email addresses.","operationId":"preorder_buyers_api_v1_books_preorders_buyers_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Preorder Buyers Api V1 Books Preorders Buyers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/preorder":{"post":{"tags":["books"],"summary":"Preorder Book","description":"Pre-order a forthcoming title with BZeUSD and an email address.\n\nDeliberately NOT behind get_current_user: the point of a pre-order is to sell to somebody who\nis not a member yet. Everything else is the signed-in buy route's logic unchanged -- the same\non-chain verification, the same one-tx-one-grant rule -- and the account is only created\nAFTER the payment verifies, so a failed or replayed payment leaves nothing behind.","operationId":"preorder_book_api_v1_books__book_id__preorder_post","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreorderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreorderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/purchase":{"post":{"tags":["books"],"summary":"Purchase Book","operationId":"purchase_book_api_v1_books__book_id__purchase_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/redeem-aibiz":{"post":{"tags":["books"],"summary":"Redeem Aibiz Purchase","description":"Grants access after a book bought via AIBIZ's BZeUSD rail on\nubc.1bz.biz -- see ebook-aibiz-contract.md §6. Redeems the download\ntoken once, server-side, as proof of purchase; idempotent, matching\npurchase_book's own pattern.","operationId":"redeem_aibiz_purchase_api_v1_books__book_id__redeem_aibiz_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AibizRedeemRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/me/bookshelf":{"get":{"tags":["books"],"summary":"My Bookshelf","operationId":"my_bookshelf_api_v1_books_me_bookshelf_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookOut"},"type":"array","title":"Response My Bookshelf Api V1 Books Me Bookshelf Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/books/{book_id}/access":{"get":{"tags":["books"],"summary":"Get Access","description":"Lets the frontend show 'Read now' vs. a buy link without fetching the\n(possibly large) book file just to check ownership.","operationId":"get_access_api_v1_books__book_id__access_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/cover":{"get":{"tags":["books"],"summary":"Get Book Cover","description":"Deliberately public and unauthenticated, unlike /content. A cover is\nthe shop window -- it has to render on the library grid for signed-out\nvisitors, and it is marketing art, not the book. Same BOOKS_DIR\ncontainment check as /content so a crafted cover_url can't escape the\ndirectory.","operationId":"get_book_cover_api_v1_books__book_id__cover_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["books"],"summary":"Upload Book Cover","description":"Set or replace a book's cover.\n\nAuthorized with `can_manage_book` -- the book's author, its publisher, or\nan admin. The publisher is included on purpose: the 1BZ accounts are split\n(author = the byline, publisher = the imprint of record) and the imprint\nsupplies jackets for the titles it carries.\n\nReplacing is allowed and overwrites in place, because a cover is artwork an\nauthor revises, not a record of anything. The key is derived from the book\nid, so a replacement cannot orphan the old object or collide with another\nbook's.","operationId":"upload_book_cover_api_v1_books__book_id__cover_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_book_cover_api_v1_books__book_id__cover_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Upload Book Cover Api V1 Books  Book Id  Cover Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/content":{"get":{"tags":["books"],"summary":"Get Book Content","operationId":"get_book_content_api_v1_books__book_id__content_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/progress":{"get":{"tags":["books"],"summary":"Get Progress","operationId":"get_progress_api_v1_books__book_id__progress_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["books"],"summary":"Update Progress","operationId":"update_progress_api_v1_books__book_id__progress_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/index-withdraw":{"post":{"tags":["books"],"summary":"Withdraw Book Index","description":"Withdraw a book from Ask the Book (W1). Retrieval stops in this request;\nthe purge of its index runs in the worker and is reported by `completed_at`\non the retrieval state. Admin only: this is an owner action, not a reader one.","operationId":"withdraw_book_index_api_v1_books__book_id__index_withdraw_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/bookmarks":{"get":{"tags":["annotations"],"summary":"List Bookmarks","operationId":"list_bookmarks_api_v1_books__book_id__bookmarks_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BookmarkOut"},"title":"Response List Bookmarks Api V1 Books  Book Id  Bookmarks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["annotations"],"summary":"Create Bookmark","operationId":"create_bookmark_api_v1_books__book_id__bookmarks_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/bookmarks/{bookmark_id}":{"delete":{"tags":["annotations"],"summary":"Delete Bookmark","operationId":"delete_bookmark_api_v1_books__book_id__bookmarks__bookmark_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"integer","title":"Bookmark Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/highlights":{"get":{"tags":["annotations"],"summary":"List Highlights","operationId":"list_highlights_api_v1_books__book_id__highlights_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HighlightOut"},"title":"Response List Highlights Api V1 Books  Book Id  Highlights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["annotations"],"summary":"Create Highlight","operationId":"create_highlight_api_v1_books__book_id__highlights_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HighlightCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HighlightOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/highlights/{highlight_id}":{"patch":{"tags":["annotations"],"summary":"Update Highlight","operationId":"update_highlight_api_v1_books__book_id__highlights__highlight_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"highlight_id","in":"path","required":true,"schema":{"type":"integer","title":"Highlight Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HighlightUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HighlightOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["annotations"],"summary":"Delete Highlight","operationId":"delete_highlight_api_v1_books__book_id__highlights__highlight_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"highlight_id","in":"path","required":true,"schema":{"type":"integer","title":"Highlight Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/commentary":{"get":{"tags":["commentary"],"summary":"List Commentary","operationId":"list_commentary_api_v1_books__book_id__commentary_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommentaryOut"},"title":"Response List Commentary Api V1 Books  Book Id  Commentary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["commentary"],"summary":"Create Commentary","operationId":"create_commentary_api_v1_books__book_id__commentary_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentaryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/commentary/can-manage":{"get":{"tags":["commentary"],"summary":"Can Manage","operationId":"can_manage_api_v1_books__book_id__commentary_can_manage_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanManageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/commentary/{commentary_id}":{"patch":{"tags":["commentary"],"summary":"Update Commentary","operationId":"update_commentary_api_v1_books__book_id__commentary__commentary_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"commentary_id","in":"path","required":true,"schema":{"type":"integer","title":"Commentary Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentaryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["commentary"],"summary":"Delete Commentary","operationId":"delete_commentary_api_v1_books__book_id__commentary__commentary_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"commentary_id","in":"path","required":true,"schema":{"type":"integer","title":"Commentary Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/chat":{"get":{"tags":["chat"],"summary":"List Chat Messages","operationId":"list_chat_messages_api_v1_books__book_id__chat_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageOut"},"title":"Response List Chat Messages Api V1 Books  Book Id  Chat Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["chat"],"summary":"Ask","operationId":"ask_api_v1_books__book_id__chat_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAsk"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/questionnaires":{"get":{"tags":["questionnaires"],"summary":"List Questionnaires","operationId":"list_questionnaires_api_v1_books__book_id__questionnaires_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireOut"},"title":"Response List Questionnaires Api V1 Books  Book Id  Questionnaires Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["questionnaires"],"summary":"Create Questionnaire","operationId":"create_questionnaire_api_v1_books__book_id__questionnaires_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/questionnaires/{questionnaire_id}":{"patch":{"tags":["questionnaires"],"summary":"Update Questionnaire","operationId":"update_questionnaire_api_v1_books__book_id__questionnaires__questionnaire_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"questionnaire_id","in":"path","required":true,"schema":{"type":"integer","title":"Questionnaire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["questionnaires"],"summary":"Delete Questionnaire","operationId":"delete_questionnaire_api_v1_books__book_id__questionnaires__questionnaire_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"questionnaire_id","in":"path","required":true,"schema":{"type":"integer","title":"Questionnaire Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/questionnaires/{questionnaire_id}/responses":{"post":{"tags":["questionnaires"],"summary":"Submit Response","operationId":"submit_response_api_v1_books__book_id__questionnaires__questionnaire_id__responses_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"questionnaire_id","in":"path","required":true,"schema":{"type":"integer","title":"Questionnaire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerSubmit"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireResponseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["questionnaires"],"summary":"List Responses","operationId":"list_responses_api_v1_books__book_id__questionnaires__questionnaire_id__responses_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"questionnaire_id","in":"path","required":true,"schema":{"type":"integer","title":"Questionnaire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireResponseOut"},"title":"Response List Responses Api V1 Books  Book Id  Questionnaires  Questionnaire Id  Responses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/questionnaires/{questionnaire_id}/responses/me":{"get":{"tags":["questionnaires"],"summary":"Get My Response","operationId":"get_my_response_api_v1_books__book_id__questionnaires__questionnaire_id__responses_me_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"questionnaire_id","in":"path","required":true,"schema":{"type":"integer","title":"Questionnaire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireResponseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices":{"get":{"tags":["copyguard"],"summary":"List Public Notices","description":"The public announcement section (owner, 2026-08-20) -- every notice\nthat's actually been published, newest first. Deliberately excludes\n'submitted'/'paid' (not yet publicly announced) and 'rejected'.","operationId":"list_public_notices_api_v1_copyguard_notices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CopyGuardNoticeOut"},"type":"array","title":"Response List Public Notices Api V1 Copyguard Notices Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]},{}]},"post":{"tags":["copyguard"],"summary":"Submit Notice","description":"ebookprocess.md Steps 1+3, combined -- the real public intake as of\n2026-08-20 (replaces the Telegram bot, and the earlier book_id-required\nscaffold). Auto-provisions an Author for the submitting user and creates\nthe Book row in the same call -- no separate 'create your book first'\nstep, matching what the bot used to do in one conversation.","operationId":"submit_notice_api_v1_copyguard_notices_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_notice_api_v1_copyguard_notices_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyGuardNoticeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/copyguard/notices/{notice_id}":{"get":{"tags":["copyguard"],"summary":"Get Notice","description":"A notice is public once announced -- but a public *notice* is not the\nsame thing as public *claimant contact details*.\n\nUntil 2026-08-29 this route had no authentication and no publication gate,\nso walking sequential ids returned `claimant_email` and `claimant_wallet`\nfor every notice, including `submitted`/`paid` ones that\n`list_public_notices()` deliberately withholds. Both gates already existed\nthree functions below in `get_document`; this route simply never got them.\n\nThe intent is stated in app/api/v1/verify.py:81 (\"name only; never the\nemail\") and :59 (\"a lookup must not leak the existence of a pending\nclaim\"), and no frontend page renders the email -- so this was an\noversight, not a design choice.","operationId":"get_notice_api_v1_copyguard_notices__notice_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]},{}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyGuardNoticeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/documents/{kind}":{"get":{"tags":["copyguard"],"summary":"Get Document","description":"Serve one of the rendered PDFs.\n\n**The Notice is public** and must stay that way -- a notice nobody can read\nis not notice; the whole point is that a claim is publicly announced for\nthirty days so anyone can contest it.\n\n**The Declaration and the Certificate are the author's own** (owner\ninstruction 2026-08-22: \"make certificate available to authors only\"). The\nDeclaration is a signed personal statement; the Certificate is the author's\nproperty record, theirs to show to whomever they choose rather than\nsomething the platform hands to any passer-by. Admins can reach both, since\nthey issue certificates and adjudicate counter-claims.","operationId":"get_document_api_v1_copyguard_notices__notice_id__documents__kind__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]},{}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/documents/declaration/signed":{"post":{"tags":["copyguard"],"summary":"Upload Signed Declaration","description":"Accept the author's countersigned Declaration. Optional by design --\nthe Declaration itself says signing is recommended, not required, and\nnothing downstream gates on it, so this never blocks payment or the\nnotice. Re-uploading replaces the previous copy.","operationId":"upload_signed_declaration_api_v1_copyguard_notices__notice_id__documents_declaration_signed_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_signed_declaration_api_v1_copyguard_notices__notice_id__documents_declaration_signed_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyGuardNoticeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/payment-info":{"get":{"tags":["copyguard"],"summary":"Get Payment Info","description":"Server-to-server passthrough to AIBIZ's quote endpoint (q4.md #1) --\navoids the frontend needing CORS against ubc.1bz.biz directly. Returns\nthe treasury/bzeusd addresses to pay so the browser can show a\ncopy-this-address step, no wallet-signing JS required.\n\nClaimant or admin only. It was unauthenticated until 2026-08-29, which\nmade it (a) a fee oracle for notices the {id} route correctly 403s, and\n(b) an outbound call to AIBIZ that anyone could trigger with any id.","operationId":"get_payment_info_api_v1_copyguard_notices__notice_id__payment_info_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Payment Info Api V1 Copyguard Notices  Notice Id  Payment Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/pay":{"post":{"tags":["copyguard"],"summary":"Pay Notice","description":"Verifies payment against AIBIZ's /api/copyguard/pay (q4.md #1) -- bzeusd\nis the only accepted rail, and verification is unconditional -- records the\nDZIT proof-of-service (best-effort -- see dzit_client.py), and opens the\nnotice period. copyguard.md §3/§4.","operationId":"pay_notice_api_v1_copyguard_notices__notice_id__pay_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyGuardPayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyGuardNoticeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/publication-status":{"get":{"tags":["copyguard"],"summary":"Publication Status","description":"Why this notice's book is or is not on the shelf, and the one next step.\nRead-only; claimant or admin.","operationId":"publication_status_api_v1_copyguard_notices__notice_id__publication_status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/publication-check":{"post":{"tags":["copyguard"],"summary":"Publication Check","description":"Re-run the publication gate for this notice's book. Safe to repeat: it\npays nothing, mints nothing, and publishes at most once.","operationId":"publication_check_api_v1_copyguard_notices__notice_id__publication_check_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/publication/report":{"get":{"tags":["copyguard"],"summary":"Publication Report","description":"Report-only reconciliation: which unpublished books are stuck and why.\nIssues SELECTs only -- no writes, no payment, no mint, no outbound call.","operationId":"publication_report_api_v1_copyguard_publication_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Publication Report Api V1 Copyguard Publication Report Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/copyguard/publication/recover":{"post":{"tags":["copyguard"],"summary":"Publication Recover","description":"Controlled recovery of named books after the report has been reviewed.\nDisabled unless PUBLICATION_RECOVERY_ENABLED is set; never bulk, never\nmints or pays; each book's gate is re-checked immediately before acting.","operationId":"publication_recover_api_v1_copyguard_publication_recover_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationRecoverRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Publication Recover Api V1 Copyguard Publication Recover Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/copyguard/notices/{notice_id}/issue-certificate":{"post":{"tags":["copyguard"],"summary":"Issue Certificate","description":"Withheld until the notice period actually closes -- a deliberate\nbehavior change from CopyGuard's current live flow, which issues the\ncertificate immediately (ebookprocess.md Step 6). Admin-only for now:\nthe counter-claim adjudication process isn't defined yet (copyguard.md\n§5's open item), so this is a manual gate, not an automatic cron job,\nuntil that's decided.","operationId":"issue_certificate_api_v1_copyguard_notices__notice_id__issue_certificate_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyGuardNoticeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/counter-claims":{"post":{"tags":["copyguard"],"summary":"Submit Counter Claim","description":"Public, no auth -- matches CopyGuard's original design (any viewer can\nraise a query during the notice window). Owner decision 2026-08-19:\n'log it, proceed anyway' -- this is a record for the dispute to be\nresolved outside this pipeline, never a block on issue_certificate.","operationId":"submit_counter_claim_api_v1_copyguard_notices__notice_id__counter_claims_post","parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterClaimRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterClaimOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["copyguard"],"summary":"List Counter Claims","operationId":"list_counter_claims_api_v1_copyguard_notices__notice_id__counter_claims_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CounterClaimOut"},"title":"Response List Counter Claims Api V1 Copyguard Notices  Notice Id  Counter Claims Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/wallet/request":{"post":{"tags":["copyguard"],"summary":"Request Wallet Otp","description":"Step 9 (start): claimant asks to point the escrowed NFT at a new\nwallet. Sends a 6-digit code to the account email (owner decision\n2026-08-19) -- verify_wallet_otp actually applies it.","operationId":"request_wallet_otp_api_v1_copyguard_notices__notice_id__wallet_request_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOtpRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Request Wallet Otp Api V1 Copyguard Notices  Notice Id  Wallet Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/notices/{notice_id}/wallet/verify":{"post":{"tags":["copyguard"],"summary":"Verify Wallet Otp","operationId":"verify_wallet_otp_api_v1_copyguard_notices__notice_id__wallet_verify_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","title":"Notice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOtpVerify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyGuardNoticeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/copyguard/auto-issue":{"get":{"tags":["copyguard"],"summary":"Get Auto Issue","description":"Whether certificates issue automatically once a notice period closes.","operationId":"get_auto_issue_api_v1_copyguard_auto_issue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Auto Issue Api V1 Copyguard Auto Issue Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]},"put":{"tags":["copyguard"],"summary":"Set Auto Issue","description":"The stop, and the restart. Owner 2026-09-22: automatic until an admin\nstops it -- so the stop is a runtime switch, not a redeploy.","operationId":"set_auto_issue_api_v1_copyguard_auto_issue_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoIssueState"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Auto Issue Api V1 Copyguard Auto Issue Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/copyguard/auto-issue/run":{"post":{"tags":["copyguard"],"summary":"Run Auto Issue","description":"Run the sweep now instead of waiting for the next tick. Obeys the same\nswitch -- a disabled job stays disabled.","operationId":"run_auto_issue_api_v1_copyguard_auto_issue_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Run Auto Issue Api V1 Copyguard Auto Issue Run Post"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/ipvault/notice-candidates":{"get":{"tags":["ipvault"],"summary":"Notice Candidates","operationId":"notice_candidates_api_v1_ipvault_notice_candidates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response Notice Candidates Api V1 Ipvault Notice Candidates Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/ipvault/records":{"post":{"tags":["ipvault"],"summary":"Request Transfer","description":"ipvault.md §2 -- move IP rights into IPVault.\n\nA record for a BOOK names its CopyGuard notice (`copyguard_notice_id`); the\npublication gate finds the minted NFT only through that tie. The server\ndoes not guess it: with no notice named and unattached notices on file the\nanswer is 409 -- name one, or say `standalone` for a work that is not one\nof those books. Naming a notice that already has a record returns that\nrecord, so a double-click cannot make a second NFT.\n\nFee (owner decision D-3): a notice-linked record is INCLUDED -- inside the\nmember's quota the whole title is free, outside it the title fee already\ncharged with the notice covers it -- so `fee_paid` is 0 and nothing more is\nasked. A standalone record is the flat 10 BZeUSD.","operationId":"request_transfer_api_v1_ipvault_records_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPVaultTransferRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPVaultRecordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/ipvault/records/smart-pdf":{"post":{"tags":["ipvault"],"summary":"Request Smart Pdf Vault","description":"Mint a Smart PDF's NFT into IPVault, with NO CopyGuard notice (0063).\n\nOwner 2026-09-28: *\"you have to create another script for hosting without\ninvolving [the notice] but you can mint nft and park it in ipvault.\"*\n\nWhy the split is the right one, and not a shortcut: a **notice** is a\npublic instrument -- a dated claim served on the world with a\ncounter-claim window -- and a Smart PDF is never published, so there is\nnothing to serve it about. An **NFT** needs no publicity to mean\nsomething: it records that this wallet held this work at this time, and\nanyone shown it can verify that independently.\n\nThis route only REQUESTS the record. Payment and minting then go through\nthe existing `/records/{id}/pay` and `/records/{id}/mint` untouched --\nthere is deliberately no second mint pipeline, because two of them would\ndrift and only one of them would be the audited one.\n\nThe document must already carry a file: an NFT over an empty shell would\nattest to nothing, and its sha256 is what makes the record mean anything.","operationId":"request_smart_pdf_vault_api_v1_ipvault_records_smart_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartPdfVaultRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPVaultRecordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/ipvault/records/{record_id}":{"get":{"tags":["ipvault"],"summary":"Get Record","description":"The record's existence, title and NFT identity are public -- an NFT name\nis on-chain anyway. The claimant's WALLET is not.\n\nUntil 2026-08-29 this route had no authentication at all, so walking\nsequential ids returned `claimant_wallet` for every record. Same shape as\nthe CopyGuard notice leak fixed above. The wallet is now withheld from\nanyone who is not the claimant or an admin; nothing else changes, so the\npublic NFT/status lookup this route exists for still works unauthenticated.","operationId":"get_record_api_v1_ipvault_records__record_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]},{}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPVaultRecordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ipvault/records/{record_id}/payment-info":{"get":{"tags":["ipvault"],"summary":"Get Payment Info","description":"Same server-to-server passthrough as CopyGuard's -- avoids frontend\nCORS against ubc.1bz.biz. Claimant or admin only (was unauthenticated\nuntil 2026-08-29 -- an anyone-can-trigger outbound call to AIBIZ).\n\nA notice-linked record is included in the title fee (D-3): the amount\nshown is the amount charged, which is nothing, so no quote is fetched.","operationId":"get_payment_info_api_v1_ipvault_records__record_id__payment_info_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Payment Info Api V1 Ipvault Records  Record Id  Payment Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ipvault/records/{record_id}/pay":{"post":{"tags":["ipvault"],"summary":"Pay Record","operationId":"pay_record_api_v1_ipvault_records__record_id__pay_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPVaultPayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPVaultRecordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ipvault/records/{record_id}/mint":{"post":{"tags":["ipvault"],"summary":"Mint Record","description":"Mint the record's NFT -- or adopt the one a lost reply already made.\n\nOutcomes, each distinct: minted/adopted (200, with the publication status\n-- a blocked book is NOT an error here); identity unverified (409);\noutcome uncertain (504 -- the record stays `paid`, and a retry looks in\ncustody before it ever asks for a second mint); vault not configured (503).","operationId":"mint_record_api_v1_ipvault_records__record_id__mint_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPVaultRecordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payouts/me":{"get":{"tags":["payouts"],"summary":"My Payouts","description":"What this caller is owed. Both halves are reported when they hold both\nroles: a writer whose titles are carried by their own publisher is paid on\nthe publisher ladder, and seeing only the author line would look like the\nmoney vanished.","operationId":"my_payouts_api_v1_payouts_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response My Payouts Api V1 Payouts Me Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/payouts/admin/owed":{"get":{"tags":["payouts"],"summary":"Admin Owed","description":"Every party with a non-zero balance -- the admin's payout worklist.","operationId":"admin_owed_api_v1_payouts_admin_owed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Admin Owed Api V1 Payouts Admin Owed Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/payouts/admin/pay":{"post":{"tags":["payouts"],"summary":"Admin Pay","operationId":"admin_pay_api_v1_payouts_admin_pay_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Admin Pay Api V1 Payouts Admin Pay Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/subscriptions/ladders":{"get":{"tags":["subscriptions"],"summary":"Ladders","description":"Both ladders, complete, for the public comparison chart.\n\nPublic and unauthenticated: someone deciding whether to register as an\nauthor or a publisher has no account yet. Everything is read straight from\n`pricing`, so the chart on the site cannot disagree with what is charged --\nwhich is the whole reason this returns data instead of the page hard-coding\na table.","operationId":"ladders_api_v1_subscriptions_ladders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Ladders Api V1 Subscriptions Ladders Get"}}}}}}},"/api/v1/subscriptions/quote":{"get":{"tags":["subscriptions"],"summary":"Quote","description":"What this tier costs and where to send it. Public -- the price list is\nnot a secret, and the page that shows it is the sign-up page.\n\nServer-to-server passthrough for the treasury/token addresses, same as\nCopyGuard's `payment-info`, so the browser needs no CORS against AIBIZ.","operationId":"quote_api_v1_subscriptions_quote_get","parameters":[{"name":"party","in":"query","required":true,"schema":{"type":"string","title":"Party"}},{"name":"tier","in":"query","required":false,"schema":{"type":"string","default":"basic","title":"Tier"}},{"name":"plan","in":"query","required":false,"schema":{"type":"string","default":"yearly","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Quote Api V1 Subscriptions Quote Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/activate":{"post":{"tags":["subscriptions"],"summary":"Activate","description":"Verify the transfer, then grant the tier. Never the other way round.","operationId":"activate_api_v1_subscriptions_activate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Activate Api V1 Subscriptions Activate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/subscriptions/me":{"get":{"tags":["subscriptions"],"summary":"My Subscriptions","description":"Both halves when the caller holds both profiles -- a writer who also runs\nan imprint is on two separate ladders (pricing.py: \"do not mix authors and\npublishers pricing\") and needs to see both.","operationId":"my_subscriptions_api_v1_subscriptions_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response My Subscriptions Api V1 Subscriptions Me Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/verify/{cnn}":{"get":{"tags":["verify"],"summary":"Verify","operationId":"verify_api_v1_verify__cnn__get","parameters":[{"name":"cnn","in":"path","required":true,"schema":{"type":"string","title":"Cnn"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Verify Api V1 Verify  Cnn  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/sections":{"get":{"tags":["sample"],"summary":"List Sections","operationId":"list_sections_api_v1_books__book_id__sections_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Sections Api V1 Books  Book Id  Sections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/sample":{"put":{"tags":["sample"],"summary":"Set Sample","operationId":"set_sample_api_v1_books__book_id__sample_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamplePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Sample Api V1 Books  Book Id  Sample Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sample"],"summary":"Get Sample","description":"Public. Serves only what the author opened -- never the file.","operationId":"get_sample_api_v1_books__book_id__sample_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Sample Api V1 Books  Book Id  Sample Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authors/me/api-keys":{"get":{"tags":["api-keys"],"summary":"List Keys","operationId":"list_keys_api_v1_authors_me_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response List Keys Api V1 Authors Me Api Keys Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]},"post":{"tags":["api-keys"],"summary":"Create Key","operationId":"create_key_api_v1_authors_me_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKey"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Key Api V1 Authors Me Api Keys Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/authors/me/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Key","operationId":"revoke_key_api_v1_authors_me_api_keys__key_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Revoke Key Api V1 Authors Me Api Keys  Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/distribution":{"get":{"tags":["distribution"],"summary":"Public Distribution","description":"Public: where the book can be found. Impossible/not_available rows are\nincluded on purpose -- 'not on Kindle: KDP does not accept Kannada' is\nhonest information a buyer and the author both deserve to see.","operationId":"public_distribution_api_v1_books__book_id__distribution_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Public Distribution Api V1 Books  Book Id  Distribution Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["distribution"],"summary":"Record Distribution","operationId":"record_distribution_api_v1_books__book_id__distribution_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Record Distribution Api V1 Books  Book Id  Distribution Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/distribution/full":{"get":{"tags":["distribution"],"summary":"Full Distribution","operationId":"full_distribution_api_v1_books__book_id__distribution_full_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Full Distribution Api V1 Books  Book Id  Distribution Full Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/author-questions":{"post":{"tags":["author-questions"],"summary":"Ask Author","operationId":"ask_author_api_v1_books__book_id__author_questions_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Ask Author Api V1 Books  Book Id  Author Questions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["author-questions"],"summary":"Questions For Author","operationId":"questions_for_author_api_v1_books__book_id__author_questions_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Questions For Author Api V1 Books  Book Id  Author Questions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/author-questions/mine":{"get":{"tags":["author-questions"],"summary":"My Questions","operationId":"my_questions_api_v1_books__book_id__author_questions_mine_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response My Questions Api V1 Books  Book Id  Author Questions Mine Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/author-questions/{qid}/reply":{"post":{"tags":["author-questions"],"summary":"Reply To Question","operationId":"reply_to_question_api_v1_books__book_id__author_questions__qid__reply_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"qid","in":"path","required":true,"schema":{"type":"integer","title":"Qid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Reply To Question Api V1 Books  Book Id  Author Questions  Qid  Reply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/proposal":{"get":{"tags":["proposals"],"summary":"Get Proposal","description":"The published offer. Public — this is the shop window.","operationId":"get_proposal_api_v1_books__book_id__proposal_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Proposal Api V1 Books  Book Id  Proposal Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["proposals"],"summary":"Put Proposal","description":"Create or replace the book's proposal.\n\nA full replace, like the links endpoint: the options sent are the options\nthat exist afterwards. Editing an offer by patching individual tiers\ninvites a half-updated price list, which is worse than a rewrite.","operationId":"put_proposal_api_v1_books__book_id__proposal_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Put Proposal Api V1 Books  Book Id  Proposal Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["proposals"],"summary":"Withdraw Proposal","description":"Withdraw the offer. Withdrawn, not deleted — readers responded to it,\nand their responses must keep pointing at something.","operationId":"withdraw_proposal_api_v1_books__book_id__proposal_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Withdraw Proposal Api V1 Books  Book Id  Proposal Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/proposal/respond":{"post":{"tags":["proposals"],"summary":"Respond","description":"A reader accepts an option, asks to discuss it, or declines.\n\nSigned in, because a response names a person. Not gated on purchase: an\noffer is the reason someone might buy, so requiring a purchase first\nwould defeat it.","operationId":"respond_api_v1_books__book_id__proposal_respond_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Respond Api V1 Books  Book Id  Proposal Respond Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/proposal/responses":{"get":{"tags":["proposals"],"summary":"List Responses","description":"Who responded, and to which option. Author or publisher only — these\nare named readers who declared a commercial interest.","operationId":"list_responses_api_v1_books__book_id__proposal_responses_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Responses Api V1 Books  Book Id  Proposal Responses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/types":{"get":{"tags":["rights"],"summary":"List Right Types","description":"What can be granted, for a form to populate itself from.","operationId":"list_right_types_api_v1_rights_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Right Types Api V1 Rights Types Get"}}}}}}},"/api/v1/rights/books/{book_id}":{"post":{"tags":["rights"],"summary":"Grant Right","description":"Record a grant. Creates the IPVault record; payment and minting reuse\n/ipvault/records/{id}/pay and /mint -- the same 10 BZeUSD flow as every\nother IPVault mint.","operationId":"grant_right_api_v1_rights_books__book_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RightsGrantIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Grant Right Api V1 Rights Books  Book Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["rights"],"summary":"Rights On Book","description":"PUBLIC. Every right granted in this work, so a prospective licensee can\nsee what is already taken before asking.","operationId":"rights_on_book_api_v1_rights_books__book_id__get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Rights On Book Api V1 Rights Books  Book Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights":{"get":{"tags":["rights"],"summary":"List Rights","description":"PUBLIC register. The point of the whole feature: a grant nobody can\nlook up cannot be relied on by the person who paid for it.","operationId":"list_rights_api_v1_rights_get","parameters":[{"name":"right_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Right Type"}},{"name":"book_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Book Id"}},{"name":"grantee_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grantee Email"}},{"name":"cnn","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Find grants against a certificate number","title":"Cnn"},"description":"Find grants against a certificate number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Rights Api V1 Rights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/{record_id}":{"get":{"tags":["rights"],"summary":"Rights Detail","description":"PUBLIC. One grant, with the deed text to quote.\n\nPublic means public: the licensee's address is withheld (see `_view`), and\nthe deed itself never prints it.","operationId":"rights_detail_api_v1_rights__record_id__get","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Rights Detail Api V1 Rights  Record Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/{record_id}/revoke":{"post":{"tags":["rights"],"summary":"Revoke Right","description":"Record that a grant was withdrawn. Never deletes it: a register that\nforgets a revoked grant is worse than no register, because the licensee's\ncopy of the deed would be the only surviving version.","operationId":"revoke_right_api_v1_rights__record_id__revoke_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Revoke Right Api V1 Rights  Record Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/{record_id}/invite":{"post":{"tags":["rights"],"summary":"Invite Transferee","description":"Email the transferee an invitation to accept. Payment first.\n\nIdempotent by design -- calling it again issues a FRESH token and\ninvalidates the old one, which is what \"resend\" has to mean when the\nfirst email went to a mistyped address.","operationId":"invite_transferee_api_v1_rights__record_id__invite_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Invite Transferee Api V1 Rights  Record Id  Invite Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/accept/{token}":{"get":{"tags":["rights"],"summary":"View Invitation","description":"PUBLIC, no account. What the transferee sees before deciding.\n\nReturns the full deed: nobody should accept a licence they have not been\nshown, and the conditions of use are the part that binds them.","operationId":"view_invitation_api_v1_rights_accept__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response View Invitation Api V1 Rights Accept  Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["rights"],"summary":"Accept Invitation","description":"PUBLIC. The transferee accepts, and the rights NFT mints into escrow.\n\nMinting happens here rather than at payment because this is the moment\nthe grant becomes bilateral. Paying for a grant nobody accepted should\nnot put a token on a chain.","operationId":"accept_invitation_api_v1_rights_accept__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Accept Invitation Api V1 Rights Accept  Token  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/decline/{token}":{"post":{"tags":["rights"],"summary":"Decline Invitation","description":"PUBLIC. Recorded, not deleted -- the grantor is entitled to know.","operationId":"decline_invitation_api_v1_rights_decline__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclineIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decline Invitation Api V1 Rights Decline  Token  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/{record_id}/claim/request":{"post":{"tags":["rights"],"summary":"Request Claim","description":"PUBLIC by email match, because the transferee has no account here.\n\nThe email must match the one the grant names -- knowing a record id is\nnot authorisation. The code then proves control of that mailbox, which is\nthe same standard the certificate withdrawal uses.","operationId":"request_claim_api_v1_rights__record_id__claim_request_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Request Claim Api V1 Rights  Record Id  Claim Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rights/{record_id}/claim/verify":{"post":{"tags":["rights"],"summary":"Verify Claim","description":"PUBLIC by email + code. Releases the rights NFT to the nominated wallet.","operationId":"verify_claim_api_v1_rights__record_id__claim_verify_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimVerifyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Verify Claim Api V1 Rights  Record Id  Claim Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/smart-reader/offer":{"get":{"tags":["smart-reader"],"summary":"Offer","description":"PUBLIC. What the pass is, before anyone signs in.","operationId":"offer_api_v1_smart_reader_offer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Offer Api V1 Smart Reader Offer Get"}}}}}}},"/api/v1/smart-reader/quote":{"get":{"tags":["smart-reader"],"summary":"Quote","description":"What to pay, and the message the paying wallet must sign. Bound to\nthe account, so a signature cannot buy somebody else's pass.","operationId":"quote_api_v1_smart_reader_quote_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Quote Api V1 Smart Reader Quote Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/smart-reader/me":{"get":{"tags":["smart-reader"],"summary":"My Pass","operationId":"my_pass_api_v1_smart_reader_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response My Pass Api V1 Smart Reader Me Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/smart-reader/subscribe":{"post":{"tags":["smart-reader"],"summary":"Subscribe","description":"Buy the pass, or renew it. The same route for both: to the reader it\nis the same act, and renewal only differs in extending a row that\nalready exists.","operationId":"subscribe_api_v1_smart_reader_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Subscribe Api V1 Smart Reader Subscribe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/smart-reader/pick/{book_id}":{"post":{"tags":["smart-reader"],"summary":"Pick Book","description":"Spend one pick on a book. **This cannot be undone.**\n\nEvery refusal below exists to stop a reader burning a permanent pick on\nsomething that gains them nothing -- a free book, a book they already\nown, an Amazon-exclusive title.","operationId":"pick_book_api_v1_smart_reader_pick__book_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Pick Book Api V1 Smart Reader Pick  Book Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/smart-reader/pickable/{book_id}":{"get":{"tags":["smart-reader"],"summary":"Pickable","description":"Can this reader spend a pick on this book, and if not, why?\n\nExists so the book page can say the reason *before* the reader commits\nto something permanent, rather than surfacing it as a failed action.","operationId":"pickable_api_v1_smart_reader_pickable__book_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Pickable Api V1 Smart Reader Pickable  Book Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/methods":{"get":{"tags":["payments"],"summary":"Methods","description":"PUBLIC. What this site can actually take money with today.\n\nThe frontend asks so it can show a card button only when cards work --\noffering a payment method that is not configured is worse than offering\none fewer.","operationId":"methods_api_v1_payments_methods_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Methods Api V1 Payments Methods Get"}}}}}}},"/api/v1/payments/stripe/checkout":{"post":{"tags":["payments"],"summary":"Start Checkout","description":"Start a card payment. Returns the Stripe URL for the browser to follow.\n\nNo card details pass through this platform at any point -- the reader\nenters them on Stripe's own page.","operationId":"start_checkout_api_v1_payments_stripe_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Start Checkout Api V1 Payments Stripe Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/books/{book_id}/access-request":{"post":{"tags":["book-access"],"summary":"Request Access","description":"A reader asks the author to let them in.\n\nIdempotent per address: asking twice updates the message rather than\nfilling the owner's list with the same person. An already-authorised\nrequest is returned unchanged -- never downgraded to `requested`, which\nwould quietly take away access somebody already had.","operationId":"request_access_api_v1_books__book_id__access_request_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/access-grants":{"get":{"tags":["book-access"],"summary":"List Grants","description":"Everyone who has asked or been let in. Owner only.","operationId":"list_grants_api_v1_books__book_id__access_grants_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantOut"},"title":"Response List Grants Api V1 Books  Book Id  Access Grants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["book-access"],"summary":"Authorise Emails","description":"Let named addresses in, whether or not they ever asked.\n\nThis is the same operation as approving a request -- it lands on the\nsame row in the same state -- so the owner naming five colleagues and\nthe owner approving five requests are not two different features.","operationId":"authorise_emails_api_v1_books__book_id__access_grants_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthoriseIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantOut"},"title":"Response Authorise Emails Api V1 Books  Book Id  Access Grants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/access-grants/{grant_id}/revoke":{"post":{"tags":["book-access"],"summary":"Revoke Grant","description":"Take access away again. No email: a reader who loses access to a\nprivate manuscript does not need it announced, and the owner may be\ntidying a list rather than making a statement.","operationId":"revoke_grant_api_v1_books__book_id__access_grants__grant_id__revoke_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audiences":{"get":{"tags":["audiences"],"summary":"List Audiences","description":"All four lists in one call.","operationId":"list_audiences_api_v1_audiences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AudienceOut"},"type":"array","title":"Response List Audiences Api V1 Audiences Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/audiences/{audience}":{"get":{"tags":["audiences"],"summary":"Get Audience","operationId":"get_audience_api_v1_audiences__audience__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"audience","in":"path","required":true,"schema":{"type":"string","title":"Audience"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audiences/{audience}/export":{"get":{"tags":["audiences"],"summary":"Export Audience","description":"The same list as a CSV, because every mailing tool on earth reads one.\n\n`csv.writer` rather than string joining: a display name containing a\ncomma or a quote is ordinary, and hand-rolled CSV corrupts the file on\nthe first one.","operationId":"export_audience_api_v1_audiences__audience__export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"audience","in":"path","required":true,"schema":{"type":"string","title":"Audience"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override the download name","title":"Filename"},"description":"Override the download name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/smart-pdf/showcase":{"get":{"tags":["smart-pdf-showcase"],"summary":"List Showcase","description":"PUBLIC. Smart PDFs whose owners chose to list them.\n\nDeliberately NOT part of `GET /books`: the owner asked for a separate\ncategory, and merging the two would put private documents on the home\nshelf, which is the one thing this must not do.","operationId":"list_showcase_api_v1_smart_pdf_showcase_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShowcaseOut"},"title":"Response List Showcase Api V1 Smart Pdf Showcase Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{}]}},"/api/v1/smart-pdf/{product_id}/showcase":{"patch":{"tags":["smart-pdf-showcase"],"summary":"Set Showcase","description":"Opt a Smart PDF into or out of the showcase, and name it.\n\nOpting out is as available as opting in, and removes the row immediately:\nan owner who changes their mind about listing a document should not have\nto ask anyone.","operationId":"set_showcase_api_v1_smart_pdf__product_id__showcase_patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/smart-pdf/{product_id}/cover":{"put":{"tags":["smart-pdf-showcase"],"summary":"Upload Cover","description":"Set or replace the cover. Optional, and it stays optional.\n\nSame sniffing, decode check and size ceiling as a book cover -- imported\nfrom `book_cover` rather than copied, so a format accepted for one is\naccepted for the other and a fix to either lands on both.\n\nThe key is derived from the product id, so replacing overwrites in place\nand cannot orphan the old object or collide with another product's.","operationId":"upload_cover_api_v1_smart_pdf__product_id__cover_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_cover_api_v1_smart_pdf__product_id__cover_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["smart-pdf-showcase"],"summary":"Remove Cover","description":"Remove the cover. A Smart PDF without one is complete, not broken.","operationId":"remove_cover_api_v1_smart_pdf__product_id__cover_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["smart-pdf-showcase"],"summary":"Get Cover","description":"PUBLIC, like a book cover and for the same reason: it is the shop\nwindow, it has to render for a signed-out visitor, and it is marketing\nart rather than the document.\n\nSame BOOKS_DIR containment check as `/books/{id}/cover` so a crafted key\ncannot walk out of the directory.","operationId":"get_cover_api_v1_smart_pdf__product_id__cover_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{}]}},"/api/v1/books/{book_id}/translation-rights":{"get":{"tags":["translation-rights"],"summary":"List Translation Rights","description":"Public: which languages already have a translation-rights NFT on\nrecord for this book -- requested, paid, or minted. No wallet/PII.","operationId":"list_translation_rights_api_v1_books__book_id__translation_rights_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response List Translation Rights Api V1 Books  Book Id  Translation Rights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["translation-rights"],"summary":"Request Translation Rights","description":"The book's author/publisher (or admin) requests a translation-rights\nNFT for one language. Creates an IPVaultRecord identical in shape to the\nexisting IPVault flow -- pay via POST /ipvault/records/{id}/pay, mint via\nPOST /ipvault/records/{id}/mint, same 10 BZeUSD flat fee, same endpoints.\nThis route only creates the record with the book+language context filled in.","operationId":"request_translation_rights_api_v1_books__book_id__translation_rights_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslationRightsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Request Translation Rights Api V1 Books  Book Id  Translation Rights Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/translation-interest":{"get":{"tags":["translation-rights"],"summary":"Translation Interest Counts","description":"Public: aggregate interest per language only -- counts, never who\n(same design as author-facing reading analytics: populations, not persons).","operationId":"translation_interest_counts_api_v1_books__book_id__translation_interest_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Translation Interest Counts Api V1 Books  Book Id  Translation Interest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["translation-rights"],"summary":"Submit Translation Interest","description":"Public, no login required -- a translator, publisher, or reader\nanywhere may register interest in seeing this book translated into a\nlanguage. Collected as data only; no commitment or payment here.","operationId":"submit_translation_interest_api_v1_books__book_id__translation_interest_post","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslationInterestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Submit Translation Interest Api V1 Books  Book Id  Translation Interest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/books/{book_id}/translation-interest/full":{"get":{"tags":["translation-rights"],"summary":"Translation Interest Full","description":"The book's author/publisher/admin: full detail, to follow up with\ninterested translators and publishers directly.","operationId":"translation_interest_full_api_v1_books__book_id__translation_interest_full_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"integer","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Translation Interest Full Api V1 Books  Book Id  Translation Interest Full Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/design-themes":{"get":{"tags":["design-compile"],"summary":"List Design Themes","description":"Public: the theme catalog itself (name + description), so a client\ndoesn't have to hardcode what /design-themes on the site already shows.","operationId":"list_design_themes_api_v1_design_themes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response List Design Themes Api V1 Design Themes Get"}}}}}}},"/api/v1/design-compile/sample-template":{"get":{"tags":["design-compile"],"summary":"Download Sample Template","description":"Public: the prescribed manuscript format authors upload against.\nOwner 2026-08-26: \"you also give sample format to upload\" -- this is it.","operationId":"download_sample_template_api_v1_design_compile_sample_template_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/design-compile":{"post":{"tags":["design-compile"],"summary":"Request Compile","description":"Owner 2026-08-26: \"no one will do design-compile\" with a manual\nJSON-textarea form -- authors have a finished manuscript file, not typed\ntext. This takes that file directly and quality-controls it against the\nprescribed template (parse_markdown_manuscript) before anything is\ncreated, exactly like the platform already does for a CopyGuard\nsubmission: bad format -> rejected with a reason, not silently accepted.","operationId":"request_compile_api_v1_design_compile_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_request_compile_api_v1_design_compile_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/design-compile/{request_id}/pay":{"post":{"tags":["design-compile"],"summary":"Pay Compile","operationId":"pay_compile_api_v1_design_compile__request_id__pay_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/design-compile/{request_id}/payment-info":{"get":{"tags":["design-compile"],"summary":"Get Payment Info","description":"Same claimant-gated passthrough to AIBIZ's quote as CopyGuard's, for\nthe request's own fee. The page shows the treasury address + amount, the\nauthor pays from their wallet, then confirms with the tx hash.","operationId":"get_payment_info_api_v1_design_compile__request_id__payment_info_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Payment Info Api V1 Design Compile  Request Id  Payment Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/design-compile/{request_id}/compile":{"post":{"tags":["design-compile"],"summary":"Run Compile","description":"Runs the real compiler and stores the output. Any exception is\nrecorded on the request rather than raised opaquely -- the author\nsubmitted real content and deserves a real reason if it failed.","operationId":"run_compile_api_v1_design_compile__request_id__compile_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/design-compile/{request_id}":{"get":{"tags":["design-compile"],"summary":"Get Compile","operationId":"get_compile_api_v1_design_compile__request_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/design-compile/{request_id}/download":{"get":{"tags":["design-compile"],"summary":"Download Compile","operationId":"download_compile_api_v1_design_compile__request_id__download_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consultancy-inquiries":{"get":{"tags":["design-compile"],"summary":"List Consultancy Inquiries","operationId":"list_consultancy_inquiries_api_v1_consultancy_inquiries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response List Consultancy Inquiries Api V1 Consultancy Inquiries Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]},"post":{"tags":["design-compile"],"summary":"Submit Consultancy Inquiry","description":"Public, no login required -- the real fillable form behind the 1BZ\nAdvantages consultancy-rights section.","operationId":"submit_consultancy_inquiry_api_v1_consultancy_inquiries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultancyInquiryIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Submit Consultancy Inquiry Api V1 Consultancy Inquiries Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/capabilities":{"get":{"tags":["capabilities"],"summary":"Get Capabilities","operationId":"get_capabilities_api_v1_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Capabilities Api V1 Capabilities Get"}}}}}}},"/api/v1/business":{"post":{"tags":["business"],"summary":"Create Business","operationId":"create_business_api_v1_business_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Business Api V1 Business Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/business/me":{"get":{"tags":["business"],"summary":"My Businesses","operationId":"my_businesses_api_v1_business_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response My Businesses Api V1 Business Me Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/business/{business_id}":{"get":{"tags":["business"],"summary":"Get Business","operationId":"get_business_api_v1_business__business_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Business Api V1 Business  Business Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["business"],"summary":"Update Business","operationId":"update_business_api_v1_business__business_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Update Business Api V1 Business  Business Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/{business_id}/members":{"get":{"tags":["business"],"summary":"List Members","operationId":"list_members_api_v1_business__business_id__members_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response List Members Api V1 Business  Business Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["business"],"summary":"Add Member","operationId":"add_member_api_v1_business__business_id__members_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Add Member Api V1 Business  Business Id  Members Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/{business_id}/members/{member_user_id}":{"patch":{"tags":["business"],"summary":"Update Member","operationId":"update_member_api_v1_business__business_id__members__member_user_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"integer","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Update Member Api V1 Business  Business Id  Members  Member User Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/{business_id}/agents":{"get":{"tags":["business"],"summary":"List Agents","operationId":"list_agents_api_v1_business__business_id__agents_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response List Agents Api V1 Business  Business Id  Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["business"],"summary":"Create Agent","operationId":"create_agent_api_v1_business__business_id__agents_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Agent Api V1 Business  Business Id  Agents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/{business_id}/agents/{agent_id}/revoke":{"post":{"tags":["business"],"summary":"Revoke Agent","operationId":"revoke_agent_api_v1_business__business_id__agents__agent_id__revoke_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Revoke Agent Api V1 Business  Business Id  Agents  Agent Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/{business_id}/agents/{agent_id}/permissions":{"post":{"tags":["business"],"summary":"Grant Permission","operationId":"grant_permission_api_v1_business__business_id__agents__agent_id__permissions_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGrant"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Grant Permission Api V1 Business  Business Id  Agents  Agent Id  Permissions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/{business_id}/agents/{agent_id}/permissions/{permission_id}":{"delete":{"tags":["business"],"summary":"Revoke Permission","operationId":"revoke_permission_api_v1_business__business_id__agents__agent_id__permissions__permission_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"integer","title":"Business Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"permission_id","in":"path","required":true,"schema":{"type":"integer","title":"Permission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Revoke Permission Api V1 Business  Business Id  Agents  Agent Id  Permissions  Permission Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallets":{"post":{"tags":["wallets"],"summary":"Create Wallet","operationId":"create_wallet_api_v1_wallets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Wallet Api V1 Wallets Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/wallets/me":{"get":{"tags":["wallets"],"summary":"My Wallets","operationId":"my_wallets_api_v1_wallets_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response My Wallets Api V1 Wallets Me Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/sld/namespaces":{"get":{"tags":["sld"],"summary":"List Namespaces","operationId":"list_namespaces_api_v1_sld_namespaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response List Namespaces Api V1 Sld Namespaces Get"}}}}}},"post":{"tags":["sld"],"summary":"Create Namespace","operationId":"create_namespace_api_v1_sld_namespaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespaceCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Namespace Api V1 Sld Namespaces Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/sld":{"post":{"tags":["sld"],"summary":"Reserve Sld","operationId":"reserve_sld_api_v1_sld_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLDCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Reserve Sld Api V1 Sld Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/sld/{sld_id}/activate":{"post":{"tags":["sld"],"summary":"Activate Sld","operationId":"activate_sld_api_v1_sld__sld_id__activate_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"sld_id","in":"path","required":true,"schema":{"type":"integer","title":"Sld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Activate Sld Api V1 Sld  Sld Id  Activate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sld/{sld_id}/retire":{"post":{"tags":["sld"],"summary":"Retire Sld","operationId":"retire_sld_api_v1_sld__sld_id__retire_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"sld_id","in":"path","required":true,"schema":{"type":"integer","title":"Sld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Retire Sld Api V1 Sld  Sld Id  Retire Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sld/resolve/{full_name}":{"get":{"tags":["sld"],"summary":"Resolve Sld","operationId":"resolve_sld_api_v1_sld_resolve__full_name__get","parameters":[{"name":"full_name","in":"path","required":true,"schema":{"type":"string","title":"Full Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Resolve Sld Api V1 Sld Resolve  Full Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sld/{sld_id}":{"get":{"tags":["sld"],"summary":"Get Sld","operationId":"get_sld_api_v1_sld__sld_id__get","parameters":[{"name":"sld_id","in":"path","required":true,"schema":{"type":"integer","title":"Sld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Sld Api V1 Sld  Sld Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sld/{sld_id}/evidence/blockchain":{"post":{"tags":["sld"],"summary":"Attach Sld Blockchain Evidence","operationId":"attach_sld_blockchain_evidence_api_v1_sld__sld_id__evidence_blockchain_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"sld_id","in":"path","required":true,"schema":{"type":"integer","title":"Sld Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLDBlockchainEvidenceAttach"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Attach Sld Blockchain Evidence Api V1 Sld  Sld Id  Evidence Blockchain Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sld/{sld_id}/evidence":{"get":{"tags":["sld"],"summary":"Get Sld Evidence","description":"Public -- mirrors the existing public GET /sld/{id} pattern, which\nalready surfaces has_blockchain_evidence as a boolean. Returns only\nBlockchainEvidence's own fields, never anything from ReceiptEvidence/\nReceipt/Transaction/business/author tables.","operationId":"get_sld_evidence_api_v1_sld__sld_id__evidence_get","parameters":[{"name":"sld_id","in":"path","required":true,"schema":{"type":"integer","title":"Sld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Sld Evidence Api V1 Sld  Sld Id  Evidence Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/products/smart-pdf":{"post":{"tags":["products"],"summary":"Create Smart Pdf","operationId":"create_smart_pdf_api_v1_products_smart_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartPdfCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Smart Pdf Api V1 Products Smart Pdf Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/products/agentic-pdf":{"post":{"tags":["products"],"summary":"Create Agentic Pdf","operationId":"create_agentic_pdf_api_v1_products_agentic_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgenticPdfCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Agentic Pdf Api V1 Products Agentic Pdf Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/products/me":{"get":{"tags":["products"],"summary":"My Products","operationId":"my_products_api_v1_products_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response My Products Api V1 Products Me Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/products/{product_id}":{"get":{"tags":["products"],"summary":"Get Product","operationId":"get_product_api_v1_products__product_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Product Api V1 Products  Product Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/products/{product_id}/link-sld":{"post":{"tags":["products"],"summary":"Link Sld","operationId":"link_sld_api_v1_products__product_id__link_sld_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSld"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Link Sld Api V1 Products  Product Id  Link Sld Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/products/{product_id}/blockchain-receipts":{"post":{"tags":["products"],"summary":"Set Blockchain Receipts","description":"Phase 12 opt-in switch. Seller-side product policy -- same ownership\ncheck as link-sld above, so only the product's own owner may flip it (an\nadmin who does not own it cannot, matching link-sld's existing rule).\n\nTurning it ON affects FUTURE verified sales only; it never retroactively\ncreates evidence for sales that already completed, and turning it OFF\nnever deletes evidence already recorded -- Phase 6's rows are immutable.","operationId":"set_blockchain_receipts_api_v1_products__product_id__blockchain_receipts_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBlockchainReceipts"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Blockchain Receipts Api V1 Products  Product Id  Blockchain Receipts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/editions/{edition_id}/content":{"get":{"tags":["documents"],"summary":"Get Edition Document Content","description":"Download the stored file of a document-backed Edition (Smart/Agentic PDF).\n\nAuthorization first, storage second -- see the module docstring. Status\ncodes: 200 local file / 307 presigned R2 URL; 401 unauthenticated; 403 no\nright to this edition (no active Entitlement, not the owner, not admin);\n404 unknown edition / book-backed edition / no file_key / private or\nmissing object; 409 edition not active (retired); 502 storage unavailable.","operationId":"get_edition_document_content_api_v1_editions__edition_id__content_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"integer","title":"Edition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["documents"],"summary":"Upload Edition Document Content","description":"Attach the PDF file to a document-backed Edition (Smart/Agentic PDF).\n\nAuthorization (admin or product owner, re-checking the rogue-edition guard)\nhappens BEFORE any byte is read or written. The storage key is generated\nserver-side; the client-supplied filename is ignored except as metadata.\nThe Document's file_key is only ever set once: a Document that already has\na file is refused, so an existing version is never overwritten.","operationId":"upload_edition_document_content_api_v1_editions__edition_id__content_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"integer","title":"Edition Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_edition_document_content_api_v1_editions__edition_id__content_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/series":{"get":{"tags":["series"],"summary":"List Series","description":"Public catalogue of series (no items, for a grid).","operationId":"list_series_api_v1_series_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Series Api V1 Series Get"}}}}}},"post":{"tags":["series"],"summary":"Create Series","operationId":"create_series_api_v1_series_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Series Api V1 Series Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/series/me":{"get":{"tags":["series"],"summary":"My Series","operationId":"my_series_api_v1_series_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response My Series Api V1 Series Me Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/series/{series_id}":{"get":{"tags":["series"],"summary":"Get Series","description":"Public series landing: the series + its ordered volumes.","operationId":"get_series_api_v1_series__series_id__get","parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"integer","title":"Series Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Series Api V1 Series  Series Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/series/{series_id}/items":{"post":{"tags":["series"],"summary":"Add Series Item","operationId":"add_series_item_api_v1_series__series_id__items_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"integer","title":"Series Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesItemAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Add Series Item Api V1 Series  Series Id  Items Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/series/{series_id}/items/{item_id}":{"delete":{"tags":["series"],"summary":"Remove Series Item","operationId":"remove_series_item_api_v1_series__series_id__items__item_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"integer","title":"Series Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/series/{series_id}/price":{"put":{"tags":["series"],"summary":"Set Series Price","description":"Put a series on sale, or take it off. Owner or admin.","operationId":"set_series_price_api_v1_series__series_id__price_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"integer","title":"Series Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesPriceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Series Price Api V1 Series  Series Id  Price Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/series/{series_id}/subscribe/quote":{"get":{"tags":["series"],"summary":"Subscribe Quote","description":"PUBLIC. What to pay, and the message the paying wallet must sign.\n\nAlso states plainly what the money buys -- how many books, and whether\naccess ends. A subscriber should not have to infer either.","operationId":"subscribe_quote_api_v1_series__series_id__subscribe_quote_get","parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"integer","title":"Series Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Subscribe Quote Api V1 Series  Series Id  Subscribe Quote Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/series/{series_id}/subscribe":{"post":{"tags":["series"],"summary":"Subscribe","description":"Grant access to every book in the series after a verified payment.\n\nMirrors `books.buy_book`: idempotent on an existing live subscription,\none-transaction-one-grant before the chain is touched, and the chain\ncheck itself is `book_sale.verify_amount_paid` -- the same code the\nper-book sale uses, not a copy of it.","operationId":"subscribe_api_v1_series__series_id__subscribe_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"integer","title":"Series Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesSubscribeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Subscribe Api V1 Series  Series Id  Subscribe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/series/me/subscriptions":{"get":{"tags":["series"],"summary":"My Subscriptions","operationId":"my_subscriptions_api_v1_series_me_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response My Subscriptions Api V1 Series Me Subscriptions Get"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}]}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"AcceptIn":{"properties":{"declared_name":{"type":"string","maxLength":255,"minLength":1,"title":"Declared Name"},"wallet":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Wallet"},"accept_conditions":{"type":"boolean","title":"Accept Conditions"}},"type":"object","required":["declared_name","accept_conditions"],"title":"AcceptIn"},"AccessOut":{"properties":{"has_access":{"type":"boolean","title":"Has Access"}},"type":"object","required":["has_access"],"title":"AccessOut"},"AccessRequestIn":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"AccessRequestIn"},"ActivateRequest":{"properties":{"party":{"type":"string","title":"Party"},"tier":{"type":"string","title":"Tier"},"plan":{"type":"string","title":"Plan"},"payment_ref":{"type":"string","title":"Payment Ref"},"buyer_wallet":{"type":"string","title":"Buyer Wallet"},"invoice_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Ref"}},"type":"object","required":["party","tier","plan","payment_ref","buyer_wallet"],"title":"ActivateRequest"},"AgentCreate":{"properties":{"label":{"type":"string","title":"Label","default":"agent"}},"type":"object","title":"AgentCreate"},"AgenticPdfCreate":{"properties":{"slug":{"type":"string","maxLength":160,"minLength":1,"pattern":"\\S","title":"Slug"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"},"owner_business_id":{"type":"integer","title":"Owner Business Id"},"format":{"type":"string","maxLength":20,"minLength":1,"pattern":"\\S","title":"Format"},"language":{"type":"string","maxLength":12,"minLength":1,"pattern":"\\S","title":"Language"},"document_hash":{"type":"string","maxLength":128,"minLength":1,"pattern":"\\S","title":"Document Hash"},"version":{"type":"string","maxLength":30,"minLength":1,"pattern":"\\S","title":"Version"},"structured_metadata":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Structured Metadata"},"default_workflow_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Default Workflow Type"}},"type":"object","required":["slug","owner_business_id","format","language","document_hash","version"],"title":"AgenticPdfCreate"},"AibizRedeemRequest":{"properties":{"token":{"type":"string","maxLength":255,"minLength":8,"pattern":"^[A-Za-z0-9][A-Za-z0-9._~=-]*$","title":"Token"},"format":{"type":"string","enum":["pdf","epub"],"title":"Format","default":"pdf"}},"type":"object","required":["token"],"title":"AibizRedeemRequest"},"AnswerSubmit":{"properties":{"answers":{"type":"object","title":"Answers"}},"type":"object","required":["answers"],"title":"AnswerSubmit"},"AudienceOut":{"properties":{"audience":{"type":"string","title":"Audience"},"count":{"type":"integer","title":"Count"},"members":{"items":{"$ref":"#/components/schemas/Member"},"type":"array","title":"Members"}},"type":"object","required":["audience","count","members"],"title":"AudienceOut"},"AuthoriseIn":{"properties":{"emails":{"items":{"type":"string","format":"email"},"type":"array","title":"Emails"}},"type":"object","required":["emails"],"title":"AuthoriseIn"},"AutoIssueState":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"AutoIssueState"},"Body_login_api_v1_auth_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"password"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_api_v1_auth_login_post"},"Body_request_compile_api_v1_design_compile_post":{"properties":{"theme_name":{"type":"string","title":"Theme Name"},"book_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Book Id"},"cinematic":{"type":"boolean","title":"Cinematic","default":false},"manuscript":{"type":"string","format":"binary","title":"Manuscript","description":"Markdown file matching /design-compile/sample-template"}},"type":"object","required":["theme_name","manuscript"],"title":"Body_request_compile_api_v1_design_compile_post"},"Body_submit_notice_api_v1_copyguard_notices_post":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"category":{"type":"string","title":"Category","default":"nonfiction"},"channel":{"type":"string","title":"Channel","default":"ebook"},"access_mode":{"type":"string","title":"Access Mode","default":"public"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"author_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Wallet"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["title","file"],"title":"Body_submit_notice_api_v1_copyguard_notices_post"},"Body_upload_book_cover_api_v1_books__book_id__cover_put":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_book_cover_api_v1_books__book_id__cover_put"},"Body_upload_cover_api_v1_smart_pdf__product_id__cover_put":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_cover_api_v1_smart_pdf__product_id__cover_put"},"Body_upload_edition_document_content_api_v1_editions__edition_id__content_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_edition_document_content_api_v1_editions__edition_id__content_post"},"Body_upload_signed_declaration_api_v1_copyguard_notices__notice_id__documents_declaration_signed_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_signed_declaration_api_v1_copyguard_notices__notice_id__documents_declaration_signed_post"},"BookCreate":{"properties":{"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"author_id":{"type":"integer","title":"Author Id"},"publisher_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Publisher Id"},"price_cents":{"type":"integer","minimum":0.0,"title":"Price Cents","default":0},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"kdp_select":{"type":"boolean","title":"Kdp Select","default":false},"external_buy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Buy Url"},"isbn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Isbn"},"access_mode":{"type":"string","title":"Access Mode","default":"public"}},"type":"object","required":["title","category","author_id"],"title":"BookCreate"},"BookIdOut":{"properties":{"id":{"type":"integer","title":"Id"}},"type":"object","required":["id"],"title":"BookIdOut","description":"Exact shape AIBIZ's purchase-success resolver expects -- q1.md #3."},"BookLinksIn":{"properties":{"whatsapp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Url"},"telegram_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Url"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"youtube_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Url"}},"type":"object","title":"BookLinksIn","description":"Author-editable community links -- owner 2026-08-24, youtube added\n2026-09-19. Full replace: None clears a link. http(s)-only is enforced in\nthe endpoint, because every one of these renders as a public <a href>."},"BookOut":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"author_id":{"type":"integer","title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"publisher_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Publisher Id"},"publisher_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher Name"},"price_cents":{"type":"integer","title":"Price Cents"},"language":{"type":"string","title":"Language","default":"en"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"kdp_select":{"type":"boolean","title":"Kdp Select"},"external_buy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Buy Url"},"isbn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Isbn"},"sale_price_bzeusd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sale Price Bzeusd"},"access_mode":{"type":"string","title":"Access Mode","default":"public"},"whatsapp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Url"},"telegram_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Url"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"youtube_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Url"},"notice":{"anyOf":[{"$ref":"#/components/schemas/NoticeInfoOut"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","subtitle","description","category","author_id","author_name","publisher_id","publisher_name","price_cents","cover_url","file_url","kdp_select","external_buy_url","isbn","created_at"],"title":"BookOut"},"BookmarkCreate":{"properties":{"location":{"type":"string","title":"Location"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["location"],"title":"BookmarkCreate"},"BookmarkOut":{"properties":{"id":{"type":"integer","title":"Id"},"book_id":{"type":"integer","title":"Book Id"},"location":{"type":"string","title":"Location"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","book_id","location","label","created_at"],"title":"BookmarkOut"},"BusinessCreate":{"properties":{"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"}},"type":"object","title":"BusinessCreate"},"BusinessUpdate":{"properties":{"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"}},"type":"object","title":"BusinessUpdate"},"BuyRequest":{"properties":{"tx_hash":{"type":"string","maxLength":66,"minLength":66,"pattern":"^0x[0-9a-fA-F]{64}$","title":"Tx Hash"},"buyer_wallet":{"type":"string","maxLength":42,"minLength":42,"pattern":"^0x[0-9a-fA-F]{40}$","title":"Buyer Wallet"},"signature":{"type":"string","maxLength":300,"minLength":1,"title":"Signature"}},"type":"object","required":["tx_hash","buyer_wallet","signature"],"title":"BuyRequest","description":"A native BZeUSD purchase on ebook.1bz.biz. The buyer paid on-chain and proves\ncontrol of the paying wallet by signing the per-book message (book_sale.sign_message)."},"CanManageOut":{"properties":{"can_manage":{"type":"boolean","title":"Can Manage"}},"type":"object","required":["can_manage"],"title":"CanManageOut"},"ChatAsk":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"}},"type":"object","required":["message"],"title":"ChatAsk"},"ChatMessageOut":{"properties":{"id":{"type":"integer","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"answer_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer Mode"},"citations":{"items":{"$ref":"#/components/schemas/CitationOut"},"type":"array","title":"Citations","default":[]}},"type":"object","required":["id","role","content","created_at"],"title":"ChatMessageOut"},"CheckoutIn":{"properties":{"purpose":{"type":"string","title":"Purpose"},"reference_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reference Id"}},"type":"object","required":["purpose"],"title":"CheckoutIn"},"CitationOut":{"properties":{"citation_rank":{"type":"integer","title":"Citation Rank"},"generation_id":{"type":"integer","title":"Generation Id"},"chunk_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Version Id"},"chapter_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chapter No"},"chapter_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chapter Title"},"page_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page No"},"locator_kind":{"type":"string","title":"Locator Kind"},"locator_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locator Start"},"locator_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locator End"},"excerpt_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt Snapshot"}},"type":"object","required":["citation_rank","generation_id","chunk_version_id","chapter_no","locator_kind","locator_start","locator_end","excerpt_snapshot"],"title":"CitationOut","description":"Where an answer came from. `chunk_version_id` names an immutable chunk.\nAfter a withdrawal the excerpt is gone and the id is null; the rest stays."},"ClaimRequestIn":{"properties":{"grantee_email":{"type":"string","format":"email","title":"Grantee Email"},"wallet":{"type":"string","maxLength":255,"minLength":1,"title":"Wallet"}},"type":"object","required":["grantee_email","wallet"],"title":"ClaimRequestIn"},"ClaimVerifyIn":{"properties":{"grantee_email":{"type":"string","format":"email","title":"Grantee Email"},"code":{"type":"string","maxLength":12,"minLength":1,"title":"Code"}},"type":"object","required":["grantee_email","code"],"title":"ClaimVerifyIn"},"CommentaryCreate":{"properties":{"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"CommentaryCreate"},"CommentaryOut":{"properties":{"id":{"type":"integer","title":"Id"},"book_id":{"type":"integer","title":"Book Id"},"user_id":{"type":"integer","title":"User Id"},"author_display_name":{"type":"string","title":"Author Display Name"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","book_id","user_id","author_display_name","location","body","created_at","updated_at"],"title":"CommentaryOut"},"CommentaryUpdate":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"CommentaryUpdate"},"CompileRequestOut":{"properties":{"id":{"type":"integer","title":"Id"},"theme_name":{"type":"string","title":"Theme Name"},"cinematic":{"type":"boolean","title":"Cinematic","default":false},"status":{"type":"string","title":"Status"},"fee_bzeusd":{"type":"number","title":"Fee Bzeusd"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","theme_name","status","fee_bzeusd","page_count","error"],"title":"CompileRequestOut"},"ConsultancyInquiryIn":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"message":{"type":"string","title":"Message"}},"type":"object","required":["name","email","message"],"title":"ConsultancyInquiryIn"},"CopyGuardNoticeOut":{"properties":{"id":{"type":"integer","title":"Id"},"book_id":{"type":"integer","title":"Book Id"},"claimant_name":{"type":"string","title":"Claimant Name"},"claimant_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimant Email"},"cnn":{"type":"string","title":"Cnn"},"status":{"$ref":"#/components/schemas/NoticeStatus"},"file_size_mb":{"type":"number","title":"File Size Mb"},"publication_channel":{"type":"string","title":"Publication Channel","default":"ebook"},"imprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imprint"},"publication_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Publication Expires At"},"fee_bzeusd":{"type":"number","title":"Fee Bzeusd"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"notice_published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Notice Published At"},"notice_closes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Notice Closes At"},"certificate_issued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Certificate Issued At"},"dzit_tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dzit Tx Hash"},"nft_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nft Name"},"nft_token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nft Token Id"},"claimant_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimant Wallet"},"documents":{"items":{"type":"string"},"type":"array","title":"Documents","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"publication":{"anyOf":[{"$ref":"#/components/schemas/PublicationStatusOut"},{"type":"null"}]}},"type":"object","required":["id","book_id","claimant_name","cnn","status","file_size_mb","fee_bzeusd","payment_method","notice_published_at","notice_closes_at","certificate_issued_at","dzit_tx_hash","nft_name","nft_token_id","claimant_wallet","created_at"],"title":"CopyGuardNoticeOut"},"CopyGuardPayRequest":{"properties":{"payment_method":{"type":"string","enum":["bzeusd"],"const":"bzeusd","title":"Payment Method"},"payment_ref":{"type":"string","title":"Payment Ref"},"buyer_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Wallet"}},"type":"object","required":["payment_method","payment_ref"],"title":"CopyGuardPayRequest"},"CounterClaimOut":{"properties":{"id":{"type":"integer","title":"Id"},"notice_id":{"type":"integer","title":"Notice Id"},"contact_email":{"type":"string","title":"Contact Email"},"reason":{"type":"string","title":"Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","notice_id","contact_email","reason","created_at"],"title":"CounterClaimOut"},"CounterClaimRequest":{"properties":{"contact_email":{"type":"string","title":"Contact Email"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["contact_email","reason"],"title":"CounterClaimRequest"},"CreateKey":{"properties":{"label":{"type":"string","title":"Label","default":"default"}},"type":"object","title":"CreateKey"},"DeclineIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"DeclineIn"},"DistributionIn":{"properties":{"agency":{"type":"string","title":"Agency"},"status":{"type":"string","title":"Status","default":"submitted"},"identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["agency"],"title":"DistributionIn"},"GrantOut":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"status":{"type":"string","title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested At"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"}},"type":"object","required":["id","email","status"],"title":"GrantOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HighlightCreate":{"properties":{"location":{"type":"string","title":"Location"},"text":{"type":"string","title":"Text"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["location","text"],"title":"HighlightCreate"},"HighlightOut":{"properties":{"id":{"type":"integer","title":"Id"},"book_id":{"type":"integer","title":"Book Id"},"location":{"type":"string","title":"Location"},"text":{"type":"string","title":"Text"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","book_id","location","text","note","created_at","updated_at"],"title":"HighlightOut"},"HighlightUpdate":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"HighlightUpdate"},"IPVaultPayRequest":{"properties":{"payment_method":{"type":"string","enum":["bzeusd"],"const":"bzeusd","title":"Payment Method"},"payment_ref":{"type":"string","title":"Payment Ref"},"buyer_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Wallet"}},"type":"object","required":["payment_method","payment_ref"],"title":"IPVaultPayRequest"},"IPVaultRecordOut":{"properties":{"id":{"type":"integer","title":"Id"},"copyguard_notice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Copyguard Notice Id"},"title":{"type":"string","title":"Title"},"nft_name":{"type":"string","title":"Nft Name"},"nft_token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nft Token Id"},"claimant_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimant Wallet"},"status":{"$ref":"#/components/schemas/IPVaultStatus"},"fee_paid":{"type":"number","title":"Fee Paid"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"publication":{"anyOf":[{"$ref":"#/components/schemas/PublicationStatusOut"},{"type":"null"}]}},"type":"object","required":["id","copyguard_notice_id","title","nft_name","nft_token_id","claimant_wallet","status","fee_paid","payment_method","created_at"],"title":"IPVaultRecordOut"},"IPVaultStatus":{"type":"string","enum":["requested","paid","minted"],"title":"IPVaultStatus"},"IPVaultTransferRequest":{"properties":{"copyguard_notice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Copyguard Notice Id"},"title":{"type":"string","title":"Title"},"claimant_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimant Wallet"},"standalone":{"type":"boolean","title":"Standalone","default":false}},"type":"object","required":["title"],"title":"IPVaultTransferRequest"},"LinkSld":{"properties":{"sld_identity_id":{"type":"integer","title":"Sld Identity Id"}},"type":"object","required":["sld_identity_id"],"title":"LinkSld"},"Member":{"properties":{"user_id":{"type":"integer","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"},"registered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Registered At"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["user_id","email","display_name"],"title":"Member"},"MemberAdd":{"properties":{"user_id":{"type":"integer","title":"User Id"},"role":{"type":"string","title":"Role"}},"type":"object","required":["user_id","role"],"title":"MemberAdd"},"MemberUpdate":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"MemberUpdate"},"NamespaceCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"NamespaceCreate"},"NoticeInfoOut":{"properties":{"cnn":{"type":"string","title":"Cnn"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"closes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closes At"},"certificate_issued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Certificate Issued At"},"notice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice Id"},"nft_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nft Name"},"nft_token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nft Token Id"},"claimant_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimant Wallet"}},"type":"object","required":["cnn","published_at","closes_at","certificate_issued_at"],"title":"NoticeInfoOut","description":"The book's CopyGuard notice status, so any published book can show a\n'notice published / certificate pending' banner without the frontend\nknowing the pipeline. Populated for every book that has a public notice."},"NoticeStatus":{"type":"string","enum":["submitted","paid","notice_published","certificate_issued","rejected"],"title":"NoticeStatus"},"OptionIn":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"includes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Includes"},"price_bzeusd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Bzeusd"},"delivery":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Delivery"}},"type":"object","required":["label"],"title":"OptionIn"},"PasswordChange":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"PasswordChange"},"PasswordResetConfirm":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["email","code","new_password"],"title":"PasswordResetConfirm"},"PasswordResetRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"PasswordResetRequest"},"PayIn":{"properties":{"payment_method":{"type":"string","enum":["bzeusd"],"const":"bzeusd","title":"Payment Method"},"payment_ref":{"type":"string","title":"Payment Ref"},"buyer_wallet":{"type":"string","title":"Buyer Wallet"}},"type":"object","required":["payment_method","payment_ref","buyer_wallet"],"title":"PayIn"},"PayRequest":{"properties":{"party":{"type":"string","enum":["author","publisher"],"title":"Party"},"party_id":{"type":"integer","title":"Party Id"}},"type":"object","required":["party","party_id"],"title":"PayRequest"},"PermissionGrant":{"properties":{"resource_type":{"type":"string","title":"Resource Type"},"action":{"type":"string","title":"Action"}},"type":"object","required":["resource_type","action"],"title":"PermissionGrant"},"PreorderOut":{"properties":{"book_id":{"type":"integer","title":"Book Id"},"title":{"type":"string","title":"Title"},"email":{"type":"string","format":"email","title":"Email"},"amount_bzeusd":{"type":"number","title":"Amount Bzeusd"},"tx_hash":{"type":"string","title":"Tx Hash"},"message":{"type":"string","title":"Message"}},"type":"object","required":["book_id","title","email","amount_bzeusd","tx_hash","message"],"title":"PreorderOut","description":"What the buyer is told back. No account internals: never the user id, never whether the\naddress already had an account -- that answers 'is this person a member?' for anyone who can\nguess an email."},"PreorderRequest":{"properties":{"tx_hash":{"type":"string","maxLength":66,"minLength":66,"pattern":"^0x[0-9a-fA-F]{64}$","title":"Tx Hash"},"buyer_wallet":{"type":"string","maxLength":42,"minLength":42,"pattern":"^0x[0-9a-fA-F]{40}$","title":"Buyer Wallet"},"signature":{"type":"string","maxLength":300,"minLength":1,"title":"Signature"},"email":{"type":"string","format":"email","title":"Email"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["tx_hash","buyer_wallet","signature","email"],"title":"PreorderRequest","description":"A pre-publication order. Same on-chain proof as BuyRequest, plus the email the book is\ndelivered to -- a pre-order buyer is usually not a member yet, so there is no session to\ntake the address from."},"ProfileUpdate":{"properties":{"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["display_name"],"title":"ProfileUpdate","description":"What a signed-in user may change about their own account.\n\nOnly the display name for now. Email is the login identity and role is a\npermission level; neither is self-service."},"ProgressOut":{"properties":{"book_id":{"type":"integer","title":"Book Id"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"percent":{"type":"number","title":"Percent"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["book_id","location","percent","updated_at"],"title":"ProgressOut"},"ProgressUpdate":{"properties":{"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"percent":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Percent"}},"type":"object","required":["percent"],"title":"ProgressUpdate"},"ProposalIn":{"properties":{"title":{"type":"string","maxLength":255,"minLength":3,"title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Location"},"contact_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Email"},"response_time":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Response Time"},"valid_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Valid Days"},"publish":{"type":"boolean","title":"Publish","default":true},"options":{"items":{"$ref":"#/components/schemas/OptionIn"},"type":"array","maxItems":8,"title":"Options"}},"type":"object","required":["title"],"title":"ProposalIn"},"PublicationActionOut":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"href":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Href"},"method":{"type":"string","enum":["get","post"],"title":"Method","default":"get"}},"type":"object","required":["code","label"],"title":"PublicationActionOut"},"PublicationBlockerOut":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"PublicationBlockerOut"},"PublicationRecoverRequest":{"properties":{"book_ids":{"items":{"type":"integer"},"type":"array","maxItems":50,"minItems":1,"title":"Book Ids"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"type":"object","required":["book_ids"],"title":"PublicationRecoverRequest"},"PublicationStatusOut":{"properties":{"book_id":{"type":"integer","title":"Book Id"},"notice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice Id"},"ipvault_record_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ipvault Record Id"},"state":{"type":"string","enum":["published","waiting","recoverable","blocked"],"title":"State"},"published":{"type":"boolean","title":"Published","default":false},"summary":{"type":"string","title":"Summary","default":""},"blockers":{"items":{"$ref":"#/components/schemas/PublicationBlockerOut"},"type":"array","title":"Blockers","default":[]},"next_action":{"anyOf":[{"$ref":"#/components/schemas/PublicationActionOut"},{"type":"null"}]},"can_recheck":{"type":"boolean","title":"Can Recheck","default":false}},"type":"object","required":["book_id","state"],"title":"PublicationStatusOut","description":"Where a book stands against the publication gate, and the one next step.\n`state`: published | waiting (author's step) | recoverable (re-check or\nretry) | blocked (needs a plan change or support)."},"PurchaseOut":{"properties":{"id":{"type":"integer","title":"Id"},"book_id":{"type":"integer","title":"Book Id"},"source":{"type":"string","title":"Source"},"purchased_at":{"type":"string","format":"date-time","title":"Purchased At"}},"type":"object","required":["id","book_id","source","purchased_at"],"title":"PurchaseOut"},"QuestionDef":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"type":{"type":"string","enum":["text","single_choice","multi_choice","rating"],"title":"Type"},"prompt":{"type":"string","minLength":1,"title":"Prompt"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"required":{"type":"boolean","title":"Required","default":true}},"type":"object","required":["id","type","prompt"],"title":"QuestionDef"},"QuestionIn":{"properties":{"question":{"type":"string","maxLength":2000,"minLength":5,"title":"Question"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"}},"type":"object","required":["question"],"title":"QuestionIn"},"QuestionnaireCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"questions":{"items":{"$ref":"#/components/schemas/QuestionDef"},"type":"array","minItems":1,"title":"Questions"}},"type":"object","required":["title","questions"],"title":"QuestionnaireCreate"},"QuestionnaireOut":{"properties":{"id":{"type":"integer","title":"Id"},"book_id":{"type":"integer","title":"Book Id"},"created_by":{"type":"integer","title":"Created By"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"questions":{"items":{"$ref":"#/components/schemas/QuestionDef"},"type":"array","title":"Questions"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","book_id","created_by","title","description","questions","created_at","updated_at"],"title":"QuestionnaireOut"},"QuestionnaireResponseOut":{"properties":{"id":{"type":"integer","title":"Id"},"questionnaire_id":{"type":"integer","title":"Questionnaire Id"},"user_id":{"type":"integer","title":"User Id"},"respondent_display_name":{"type":"string","title":"Respondent Display Name"},"answers":{"type":"object","title":"Answers"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"}},"type":"object","required":["id","questionnaire_id","user_id","respondent_display_name","answers","submitted_at"],"title":"QuestionnaireResponseOut"},"ReplyIn":{"properties":{"reply":{"type":"string","maxLength":4000,"minLength":1,"title":"Reply"}},"type":"object","required":["reply"],"title":"ReplyIn"},"RespondIn":{"properties":{"action":{"type":"string","title":"Action"},"option_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Option Id"},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Location"}},"type":"object","required":["action"],"title":"RespondIn"},"RevokeIn":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"RevokeIn"},"RightsGrantIn":{"properties":{"right_type":{"type":"string","title":"Right Type"},"right_label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Right Label"},"grantee_email":{"type":"string","format":"email","title":"Grantee Email"},"grantee_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Grantee Name"},"territory":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Territory"},"is_lifetime":{"type":"boolean","title":"Is Lifetime","default":false},"term_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Term Start"},"term_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Term End"},"conditions":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Conditions"},"claimant_wallet":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Claimant Wallet"}},"type":"object","required":["right_type","grantee_email"],"title":"RightsGrantIn"},"Role":{"type":"string","enum":["reader","author","publisher","admin"],"title":"Role"},"RoleUpgrade":{"properties":{"role":{"$ref":"#/components/schemas/Role"}},"type":"object","required":["role"],"title":"RoleUpgrade"},"SLDBlockchainEvidenceAttach":{"properties":{"chain":{"type":"string","title":"Chain"},"tx_hash":{"type":"string","title":"Tx Hash"},"nft_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nft Name"},"token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Id"},"contract_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Address"},"minted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Minted At"}},"type":"object","required":["chain","tx_hash"],"title":"SLDBlockchainEvidenceAttach"},"SLDCreate":{"properties":{"label":{"type":"string","title":"Label"},"namespace":{"type":"string","title":"Namespace"},"owner_type":{"type":"string","title":"Owner Type"},"owner_id":{"type":"integer","title":"Owner Id"},"parent_sld_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Sld Id"}},"type":"object","required":["label","namespace","owner_type","owner_id"],"title":"SLDCreate"},"SamplePayload":{"properties":{"sections":{"items":{"type":"integer"},"type":"array","maxItems":10,"title":"Sections"}},"type":"object","title":"SamplePayload"},"SeriesCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"pattern":"\\S","title":"Name"},"slug":{"type":"string","maxLength":160,"minLength":1,"pattern":"\\S","title":"Slug"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"cover_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Cover Url"},"owner_author_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Author Id"},"owner_business_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Business Id"},"owner_publisher_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Publisher Id"}},"type":"object","required":["name","slug"],"title":"SeriesCreate"},"SeriesItemAdd":{"properties":{"book_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Book Id"},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id"},"position":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Position"}},"type":"object","required":["position"],"title":"SeriesItemAdd"},"SeriesPriceIn":{"properties":{"price_bzeusd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Bzeusd"},"period_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Period Days"}},"type":"object","title":"SeriesPriceIn"},"SeriesSubscribeIn":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash"},"buyer_wallet":{"type":"string","title":"Buyer Wallet"},"signature":{"type":"string","title":"Signature"}},"type":"object","required":["tx_hash","buyer_wallet","signature"],"title":"SeriesSubscribeIn"},"SetBlockchainReceipts":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"SetBlockchainReceipts"},"ShowcaseIn":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"},"showcase":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showcase"}},"type":"object","title":"ShowcaseIn"},"ShowcaseOut":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"slug":{"type":"string","title":"Slug"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"showcase":{"type":"boolean","title":"Showcase"},"has_cover":{"type":"boolean","title":"Has Cover"}},"type":"object","required":["product_id","slug","title","category","showcase","has_cover"],"title":"ShowcaseOut"},"SmartPdfCreate":{"properties":{"slug":{"type":"string","maxLength":160,"minLength":1,"pattern":"\\S","title":"Slug"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"},"owner_business_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Business Id"},"owner_author_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Author Id"},"format":{"type":"string","maxLength":20,"minLength":1,"pattern":"\\S","title":"Format"},"language":{"type":"string","maxLength":12,"minLength":1,"pattern":"\\S","title":"Language"},"document_hash":{"type":"string","maxLength":128,"minLength":1,"pattern":"\\S","title":"Document Hash"},"version":{"type":"string","maxLength":30,"minLength":1,"pattern":"\\S","title":"Version"},"structured_metadata":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Structured Metadata"}},"type":"object","required":["slug","format","language","document_hash","version"],"title":"SmartPdfCreate"},"SmartPdfVaultRequest":{"properties":{"document_id":{"type":"integer","title":"Document Id"},"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"claimant_wallet":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Claimant Wallet"}},"type":"object","required":["document_id","title"],"title":"SmartPdfVaultRequest","description":"Park a Smart PDF's ownership in IPVault. No notice is involved."},"SubscribeIn":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash"},"buyer_wallet":{"type":"string","title":"Buyer Wallet"},"signature":{"type":"string","title":"Signature"}},"type":"object","required":["tx_hash","buyer_wallet","signature"],"title":"SubscribeIn"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"Token"},"TranslationInterestIn":{"properties":{"language":{"type":"string","title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["language","email"],"title":"TranslationInterestIn"},"TranslationRightsRequest":{"properties":{"language":{"type":"string","title":"Language"},"language_name":{"type":"string","title":"Language Name"},"claimant_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimant Wallet"}},"type":"object","required":["language","language_name"],"title":"TranslationRightsRequest"},"UserOut":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"},"role":{"$ref":"#/components/schemas/Role"},"is_active":{"type":"boolean","title":"Is Active"},"has_author_profile":{"type":"boolean","title":"Has Author Profile","default":false},"has_publisher_profile":{"type":"boolean","title":"Has Publisher Profile","default":false},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"publisher_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher Name"},"author_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Author Id"},"publisher_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Publisher Id"}},"type":"object","required":["id","email","display_name","role","is_active"],"title":"UserOut"},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"display_name":{"type":"string","title":"Display Name"},"role":{"$ref":"#/components/schemas/Role","default":"reader"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["email","password","display_name"],"title":"UserRegister"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WalletCreate":{"properties":{"chain":{"type":"string","title":"Chain"},"address":{"type":"string","title":"Address"},"author_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Author Id"},"business_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Business Id"}},"type":"object","required":["chain","address"],"title":"WalletCreate"},"WalletOtpRequest":{"properties":{"wallet_address":{"type":"string","title":"Wallet Address"}},"type":"object","required":["wallet_address"],"title":"WalletOtpRequest"},"WalletOtpVerify":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"WalletOtpVerify"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/login"}}},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}