{
  "openapi": "3.0.3",
  "info": {"title": "Wary Press", "version": "0.0.0", "description": "Hosted pages. The public host comes from configuration. Free trial: account cap of 1 site. Per site: 1 page, 1 post, 5 MiB storage, 50 MiB monthly bandwidth, 2000 monthly requests. Upload is 256 KiB. 10 API calls per minute for the account. Regular is $4.99 per month: account cap of 1 site. Per site: 200 pages, 200 posts, 500 MiB storage, 20 GiB monthly bandwidth, 200000 monthly requests. Upload is 256 KiB. 120 API calls per minute for the account. Heavier is $9.99 per month: account cap of 4 sites. Per site: 200 pages, 200 posts, 500 MiB storage, 20 GiB monthly bandwidth, 200000 monthly requests. Upload is 256 KiB. 120 API calls per minute for the account. Library is $14.99 per month: account cap of 2 sites. Per site: 500 pages, 2000 posts, 500 MiB storage, 50 GiB monthly bandwidth, 500000 monthly requests. Upload is 256 KiB. 120 API calls per minute for the account. Global caps: 5 GiB storage, 600 requests per minute, 512 KiB JSON body. GOCMS_KILL_SWITCH=1 leaves GET /pricing and GET /healthz. Custom domains are not sold."},
  "servers": [{"url": "/"}],
  "paths": {
    "/": {"get": {"responses": {"200": {"description": "Customer home, or the product page when the host has no site"}}}},
    "/healthz": {"get": {"responses": {"200": {"description": "Process is up"}}}},
    "/pages/{slug}": {"get": {"parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Page. A series page includes a chapter grid of links to its posts."}}}},
    "/posts/{slug}": {"get": {"parameters": [{"name": "slug", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Post. A series post includes the series name, Chapter N of M, and previous and next links."}}}},
    "/media/{filename}": {"get": {"parameters": [{"name": "filename", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Uploaded file for this host"}}}},
    "/comments": {"post": {"responses": {"501": {"description": "Comments are later"}}}},
    "/llms.txt": {"get": {"responses": {"200": {"description": "LLM notes"}}}},
    "/openapi.json": {"get": {"responses": {"200": {"description": "This document"}}}},
    "/api/pages": {"post": {"responses": {"201": {"description": "Create a draft page on the caller's site"}}}},
    "/api/pages/{slug}": {"put": {"responses": {"200": {"description": "Update a page on the caller's site"}}}},
    "/api/pages/{slug}/publish": {"post": {"responses": {"200": {"description": "Publish a page on the caller's site"}}}},
    "/api/pages/{slug}/unpublish": {"post": {"responses": {"200": {"description": "Return a page on the caller's site to draft. A draft stays off the public site."}}}},
    "/api/presentation": {"get": {"responses": {"200": {"description": "Read one owned site's homepage mode, navigation, and site_title. Requires a press session or a gc_ key."}}}, "put": {"responses": {"200": {"description": "Replace that site's homepage, navigation, and site_title. posts lists titles, most recent first. page uses one published page. content uses the owner's title and markdown. home_title is the homepage heading. site_title is the banner and falls back to the account display name when empty. Omitting site_title clears it. Navigation is an ordered list of page and https or path links."}, "400": {"description": "validation"}}}},
    "/api/posts": {"get": {"responses": {"200": {"description": "Published posts for the request host. page returns one page of 50 and a total. Without page the response is the full list. series_slug and series_index are included when set."}}}, "post": {"responses": {"201": {"description": "Create a draft post on the caller's site. Optional series_slug and series_index set reading order. Omitting them stores an empty slug and 0."}}}},
    "/api/search": {"get": {"responses": {"200": {"description": "Published post and page matches for q on the request host. Drafts are omitted. page is 1-based."}, "400": {"description": "Missing q"}}}},
    "/search": {"get": {"responses": {"200": {"description": "Customer search page for q"}}}},
    "/api/posts/{slug}": {"put": {"responses": {"200": {"description": "Update a post on the caller's site. Pass site as the host when the owner has more than one site. Optional series_slug and series_index replace reading order when present. Omitting them leaves the stored values. Sending one leaves the other."}}}, "delete": {"responses": {"200": {"description": "Delete a post on the caller's site. Pass site as the host when the owner has more than one site."}}}},
    "/api/posts/{slug}/publish": {"post": {"responses": {"200": {"description": "Publish a post on the caller's site. Pass site as the host when the owner has more than one site."}}}},
    "/api/posts/{slug}/unpublish": {"post": {"responses": {"200": {"description": "Return a post on the caller's site to draft. A draft stays off the public site and out of search. Pass site as the host when the owner has more than one site."}}}},
    "/api/checkout": {"post": {"responses": {"200": {"description": "Start sandbox checkout. The body is {\"tier\":\"regular\"} or {\"tier\":\"heavy\"} or {\"tier\":\"library\"}. Does not grant a plan."}, "400": {"description": "Missing or unknown tier"}, "501": {"description": "not_configured"}}}},
    "/api/checkout/confirm": {"post": {"responses": {"200": {"description": "Grant regular or heavy after a paid completed test-mode checkout. The JSON body accepts id or session_id."}}}},
    "/api/stripe/webhook": {"post": {"responses": {"200": {"description": "Apply a signed sandbox checkout.session.completed. A completed event with no line items is read from the sandbox checkout before it grants. A signed sandbox customer.subscription.deleted returns the owner to the free trial when the site count fits. A bad signature does not grant and does not clear. Other event types are ignored."}, "400": {"description": "Bad signature or a signed event that must not grant"}, "501": {"description": "not_configured"}}}},
    "/api/domain-requests": {"post": {"responses": {"201": {"description": "Record a custom-domain request. Does not attach a domain."}, "400": {"description": "Invalid request"}, "429": {"description": "rate_limited"}}}},
    "/api/sites": {"get": {"responses": {"200": {"description": "List the caller's sites and whole-host redirects. Requires a press session or a gc_ key."}}}, "post": {"responses": {"201": {"description": "Create another site for the caller, within the plan site cap. host is one label under GOCMS_PUBLIC_HOST when that host is set. Requires a press session or a gc_ key."}, "402": {"description": "plan_required"}, "403": {"description": "site cap"}, "409": {"description": "host taken"}}}},
    "/api/sites/rename": {"post": {"responses": {"200": {"description": "Move an owned site to new_host. The previous host 301s to the new host and keeps the request path. Requires a press session or a gc_ key."}}}},
    "/api/sites/redirect": {"put": {"responses": {"200": {"description": "301 a host the caller controls to target. preserve_path appends the request path. Requires a press session or a gc_ key."}}}, "delete": {"responses": {"200": {"description": "Remove that whole-host redirect. The site row stays."}}}},
    "/api/sites/paths": {"get": {"responses": {"200": {"description": "List exact path redirects for host. Requires a press session or a gc_ key."}}}, "post": {"responses": {"201": {"description": "Add a path redirect. JSON fields are host, path, and url."}}}, "delete": {"responses": {"200": {"description": "Remove one path redirect. Query or JSON fields are host and path."}}}},
    "/api/signup": {"post": {"responses": {"201": {"description": "Create the account and the first site. JSON fields are email, password, display_name, and host. A single label is stored under GOCMS_PUBLIC_HOST when that host is set. Sets cookie gocms_session. The suite sign-in cookie is not this session."}}}},
    "/api/login": {"post": {"responses": {"200": {"description": "Sign in with email and password. Sets cookie gocms_session."}, "401": {"description": "unauthorized"}}}},
    "/api/keys": {"post": {"responses": {"201": {"description": "Return a gc_ key once. Requires cookie gocms_session from POST /api/signup or POST /api/login."}}}, "get": {"responses": {"200": {"description": "List key ids. Does not return the gc_ key."}}}},
    "/account": {"get": {"responses": {"200": {"description": "Browser requests with Accept text/html and no session get the account form (email, password, display name, site label). A session shows each site's current-month requests and bytes, the site cap, the per-site caps, and a form for that site's homepage, site title, and navigation. POST /account/key on that page shows a gc_ key once."}, "401": {"description": "unauthorized when the client did not ask for HTML and has no press session"}}}},
    "/account/key": {"post": {"responses": {"200": {"description": "Create a gc_ key and show it once on the account page. Requires cookie gocms_session."}}}},
    "/account/presentation": {"post": {"responses": {"200": {"description": "Save one owned site's homepage, site_title, and navigation from the account form. Omitting site_title clears the banner. Requires cookie gocms_session."}}}},
    "/account/domain": {"get": {"responses": {"200": {"description": "Custom domains are not sold"}}}, "post": {"responses": {"403": {"description": "not_sold"}}}},
    "/mcp": {"post": {"responses": {"200": {"description": "JSON-RPC on the request host. Read tools are list_posts, get_post, search_posts, search_site, and get_site. Write tools on POST /mcp still require a gc_ key."}}}}
  }
}
