{"openapi":"3.1.0","info":{"title":"RebbeHub API","version":"1.0.0","summary":"The open, community-edited index of Chabad Torah and media","description":"Reading needs nothing. Reporting a problem needs no account. Suggesting and reviewing need a signed-in person: a personal API token (`Authorization: Bearer rhp_…`, made on the account page) or the site's session. What a token sends is a suggestion, reviewed like any other.\n\nErrors are `{ error, message, detail? }` with the HTTP status of their kind. Lists that page answer `next`; pass it back as `cursor`. JSON answers carry an ETag (send If-None-Match for a 304). Requests are limited per address and, with a token, per token (RateLimit-Policy; 429 with Retry-After). Words a machine read or heard are marked until a person checks them. /v1 changes only by adding; see the developer docs.","license":{"name":"AGPL-3.0-only (code); CC0-1.0 (catalog facts); CC-BY-SA-4.0 (community text)","identifier":"AGPL-3.0-only"},"contact":{"name":"RebbeHub","url":"https://github.com/shmuky/RebbeHub"}},"externalDocs":{"description":"Developer docs","url":"https://rebbehub.org/developers"},"servers":[{"url":"https://api.rebbehub.org","description":"RebbeHub"}],"tags":[{"name":"About","description":"This API, the catalog in numbers"},{"name":"Items","description":"Every sefer, sicha, letter, farbrengen, printing, scan and recording: by id, path, type, set and date, with history"},{"name":"Search","description":"By names and dates, inside the words, and by meaning"},{"name":"Texts","description":"Scans' texts line by line, printings compared, translations"},{"name":"Media","description":"Transcripts and their sync"},{"name":"Files","description":"File bytes (while their rights allow), page images, uploads"},{"name":"Suggestions","description":"Every change is a suggestion, checked and reviewed"},{"name":"Talk","description":"The conversation on each page"},{"name":"Reports","description":"Reporting a problem, takedowns, families' requests"},{"name":"Issues","description":"Reports kept like issues: titles, labels, assignees, comments, closing"},{"name":"People","description":"Handles and profiles; people and conversations to @mention and #mention"},{"name":"Inbox","description":"What concerns you: mentions, review requests, assignments, what you follow"},{"name":"Projects","description":"Group efforts through a gap, the Missing board"},{"name":"Personal","description":"What you follow, where you stopped"},{"name":"Webhooks","description":"Every merge posted to your address, signed"},{"name":"Tokens","description":"Personal API tokens, made on the account page"},{"name":"Mirrors","description":"Editions and their signed dumps"},{"name":"Libraries","description":"OAI-PMH and IIIF"},{"name":"Agents","description":"llms.txt and the MCP server"},{"name":"Sign-in","description":"The site's own sign-in; listed for completeness, not for other clients"},{"name":"Stewards","description":"The stewards' tools on the site; listed for completeness"}],"components":{"securitySchemes":{"token":{"type":"http","scheme":"bearer","bearerFormat":"rhp_…","description":"A personal API token from the account page, with the read or write scope."},"session":{"type":"apiKey","in":"cookie","name":"__Host-rh_session","description":"The site's own session, from its own pages only."}},"schemas":{"ApiError":{"type":"object","properties":{"error":{"enum":["bad-request","unauthorized","forbidden","not-found","conflict","invalid","rate-limited","internal","state"],"description":"What kind of error, for programs"},"message":{"type":"string","description":"What went wrong, for people"},"detail":{"description":"More, when there is more (a check that failed, the clashes of a merge)"},"conflicts":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"For a merge that clashes"}},"required":["error","message"]},"About":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"head":{"type":"integer","description":"The latest commit's seq"},"docs":{"type":"string"},"developers":{"type":"string"},"mcp":{"type":"string"},"licence":{"type":"object","additionalProperties":true}},"required":["name","version","head"]},"Item":{"type":"object","properties":{"id":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"type":{"type":"string"},"path":{"oneOf":[{"type":"string"},{"type":"null"}]},"rev":{"type":"integer","description":"The revision shown"},"data":{"type":"object","additionalProperties":true,"description":"The item's data, as its type's JSON Schema (/v1/types) says"},"withheld":{"type":"string","description":"Set when its words are held back for rights: the item is listed, its text is not served"},"recordings":{"type":"integer","description":"For events: how many recordings it has"}},"required":["id","type","path","rev","data"]},"ItemPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"next":{"oneOf":[{"type":"string","description":"Pass back as cursor for the next page; null on the last"},{"type":"null"}]}},"required":["items","next"]},"Commit":{"type":"object","properties":{"seq":{"type":"integer"},"at":{"type":"string","format":"date-time"},"message":{"type":"string"},"mergedBy":{"type":"string"},"author":{"type":"string"},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"type":{"type":"string"},"path":{"oneOf":[{"type":"string"},{"type":"null"}]},"rev":{"type":"integer"},"data":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}}}}},"required":["seq","at","message","mergedBy","author","changes"]},"Suggestion":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"author":{"type":"string"},"status":{"enum":["draft","open","merged","sent_back","withdrawn"]},"kind":{"type":"string"},"project_id":{"oneOf":[{"type":"integer"},{"type":"null"}]},"base_commit":{"type":"integer"},"merged_commit":{"oneOf":[{"type":"integer"},{"type":"null"}]},"post_review":{"enum":["pending","done",null]},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"status":{"enum":["pass","fail","warn"]},"message":{"type":"string"}}}},"created_at":{"type":"string"},"submitted_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"closed_at":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","author","status"]},"SuggestionListItem":{"type":"object","properties":{"id":{"type":"integer"},"number":{"type":"integer"},"title":{"type":"string"},"status":{"enum":["draft","open","merged","sent_back","withdrawn"]},"kind":{"type":"string"},"author":{"type":"string"},"createdAt":{"type":"string"},"submittedAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"comments":{"type":"integer"},"reviewers":{"type":"array","items":{"type":"string"}},"approvals":{"type":"integer"},"changesRequested":{"type":"boolean"},"fixes":{"type":"array","items":{"type":"integer"},"description":"Issues it closes, by number"}},"required":["id","number","title","status","author"]},"Issue":{"type":"object","properties":{"id":{"type":"integer"},"number":{"type":"integer","description":"Its number, shared with suggestions: #12"},"title":{"oneOf":[{"type":"string"},{"type":"null"}]},"typeTitle":{"type":"object","properties":{"he":{"type":"string"},"en":{"type":"string"}}},"type":{"type":"string"},"state":{"enum":["open","closed"]},"stateReason":{"enum":["completed","not_planned",null]},"body":{"oneOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"author":{"oneOf":[{"type":"string","description":"An account id; null for a reader without an account"},{"type":"null"}]},"entity":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"set":{"oneOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string"}}}},"assignees":{"type":"array","items":{"type":"string"}},"comments":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"closedBy":{"oneOf":[{"type":"string"},{"type":"null"}]},"closedBySuggestion":{"oneOf":[{"type":"integer"},{"type":"null"}]}},"required":["id","number","type","state","private","labels","assignees","createdAt"]},"InboxLine":{"type":"object","properties":{"id":{"type":"integer"},"reason":{"enum":["mention","review_requested","assigned","author","comment","review","state","followed"]},"subject":{"type":"object","additionalProperties":true,"description":"What it is about: a suggestion or issue (number, title, state) or an item's talk page (path, name)"},"actor":{"oneOf":[{"type":"string"},{"type":"null"}]},"actorName":{"oneOf":[{"type":"string"},{"type":"null"}]},"actorUsername":{"oneOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer"},"detail":{"type":"object","additionalProperties":true},"at":{"type":"string"},"read":{"type":"boolean"}},"required":["id","reason","subject","count","at","read"]},"Comment":{"type":"object","properties":{"id":{"type":"integer"},"parent":{"oneOf":[{"type":"integer"},{"type":"null"}]},"author":{"type":"string"},"authorName":{"type":"string"},"body":{"oneOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"string"},"hidden":{"type":"boolean"}},"required":["id","author","body","at"]},"ScanTextPage":{"type":"object","properties":{"scan":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"page":{"type":"integer"},"pages":{"type":"integer"},"machine":{"type":"boolean","description":"Still an OCR page, untouched by people"},"engine":{"oneOf":[{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}}},{"type":"null"}]},"level":{"type":"integer","description":"Proofread: 0 not yet, 1 once, 2 twice","minimum":0,"maximum":2},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"checked":{"type":"boolean","description":"false: machine reading nobody has checked"},"level":{"type":"integer"}},"required":["id","text","checked"]}},"layers":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["scan","page","pages","lines"]},"Transcript":{"type":"object","properties":{"recording":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"text":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"language":{"type":"string"},"alignment":{"oneOf":[{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},{"type":"null"}]},"granularity":{"enum":["word","paragraph",null]},"paragraphs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"content":{"type":"string"},"startMs":{"oneOf":[{"type":"integer"},{"type":"null"}]},"endMs":{"oneOf":[{"type":"integer"},{"type":"null"}]},"words":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"null"}]},"locked":{"type":"boolean"},"checked":{"type":"boolean","description":"false: machine hearing nobody has checked"},"syncChecked":{"type":"boolean"}},"required":["id","content","checked"]}}},"required":["recording","text","paragraphs"]},"File":{"type":"object","properties":{"sha256":{"type":"string"},"bytes":{"type":"integer"},"mime":{"type":"string"},"rights":{"enum":["open","credit","link","preserved"]},"credit":{"oneOf":[{"type":"string"},{"type":"null"}]},"url":{"oneOf":[{"type":"string","description":"Where its bytes are served; null while its rights keep it private"},{"type":"null"}]},"derivations":{"type":"array","items":{"type":"object","additionalProperties":true}},"pageFix":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"pageImages":{"type":"integer"}},"required":["sha256","bytes","mime","rights","url"]},"Cover":{"type":"object","properties":{"file":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"},"page":{"type":"integer","description":"The PDF page drawn","minimum":1},"machine":{"type":"boolean","description":"true: a machine chose the title page and no person has yet"},"reasons":{"type":"array","items":{"type":"string"}},"credit":{"oneOf":[{"type":"string"},{"type":"null"}]},"image":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["url","width","height"]},"thumb":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["url","width","height"]}},"required":["file","page","machine","image","thumb"]},"ApiToken":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string","description":"Its first characters, to recognise it"},"scopes":{"type":"array","items":{"enum":["read","write"]}},"createdAt":{"type":"string"},"lastUsedAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","prefix","scopes","createdAt"]}},"responses":{"400":{"description":"A mistake in the request (an id that is not one, a missing field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Not signed in, or a token that is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Not allowed: a read-only token, or not a keeper","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not there, or withheld for its rights","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests: wait (Retry-After) or send a token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"paths":{"/":{"get":{"operationId":"root","tags":["About"],"summary":"Redirects to /v1","x-access":"public","responses":{"302":{"description":"To /v1"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1":{"get":{"operationId":"about","tags":["About"],"summary":"About this API: its version, the latest commit, where the docs are","x-access":"public","responses":{"200":{"description":"About","content":{"application/json":{"schema":{"$ref":"#/components/schemas/About"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/openapi.json":{"get":{"operationId":"openapi","tags":["About"],"summary":"This document","x-access":"public","responses":{"200":{"description":"OpenAPI 3.1","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/llms.txt":{"get":{"operationId":"llmsTxt","tags":["Agents"],"summary":"A short guide for AI agents (llms.txt)","x-access":"public","responses":{"200":{"description":"Markdown","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/types":{"get":{"operationId":"types","tags":["Items"],"summary":"Every kind of item and its JSON Schema","x-access":"public","responses":{"200":{"description":"Types and schemas","content":{"application/json":{"schema":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"schema":{"type":"object","additionalProperties":true}},"required":["type","schema"]}}},"required":["types"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/stats":{"get":{"operationId":"stats","tags":["About"],"summary":"How many items of each type, and the latest commit","x-access":"public","responses":{"200":{"description":"Counts","content":{"application/json":{"schema":{"type":"object","properties":{"head":{"type":"integer"},"counts":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["head","counts"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/community":{"get":{"operationId":"community","tags":["About"],"summary":"The community page in numbers: the latest merges, reports and suggestions waiting, people, gaps","x-access":"public","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":8},"description":"How many (at most 50)"}],"responses":{"200":{"description":"Numbers and the latest merges","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/health":{"get":{"operationId":"health","tags":["About"],"summary":"The health of the catalog: coverage per year and set, unchecked pages, unsynced recordings, dead links, the oldest open suggestions","x-access":"public","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":20},"description":"How many (at most 500)"}],"responses":{"200":{"description":"Health","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities":{"get":{"operationId":"listItems","tags":["Items"],"summary":"Items on main, by type and set, in path order, a page at a time","x-access":"public","x-paged":true,"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","description":"One of set, author, work, unit, event, publication, scan, contents-map, text-layer, text-page, text, segment, recording, alignment, alignment-span, relation, person, place, topic, source, schema"}},{"name":"set","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"Only items in this set"},{"name":"after","in":"query","required":false,"schema":{"type":"string"},"description":"Deprecated: the same as cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"description":"How many (at most 500)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next` of the page before"}],"responses":{"200":{"description":"A page of items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemPage"}}},"headers":{"Link":{"description":"rel=\"next\": the next page","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/batch":{"get":{"operationId":"getItems","tags":["Items"],"summary":"Several items at once, in the order asked (missing ones left out)","x-access":"public","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"Comma separated, at most 200"},"description":"The ids"}],"responses":{"200":{"description":"The items","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}},"required":["items"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}":{"get":{"operationId":"getItem","tags":["Items"],"summary":"One item, on main or as of a commit","description":"Words whose rights forbid copies are left out, and `withheld` says why.","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},{"name":"at","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"A commit's seq: the item as it was then"}],"responses":{"200":{"description":"The item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/children":{"get":{"operationId":"listChildren","tags":["Items"],"summary":"An item's children in their own order (a work's units, a text's paragraphs), a page at a time","x-access":"public","x-paged":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},{"name":"field","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-zA-Z]*$"},"description":"The children's field that points at this item (work, text, event…)"},{"name":"type","in":"query","required":true,"schema":{"type":"string"},"description":"The children's type (unit, segment, recording…)"},{"name":"after","in":"query","required":false,"schema":{"type":"string"},"description":"Deprecated: the same as cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"How many (at most 1000)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next` of the page before"}],"responses":{"200":{"description":"A page of children","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemPage"}}},"headers":{"Link":{"description":"rel=\"next\": the next page","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/linked/counts":{"get":{"operationId":"linkedCounts","tags":["Items"],"summary":"What points at an item, by type and field, with how many of each","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"The groups, largest first","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"field":{"type":"string"},"count":{"type":"integer"}},"required":["type","field","count"]}}},"required":["groups"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/linked":{"get":{"operationId":"listLinked","tags":["Items"],"summary":"One group of what points at an item, in its own order, a page at a time, with the total","x-access":"public","x-paged":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},{"name":"field","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-zA-Z]*$"},"description":"The field that points here (work, event, sets…)"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Only items of this type"},{"name":"after","in":"query","required":false,"schema":{"type":"string"},"description":"Deprecated: the same as cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"How many (at most 500)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next` of the page before"}],"responses":{"200":{"description":"A page of items and the total","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"total":{"type":"integer"},"next":{"oneOf":[{"type":"string","description":"Pass back as cursor for the next page; null on the last"},{"type":"null"}]}},"required":["items","total","next"]}}},"headers":{"Link":{"description":"rel=\"next\": the next page","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/history":{"get":{"operationId":"itemHistory","tags":["Items"],"summary":"Every merged change to an item, newest first: who, when, and what changed field by field","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"History","content":{"application/json":{"schema":{"type":"object","properties":{"history":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["history"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/backlinks":{"get":{"operationId":"itemBacklinks","tags":["Items"],"summary":"Items that point at this one","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},{"name":"field","in":"query","required":false,"schema":{"type":"string"},"description":"Only links in this field"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Only items of this type"}],"responses":{"200":{"description":"Backlinks","content":{"application/json":{"schema":{"type":"object","properties":{"backlinks":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"type":{"type":"string"},"field":{"type":"string"},"path":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["from","type","field","path"]}}},"required":["backlinks"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/relations":{"get":{"operationId":"itemRelations","tags":["Items"],"summary":"An item's links both ways: cites, printed in, based on, cited by","description":"Each is `machine: true` while a machine found it and no person has checked it.","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"Relations","content":{"application/json":{"schema":{"type":"object","properties":{"relations":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["relations"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/restore":{"post":{"operationId":"restoreItem","tags":["Suggestions"],"summary":"Suggest restoring an earlier version of an item","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rev":{"type":"integer","description":"The revision to restore"}},"required":["rev"]}}}},"responses":{"201":{"description":"The suggestion made","content":{"application/json":{"schema":{"type":"object","properties":{"suggestion":{"type":"integer"}},"required":["suggestion"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/revisions/{rev}":{"get":{"operationId":"getRevision","tags":["Items"],"summary":"One stored version of an item","x-access":"public","parameters":[{"name":"rev","in":"path","required":true,"schema":{"type":"integer","description":"A revision id","minimum":1}}],"responses":{"200":{"description":"The revision","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/resolve":{"get":{"operationId":"resolvePath","tags":["Items"],"summary":"The item at a readable path (an old path answers with where it moved)","x-access":"public","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","examples":["/events/5742-05-10"]},"description":"A path such as /likkutei-sichos/12/3"}],"responses":{"200":{"description":"Its id and current path","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"redirected":{"type":"boolean"},"path":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","redirected","path"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/events":{"get":{"operationId":"listEvents","tags":["Items"],"summary":"Farbrengens and other events by Hebrew date, each with how many recordings it has","x-access":"public","parameters":[{"name":"within","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}(-(0[1-9]|1[0-2]|06A|06B))?$"},"description":"A year (5742) or a month (5742-05)"},{"name":"day","in":"query","required":false,"schema":{"type":"string"},"description":"A day of any year (05-10), or several, comma separated"},{"name":"dates","in":"query","required":false,"schema":{"type":"string"},"description":"Exact dates, comma separated (5742-05-10,5743-05-10)"},{"name":"missing","in":"query","required":false,"schema":{"enum":["recordings","texts"]},"description":"Only those without"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":2000,"default":500},"description":"How many (at most 2000)"}],"responses":{"200":{"description":"Events","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}},"required":["items"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/refcounts":{"get":{"operationId":"refCounts","tags":["Items"],"summary":"How many items point at each item through a field (field=work&type=unit: each work's units)","x-access":"public","parameters":[{"name":"field","in":"query","required":true,"schema":{"type":"string"},"description":"The field"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Only items of this type"}],"responses":{"200":{"description":"Counts by id","content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["counts"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/sitemap":{"get":{"operationId":"sitemaps","tags":["Items"],"summary":"Every sitemap there is: each kind of item with a page of its own, in pages of pageSize items (id order), with when each page last changed","description":"What the site's /sitemap.xml is made from. Kinds: set, author, person, work, unit, event, publication, recording.","x-access":"public","responses":{"200":{"description":"The sitemaps","content":{"application/json":{"schema":{"type":"object","properties":{"pageSize":{"type":"integer"},"sitemaps":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"page":{"type":"integer","minimum":1},"count":{"type":"integer"},"lastmod":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["type","page","count","lastmod"]}}},"required":["pageSize","sitemaps"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/sitemap/{type}/{page}":{"get":{"operationId":"sitemapPage","tags":["Items"],"summary":"One sitemap's items: their ids, paths and when each last changed","x-access":"public","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","description":"A kind of item with a page of its own","enum":["set","author","person","work","unit","event","publication","recording"]}},{"name":"page","in":"path","required":true,"schema":{"type":"integer","description":"From 1","minimum":1}}],"responses":{"200":{"description":"The items","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"path":{"oneOf":[{"type":"string"},{"type":"null"}]},"lastmod":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","path","lastmod"]}}},"required":["type","page","items"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/works/{id}/outline":{"get":{"operationId":"workOutline","tags":["Items"],"summary":"A work's volumes (its top-level parts), with how many units each holds","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"Parts","content":{"application/json":{"schema":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"units":{"type":"integer"}}}}},"required":["parts"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/works/{id}/parts/{part}":{"get":{"operationId":"workPart","tags":["Items"],"summary":"The units of one volume of a work","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},{"name":"part","in":"path","required":true,"schema":{"type":"string"},"description":"The volume, as the outline names it"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000},"description":"How many (at most 1000)"}],"responses":{"200":{"description":"Units","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}},"required":["items"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/missing":{"get":{"operationId":"missing","tags":["Projects"],"summary":"The Missing board: farbrengens without a recording or a text, sefarim without a scan, files lost upstream","x-access":"public","parameters":[{"name":"kind","in":"query","required":true,"schema":{"enum":["recordings","texts","scans","files"]},"description":"What is missing"},{"name":"within","in":"query","required":false,"schema":{"type":"string"},"description":"For recordings and texts: a year or a month"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"description":"How many (at most 500)"}],"responses":{"200":{"description":"What is missing","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string"},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["kind","total","items"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/commits":{"get":{"operationId":"listCommits","tags":["Items"],"summary":"Every merge to main after a given one, in order, with what each changed: the way to follow the catalog without webhooks","x-access":"public","x-paged":true,"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"Start after this commit's seq (0: from the start)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"How many (at most 100)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next` of the page before"}],"responses":{"200":{"description":"Commits","content":{"application/json":{"schema":{"type":"object","properties":{"commits":{"type":"array","items":{"$ref":"#/components/schemas/Commit"}},"next":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["commits","next"]}}},"headers":{"Link":{"description":"rel=\"next\": the next page","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/dates/parse":{"get":{"operationId":"parseDate","tags":["Search"],"summary":"Read a Hebrew date as people write it","x-access":"public","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","examples":["יו\"ד שבט תשכ\"ב","10 Shvat 5722"]},"description":"The date"}],"responses":{"200":{"description":"The date key, in Hebrew and English","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"key":{"type":"string"},"he":{"type":"string"},"en":{"type":"string"}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"422":{"description":"Not a date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/search":{"get":{"operationId":"search","tags":["Search"],"summary":"Search names, text and dates, in Hebrew or English","description":"Ranked by relevance, not paged: ask for more with limit. A query that names a Hebrew date also answers with the date.","x-access":"public","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"The query"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Only this type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"How many (at most 100)"}],"responses":{"200":{"description":"Results, and the date the query names if any","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"date":{"oneOf":[{"type":"object","properties":{"key":{"type":"string"},"he":{"type":"string"},"en":{"type":"string"}}},{"type":"null"}]},"results":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}},"required":["query","date","results"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/search/moments":{"get":{"operationId":"searchMoments","tags":["Search"],"summary":"Where the words are: lines on scans' pages (open at the line) and paragraphs of texts and transcripts (open at the moment heard)","x-access":"public","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"The words"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"How many (at most 100)"}],"responses":{"200":{"description":"Moments, each saying whether a machine read it and nobody has checked it","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"moments":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["query","moments"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/search/similar":{"get":{"operationId":"searchSimilar","tags":["Search"],"summary":"Search by meaning (embeddings); every result is the machine's guess","description":"`available` is false until it is set up on the server.","x-access":"public","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":1000},"description":"A question or an idea, in Hebrew, Yiddish or English"},{"name":"types","in":"query","required":false,"schema":{"type":"string"},"description":"Some of unit, event, segment, text-page, work, comma separated"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"description":"How many (at most 50)"}],"responses":{"200":{"description":"Results with their score","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"available":{"type":"boolean"},"machine":{"const":true},"model":{"type":"string"},"results":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["query","available","results"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/scans/{id}/text":{"get":{"operationId":"scanText","tags":["Texts"],"summary":"A page of a scan's text: the community page, else the seed layer's; each line with its proofread level","description":"Lines nobody has checked are machine reading (`checked: false`). Withheld when the scan may not be served.","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"The page"}],"responses":{"200":{"description":"The page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanTextPage"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/scans/{id}/progress":{"get":{"operationId":"scanProgress","tags":["Texts"],"summary":"How far each page of a scan is proofread (0, 1 or 2)","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"Pages and levels","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"integer"},"levels":{"type":"array","items":{"type":"integer","minimum":0,"maximum":2}}},"required":["pages","levels"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/scans/{id}/text/fix":{"post":{"operationId":"fixScanLine","tags":["Texts"],"summary":"Fix one line of a scan's text (a suggestion)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"line":{"type":"string","description":"The line's id"},"text":{"type":"string"}},"required":["page","line","text"]}}}},"responses":{"201":{"description":"The suggestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/scans/{id}/text/confirm":{"post":{"operationId":"confirmScanPage","tags":["Texts"],"summary":"This page is right: raise it a proofreading level, with any fixes (a suggestion)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"fixes":{"type":"object","additionalProperties":{"type":"string"},"description":"Line id to its right text"}},"required":["page"]}}}},"responses":{"201":{"description":"The suggestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/scans/{id}/ocr":{"post":{"operationId":"uploadOcr","tags":["Texts"],"summary":"Upload your own OCR of a scan (hOCR, ALTO, or plain text with form feeds between pages) as a new layer","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"format":{"enum":["hocr","alto","text"]},"engine":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]},"firstPage":{"type":"integer","minimum":1},"language":{"type":"string"}},"required":["content","engine"]}}}},"responses":{"201":{"description":"The suggestion, with pages and lines read","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/scans/{id}/text/seed":{"post":{"operationId":"seedScanText","tags":["Texts"],"summary":"Keepers: seed the community text from this OCR layer (checked lines are kept)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"layer":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},"required":["layer"]}}}},"responses":{"201":{"description":"The suggestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/units/{id}/printings":{"get":{"operationId":"unitPrintings","tags":["Texts"],"summary":"The printings of a unit whose text the catalog has, to compare","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"Printings","content":{"application/json":{"schema":{"type":"object","properties":{"printings":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["printings"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/compare":{"get":{"operationId":"comparePrintings","tags":["Texts"],"summary":"Compare two printings word by word (Hebrew-aware)","x-access":"public","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string"},"description":"text:<id> or scan:<id>:<from>-<to>"},{"name":"b","in":"query","required":true,"schema":{"type":"string"},"description":"The other printing"}],"responses":{"200":{"description":"Runs of same, removed and added words","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/units/{id}/translations":{"post":{"operationId":"addTranslation","tags":["Texts"],"summary":"Suggest a translation of a unit, as its own text","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string"},"credit":{"type":"string"},"licence":{"enum":["public-domain","cc0","cc-by","cc-by-nc"]},"translationOf":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"content":{"type":"string","description":"A blank line between paragraphs"},"machine":{"type":"string","description":"The tool, when a machine translated it"}},"required":["language","credit","content"]}}}},"responses":{"201":{"description":"The suggestion made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/translations/fix":{"post":{"operationId":"fixTranslation","tags":["Texts"],"summary":"Suggest a fix to one paragraph of a translation","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"content":{"type":"string"}},"required":["segment","content"]}}}},"responses":{"201":{"description":"The suggestion made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/hanachos/text":{"post":{"operationId":"addHanachaText","tags":["Texts"],"summary":"A hanacha's words for a farbrengen or sicha (or a new farbrengen), a paragraph to a segment","description":"Words of unsure rights are kept and not shown until a steward decides.\n\nSigned in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"for":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"eventTitle":{"type":"string","description":"For a farbrengen the catalog lacks: its name"},"eventDate":{"type":"string","description":"With eventTitle: its date key"},"content":{"type":"string","description":"A blank line between paragraphs"},"rights":{"enum":["mine","public-domain","free","unsure"]},"language":{"type":"string"},"credit":{"type":"string"}},"required":["content","rights"]}}}},"responses":{"201":{"description":"The suggestion sent for review, and the text","content":{"application/json":{"schema":{"type":"object","properties":{"suggestion":{"type":"integer"},"text":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"event":{"oneOf":[{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},{"type":"null"}]},"publication":{"oneOf":[{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},{"type":"null"}]}},"required":["suggestion","text"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/texts/{sha256}":{"get":{"operationId":"getSourceText","tags":["Texts"],"summary":"A text of a sefer as its source gave it (one chapter or letter, an HTML article)","x-access":"public","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"HTML, shown as a document (sandboxed)","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/recordings/{id}/transcript":{"get":{"operationId":"recordingTranscript","tags":["Media"],"summary":"A recording's transcript, with its sync by paragraph and word","description":"A paragraph is machine hearing until a person checks it (`checked`).","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"The transcript","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcript"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/recordings/{id}/transcript/fix":{"post":{"operationId":"fixTranscript","tags":["Media"],"summary":"Fix the words of one paragraph of a transcript (a suggestion)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"content":{"type":"string"}},"required":["segment","content"]}}}},"responses":{"201":{"description":"The suggestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/recordings/{id}/sync/anchor":{"post":{"operationId":"anchorSync","tags":["Media"],"summary":"The Rebbe is saying this line now: set a paragraph (or word) at atMs, lock it, move what follows","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"atMs":{"type":"integer"},"word":{"type":"integer"}},"required":["segment","atMs"]}}}},"responses":{"201":{"description":"The suggestion and the spans as they now stand","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/recordings/{id}/sync/confirm":{"post":{"operationId":"confirmSync","tags":["Media"],"summary":"The sync is right: mark every paragraph checked","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"201":{"description":"The suggestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/recordings/{id}/hanacha":{"get":{"operationId":"recordingHanacha","tags":["Media"],"summary":"The hanacha synced to this recording, paragraph by paragraph","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"The hanacha and its sync","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/files/{sha256}":{"get":{"operationId":"getFile","tags":["Files"],"summary":"A file's size, rights and address, what was made from it, and its page fix","x-access":"public","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"The file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/files/{sha256}/similar":{"get":{"operationId":"similarFiles","tags":["Files"],"summary":"Held files that look like this one (the same scan or recording in other bytes): a machine's guess","x-access":"public","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Similar files, with the items that use each","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/page-fixes/drive/{id}":{"get":{"operationId":"driveFix","tags":["Files"],"summary":"What a PDF on Google Drive needs to read straight, by its Drive id, or the reading copy to open instead","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A Google Drive file id","pattern":"^[\\w-]{10,}$"}}],"responses":{"200":{"description":"The page fix","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/objects/{sha256}":{"get":{"operationId":"getObject","tags":["Files"],"summary":"A file's bytes, while its rights let it be served","description":"Supports Range requests. `X-Credit` carries the credit the rights ask for.","x-access":"public","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"The bytes","content":{"application/octet-stream":{"schema":{"type":"string"}}}},"206":{"description":"Part of the bytes (Range)"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"416":{"description":"A range outside the file"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/manifests/{collection}/{name}":{"get":{"operationId":"getManifest","tags":["Files"],"summary":"A published manifest: reading copies, page fixes (facts about files, open like the catalog)","x-access":"public","parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]+$"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"ends in .json","pattern":"^[a-z0-9-]+\\.json$"}}],"responses":{"200":{"description":"The manifest","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/scans/{id}/pages":{"get":{"operationId":"scanPages","tags":["Files"],"summary":"A served scan's page images and thumbnails, and its IIIF manifest","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"Pages","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/manifests/iiif/{file}":{"get":{"operationId":"iiifManifest","tags":["Libraries"],"summary":"A served scan as a IIIF Presentation 3 manifest, for any IIIF viewer","x-access":"public","parameters":[{"name":"file","in":"path","required":true,"schema":{"type":"string","description":"The scan's id and .json","pattern":"^rh-[0-9a-z]+\\.json$"}}],"responses":{"200":{"description":"The manifest","content":{"application/ld+json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/uploads":{"post":{"operationId":"upload","tags":["Files"],"summary":"Add a file: a recording of a farbrengen; a hanacha's PDF for a farbrengen or sicha; a scan (another scan of a printing, a new printing of a sefer, a teshura); or other material (a new sefer, a letter, a document)","description":"The file is the body, with its Content-Type (audio/…, application/pdf). A recording or hanacha may name a farbrengen the catalog lacks (eventTitle and eventDate) instead of `for`. New accounts wait a day, and everyone adds so many a day.\n\nSigned in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"what","in":"query","required":true,"schema":{"enum":["recording","hanacha","scan","document"]},"description":"What it is"},{"name":"for","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"The farbrengen, sicha, sefer, printing or Teshuros set it is added to"},{"name":"eventTitle","in":"query","required":false,"schema":{"type":"string","maxLength":300},"description":"For a recording or hanacha of a farbrengen the catalog lacks: its name"},{"name":"eventDate","in":"query","required":false,"schema":{"type":"string","examples":["5742-05-10"]},"description":"With eventTitle: its date key"},{"name":"kind","in":"query","required":false,"schema":{"enum":["bilti-mugah","mugah","maamar","hagahos","hosofos","english","other"],"default":"bilti-mugah"},"description":"For a hanacha: what kind"},{"name":"set","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"For a document: the set it belongs in"},{"name":"author","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"For a new sefer: its author"},{"name":"genre","in":"query","required":false,"schema":{"type":"string"},"description":"For a new sefer: its genre"},{"name":"unit","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"For a letter: the letter the catalog has that it reproduces"},{"name":"rights","in":"query","required":true,"schema":{"enum":["mine","free","public-domain","unsure"]},"description":"What you know of its rights"},{"name":"as","in":"query","required":false,"schema":{"enum":["scan-of","printing","teshura","sefer","letter","document"]},"description":"For a scan: scan-of, printing or teshura. For a document: sefer, letter or document"},{"name":"title","in":"query","required":false,"schema":{"type":"string"},"description":"Its name"},{"name":"publication","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"For scan-of: the printing"},{"name":"publisher","in":"query","required":false,"schema":{"type":"string"},"description":"For a printing"},{"name":"year","in":"query","required":false,"schema":{"type":"string"},"description":"For a printing: a Hebrew or civil year"},{"name":"printing","in":"query","required":false,"schema":{"type":"integer"},"description":"For a printing: 1 for the first"},{"name":"families","in":"query","required":false,"schema":{"type":"string"},"description":"For a teshura: its families, as printed"},{"name":"simcha","in":"query","required":false,"schema":{"type":"string"},"description":"For a teshura: wedding, bar-mitzvah, and so on"},{"name":"date","in":"query","required":false,"schema":{"type":"string"},"description":"For a teshura: the simcha's date key; for a letter or document, its date"}],"requestBody":{"required":true,"description":"The file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"We already have this file: where it is"},"201":{"description":"Stored, and a suggestion sent for review","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"description":"The day's allowance is used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/uploads/check":{"post":{"operationId":"checkUpload","tags":["Files"],"summary":"Before an upload: whether we have it (its sha256, a few page hashes) and what it likely is","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"for":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"sha256":{"type":"string"},"pageHashes":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"null"}]}},"title":{"type":"string"}},"required":["for"]}}}},"responses":{"200":{"description":"The guess, files already held that look like it, and the sefer's printings","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/uploads/propose":{"post":{"operationId":"proposeUpload","tags":["Files"],"summary":"Before adding something new: the machine's guess of what it is and where it belongs, from its name (a date in it, words of a title), and files already held that look like it","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"what":{"enum":["hanacha","recording","document"]},"name":{"type":"string","description":"Its file name or title"},"sha256":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"},"pageHashes":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"required":["what"]}}}},"responses":{"200":{"description":"The date read, what it likely is, the items it may belong to, and where the file already is","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/files/{sha256}/about":{"get":{"operationId":"fileAbout","tags":["Files"],"summary":"A file's own page: its rights, where it came from, what was made from it, and what uses it","x-access":"public","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"How many (at most 500)"}],"responses":{"200":{"description":"The file, and the items using it with their total","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/covers":{"get":{"operationId":"covers","tags":["Files"],"summary":"Sefarim's covers, drawn from their title pages, while their PDFs are served or linked","description":"A cover is `machine: true` until a person chose its page. A cover drawn from a PDF RebbeHub only links to is served; the PDF is not (its file page links to the source).","x-access":"public","parameters":[{"name":"ids","in":"query","required":false,"schema":{"type":"string","description":"Comma separated, at most 200"},"description":"The sefarim"}],"responses":{"200":{"description":"Covers by id (none for a sefer without one)","content":{"application/json":{"schema":{"type":"object","properties":{"covers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Cover"}}},"required":["covers"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/works/{id}/cover":{"get":{"operationId":"workCover","tags":["Files"],"summary":"A sefer's cover, the page a person chose, and the PDFs (served, or linked) its title page may be chosen from","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"The cover and its sources","content":{"application/json":{"schema":{"type":"object","properties":{"work":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"chosen":{"oneOf":[{"type":"object","properties":{"file":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"},"page":{"type":"integer"}},"required":["file","page"]},{"type":"null"}]},"cover":{"oneOf":[{"$ref":"#/components/schemas/Cover"},{"type":"null"}]},"sources":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["work","chosen","cover","sources"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions":{"get":{"operationId":"listSuggestions","tags":["Suggestions"],"summary":"Suggestions, oldest sent first, by status or author; with `state`, the list of conversations, newest first (numbers, reviewers, approvals, the issues each closes) with counts","x-access":"public","x-paged":true,"parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["draft","open","merged","sent_back","withdrawn"]}},{"name":"state","in":"query","required":false,"schema":{"enum":["open","closed","all"]},"description":"The conversation list: open (waiting or sent back) or closed (merged or withdrawn)"},{"name":"author","in":"query","required":false,"schema":{"type":"string"},"description":"An account id, or (with state) a handle"},{"name":"reviewer","in":"query","required":false,"schema":{"type":"string"},"description":"With state: asked to review, or reviewed (a handle)"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"With state: words in the title, or #number"},{"name":"postReview","in":"query","required":false,"schema":{"enum":["true","false"]},"description":"true: live changes waiting to be reviewed after"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"description":"How many (at most 500)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next` of the page before"}],"responses":{"200":{"description":"Suggestions (with state: SuggestionListItem, people and counts)","content":{"application/json":{"schema":{"type":"object","properties":{"suggestions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Suggestion"},{"$ref":"#/components/schemas/SuggestionListItem"}]}},"people":{"type":"object","additionalProperties":true,"description":"Who is named, by account id: name and handle"},"counts":{"type":"object","properties":{"open":{"type":"integer"},"closed":{"type":"integer"}}},"next":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["suggestions","next"]}}},"headers":{"Link":{"description":"rel=\"next\": the next page","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"createSuggestion","tags":["Suggestions"],"summary":"Start a suggestion (a draft): add items to it, then submit it","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"project":{"type":"integer"}},"required":["title"]}}}},"responses":{"201":{"description":"The draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/quick":{"post":{"operationId":"suggestFix","tags":["Suggestions"],"summary":"Suggest a fix in one step: a new version of one item, with a few words on why, sent for review","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"data":{"type":"object","additionalProperties":true,"description":"The item's whole new data"},"title":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":2000}},"required":["entityId","data"]}}}},"responses":{"201":{"description":"The suggestion with its checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}":{"get":{"operationId":"getSuggestion","tags":["Suggestions"],"summary":"The review view: each item before and after, clashes with main, and the reviewer's advice (machine-written, `machine: true`)","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"responses":{"200":{"description":"The suggestion","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"operationId":"editSuggestion","tags":["Suggestions"],"summary":"Change the title or description of your suggestion (@mentions and \"Fixes #12\" are read again)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string"}}}}}},"responses":{"200":{"description":"The suggestion","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/conversation":{"get":{"operationId":"suggestionConversation","tags":["Suggestions"],"summary":"A suggestion's timeline (comments, reviews, events), the reviewers asked, and the issues it closes","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"responses":{"200":{"description":"The conversation","content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"integer"},"timeline":{"type":"array","items":{"type":"object","additionalProperties":true}},"people":{"type":"object","additionalProperties":true},"reviewRequests":{"type":"array","items":{"type":"object","additionalProperties":true}},"fixes":{"type":"array","items":{"type":"object","additionalProperties":true}},"subscribed":{"type":"boolean"}},"required":["number","timeline"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/comments":{"post":{"operationId":"commentOnSuggestion","tags":["Suggestions"],"summary":"Comment on a suggestion, answer a comment, or comment on one field of one item","description":"@handles are told (their inbox), and #12 links to that suggestion or issue.\n\nSigned in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"parent":{"type":"integer","description":"The comment this answers"},"anchor":{"type":"object","properties":{"entity":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"field":{"type":"string"}},"required":["entity","field"]}},"required":["body"]}}}},"responses":{"201":{"description":"The comment id","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/reviews":{"post":{"operationId":"reviewSuggestion","tags":["Suggestions"],"summary":"Review: approve (it goes into the catalog, where you may merge it), request changes (sent back), or comment; with comments on fields","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"enum":["approve","request_changes","comment"]},"body":{"type":"string"},"comments":{"type":"array","items":{"type":"object","properties":{"entity":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"field":{"type":"string"},"body":{"type":"string"}},"required":["entity","field","body"]}},"resolutions":{"type":"object","additionalProperties":true,"description":"For each item, how each clashing field is settled"}},"required":["verdict"]}}}},"responses":{"201":{"description":"The review, the new status, and the commit when approved","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"description":"Clashes that need a decision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/review-requests":{"post":{"operationId":"requestReview","tags":["Suggestions"],"summary":"Ask people to review (asking again asks again)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reviewers":{"type":"array","items":{"type":"string","description":"A handle"},"description":"Handles"}},"required":["reviewers"]}}}},"responses":{"201":{"description":"Who was asked","content":{"application/json":{"schema":{"type":"object","properties":{"requested":{"type":"array","items":{"type":"string"}}},"required":["requested"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/review-requests/{username}":{"delete":{"operationId":"removeReviewRequest","tags":["Suggestions"],"summary":"Stop asking someone to review","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}},{"name":"username","in":"path","required":true,"schema":{"type":"string","description":"A handle, without the @","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,38}[A-Za-z0-9]$"}}],"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/items":{"put":{"operationId":"putSuggestionItem","tags":["Suggestions"],"summary":"Add or change one item in a draft suggestion (data null deletes it)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"type":{"type":"string"},"data":{"type":["object","null"]},"path":{"type":["string","null"]}},"required":["type","data"]}}}},"responses":{"200":{"description":"The item id","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/submit":{"post":{"operationId":"submitSuggestion","tags":["Suggestions"],"summary":"Send for review (runs the automatic checks)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"responses":{"200":{"description":"The suggestion with its checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suggestion"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/approve":{"post":{"operationId":"approveSuggestion","tags":["Suggestions"],"summary":"Approve and merge (keepers of its sets, stewards)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"resolutions":{"type":"object","additionalProperties":true,"description":"For each item, how each clashing field is settled"},"note":{"type":"string"}}}}}},"responses":{"200":{"description":"The commit","content":{"application/json":{"schema":{"type":"object","properties":{"commit":{"oneOf":[{"type":"integer"},{"type":"null"}]}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"description":"Clashes that need a decision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/send-back":{"post":{"operationId":"sendBackSuggestion","tags":["Suggestions"],"summary":"Send back with a note","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"Sent back","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/review-live":{"post":{"operationId":"reviewLive","tags":["Suggestions"],"summary":"Review a live change after it went live: keep it (approve) or undo it (revert)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"enum":["approve","revert"]},"note":{"type":"string"}},"required":["verdict"]}}}},"responses":{"200":{"description":"Kept, or the suggestion that undoes it","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/withdraw":{"post":{"operationId":"withdrawSuggestion","tags":["Suggestions"],"summary":"Withdraw your suggestion","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"responses":{"200":{"description":"Withdrawn","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/{id}/revert":{"post":{"operationId":"revertSuggestion","tags":["Suggestions"],"summary":"Undo a merged suggestion (a new suggestion that reverses it)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The suggestion","minimum":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"The revert","content":{"application/json":{"schema":{"type":"object","properties":{"changeset":{"type":"integer"},"commit":{"oneOf":[{"type":"integer"},{"type":"null"}]}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/words":{"post":{"operationId":"suggestWords","tags":["Suggestions"],"summary":"A page's words fixed segment by segment: one segment's new words, a segment added after it or taken out, or a page's first words, sent for review","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"change":{"enum":["edit","add","remove","start"]},"version":{"type":"string"},"segment":{"type":"string"},"text":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Runs: { text, marks?, href? }, { note }, { marker }, { br: true }"},"before":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The segment as the person saw it; a change since answers 409"},"kind":{"enum":["paragraph","heading","verse","item"]},"language":{"type":"string"},"title":{"type":"string"},"note":{"type":"string"}},"required":["entityId","change"]}}}},"responses":{"201":{"description":"The suggestion sent for review (merged at once where its author may)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"description":"The segment changed since it was opened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/suggestions/contents-map":{"post":{"operationId":"mapContents","tags":["Suggestions"],"summary":"Map pages of a publication to the unit they hold (an existing unit, a new one, or words)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"publication":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"pages":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"},"scheme":{"enum":["printed","pdf"]}},"required":["from","to"]},"unit":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"newUnit":{"type":"object","properties":{"work":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"label":{"type":"object","additionalProperties":true},"date":{"type":"string"}}},"label":{"type":"object","additionalProperties":true}},"required":["publication","pages"]}}}},"responses":{"201":{"description":"The suggestion sent for review","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/entities/{id}/talk":{"get":{"operationId":"itemTalk","tags":["Talk"],"summary":"An item's talk page: the conversation about it","x-access":"public","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"responses":{"200":{"description":"Comments, oldest first, replies by parent","content":{"application/json":{"schema":{"type":"object","properties":{"talk":{"type":"array","items":{"$ref":"#/components/schemas/Comment"}}},"required":["talk"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"commentOnItem","tags":["Talk"],"summary":"Comment on an item's talk page","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"parent":{"type":"integer","description":"The comment this answers"}},"required":["body"]}}}},"responses":{"201":{"description":"The comment id","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/comments/{id}/hide":{"post":{"operationId":"hideComment","tags":["Talk"],"summary":"Hide a comment (its author, or a steward)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The comment","minimum":1}}],"responses":{"200":{"description":"Hidden","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/comments/{id}":{"patch":{"operationId":"editComment","tags":["Talk"],"summary":"Change your own comment (on a talk page, a suggestion or an issue)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The comment","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["body"]}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/comments/{id}/resolve":{"post":{"operationId":"resolveComment","tags":["Suggestions"],"summary":"Resolve (or unresolve) a comment on a suggestion's field","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The comment","minimum":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"boolean","description":"false to unresolve"}}}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/reports":{"post":{"operationId":"report","tags":["Reports"],"summary":"Report a problem (no account needed: a captcha and an hourly limit instead)","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"reason":{"enum":["wrong-fact","missing-page","bad-scan","audio-problem","wrong-text","duplicate","rights","offensive","other"]},"note":{"type":"string","maxLength":10000},"title":{"type":"string","description":"A title of its own, as an issue","maxLength":200},"captcha":{"type":"string","description":"A Turnstile token, when not signed in"}},"required":["reason"]}}}},"responses":{"201":{"description":"The report id, and its number as an issue (#12)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"number":{"oneOf":[{"type":"integer"},{"type":"null"}]}},"required":["id","number"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"description":"Too many reports from one address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"operationId":"listReports","tags":["Reports"],"summary":"A set's inbox of reports (stewards, and the set's keepers)","description":"Signed in: an API token (read scope is enough), or the site's session.","security":[{"token":["read"]},{"session":[]}],"x-access":"read","parameters":[{"name":"set","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"A set"},{"name":"status","in":"query","required":false,"schema":{"enum":["open","resolved","dismissed"]}}],"responses":{"200":{"description":"Reports, never who sent them","content":{"application/json":{"schema":{"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","additionalProperties":true}},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}},"required":["reports","items"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/reports/{id}/close":{"post":{"operationId":"closeReport","tags":["Reports"],"summary":"Resolve or dismiss a report (keepers)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The report","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["resolved","dismissed"]},"changeset":{"type":"integer","description":"The suggestion that fixed it"},"note":{"type":"string"}},"required":["outcome"]}}}},"responses":{"200":{"description":"Closed","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/takedowns":{"post":{"operationId":"requestTakedown","tags":["Reports"],"summary":"Ask for a file to stop being served (no account needed); stewards answer within two weeks","x-access":"public","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","description":"The address of its page, an id, or the file address"},"name":{"type":"string"},"email":{"type":"string"},"relation":{"enum":["rights-holder","family","representative","other"]},"statement":{"type":"string","minLength":10,"maxLength":4000},"captcha":{"type":"string"}},"required":["target","name","email","relation","statement"]}}}},"responses":{"201":{"description":"The request id","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"answerWithinDays":{"type":"integer"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"description":"Too many requests from one address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/teshuros/{id}/family-request":{"post":{"operationId":"familyRequest","tags":["Reports"],"summary":"A family's request that a teshura not be shown (no account needed): its scans stop being served at once, and stewards review it","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"relation":{"type":"string"},"note":{"type":"string"},"contact":{"type":"string"},"captcha":{"type":"string"}}}}}},"responses":{"201":{"description":"The report id and how many files were paused","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"integer"},"paused":{"type":"integer"}},"required":["report","paused"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"description":"Too many requests from one address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues":{"get":{"operationId":"listIssues","tags":["Issues"],"summary":"Issues, newest first, with open and closed counts; private ones only for those who may read them","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","x-paged":true,"parameters":[{"name":"state","in":"query","required":false,"schema":{"enum":["open","closed","all"]},"description":"open (the default), closed or all"},{"name":"label","in":"query","required":false,"schema":{"type":"string"},"description":"Label names, comma separated"},{"name":"type","in":"query","required":false,"schema":{"enum":["wrong-fact","missing-page","bad-scan","audio-problem","wrong-text","duplicate","rights","offensive","other"]},"description":"The kind of report"},{"name":"set","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"Only about items in this set"},{"name":"entity","in":"query","required":false,"schema":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"description":"Only about this item"},{"name":"assignee","in":"query","required":false,"schema":{"type":"string"},"description":"A handle, or none"},{"name":"author","in":"query","required":false,"schema":{"type":"string"},"description":"A handle"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Words, or #number"},{"name":"before","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Deprecated: the same as a cursor, as a number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":30},"description":"How many (at most 100)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next` of the page before"}],"responses":{"200":{"description":"A page of issues","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"people":{"type":"object","additionalProperties":true},"counts":{"type":"object","properties":{"open":{"type":"integer"},"closed":{"type":"integer"}},"required":["open","closed"]},"next":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["items","counts","next"]}}},"headers":{"Link":{"description":"rel=\"next\": the next page","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"openIssue","tags":["Issues"],"summary":"Open an issue (about an item, or the catalog at large)","description":"Reports of rights or of something offensive are private: stewards and the set's keepers read them.\n\nSigned in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","maxLength":10000},"type":{"enum":["wrong-fact","missing-page","bad-scan","audio-problem","wrong-text","duplicate","rights","offensive","other"]},"entityId":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"labels":{"type":"array","items":{"type":"string"}},"private":{"type":"boolean","description":"Keep it for stewards and keepers"}},"required":["title"]}}}},"responses":{"201":{"description":"The issue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues/templates":{"get":{"operationId":"issueTemplates","tags":["Issues"],"summary":"The kinds of issue and the words each starts with","x-access":"public","responses":{"200":{"description":"Templates","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["templates"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues/{number}":{"get":{"operationId":"getIssue","tags":["Issues"],"summary":"An issue, its timeline, what the reader may do, and the suggestions that close it","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The issue","minimum":1}}],"responses":{"200":{"description":"The issue","content":{"application/json":{"schema":{"type":"object","properties":{"issue":{"$ref":"#/components/schemas/Issue"},"rights":{"type":"object","additionalProperties":true},"timeline":{"type":"array","items":{"type":"object","additionalProperties":true}},"people":{"type":"object","additionalProperties":true}},"required":["issue"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"operationId":"editIssue","tags":["Issues"],"summary":"Change its title or words (its author, keepers, stewards)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The issue","minimum":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"body":{"type":"string"}}}}}},"responses":{"200":{"description":"The issue","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues/{number}/state":{"post":{"operationId":"setIssueState","tags":["Issues"],"summary":"Close as completed or not planned, or reopen","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The issue","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"enum":["open","completed","not_planned"]},"note":{"type":"string","maxLength":2000}},"required":["state"]}}}},"responses":{"200":{"description":"The issue","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues/{number}/labels":{"put":{"operationId":"setIssueLabels","tags":["Issues"],"summary":"Set its labels (keepers, stewards, trusted people)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The issue","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"string"}}},"required":["labels"]}}}},"responses":{"200":{"description":"The issue","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues/{number}/assignees":{"put":{"operationId":"setIssueAssignees","tags":["Issues"],"summary":"Set who it is assigned to (yourself; others when you may triage)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The issue","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assignees":{"type":"array","items":{"type":"string","description":"A handle"}}},"required":["assignees"]}}}},"responses":{"200":{"description":"The issue","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues/{number}/visibility":{"post":{"operationId":"setIssueVisibility","tags":["Issues"],"summary":"Make it private or public (stewards and keepers)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The issue","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"private":{"type":"boolean"}},"required":["private"]}}}},"responses":{"200":{"description":"The issue","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/issues/{number}/comments":{"post":{"operationId":"commentOnIssue","tags":["Issues"],"summary":"Comment on an issue, or answer a comment","description":"@handles are told (their inbox), and #12 links to that suggestion or issue.\n\nSigned in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The issue","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"parent":{"type":"integer","description":"The comment this answers"}},"required":["body"]}}}},"responses":{"201":{"description":"The comment id","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/labels":{"get":{"operationId":"listLabels","tags":["Issues"],"summary":"Every label and how many open issues carry it","x-access":"public","responses":{"200":{"description":"Labels","content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["labels"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"createLabel","tags":["Issues"],"summary":"Make a label (stewards)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9 -]{0,38}[a-z0-9]$"},"description":{"type":"string"},"color":{"type":"string","description":"Six hex digits","pattern":"^[0-9a-f]{6}$"}},"required":["name"]}}}},"responses":{"201":{"description":"The label","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/people":{"get":{"operationId":"searchPeople","tags":["People"],"summary":"People to @mention: handles that start with, or names that contain, what is typed; those in the conversation first","x-access":"public","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"What follows the @"},{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"description":"Account ids, comma separated (at most 100): who each is, instead of a search"},{"name":"thread","in":"query","required":false,"schema":{"type":"string","pattern":"^(changeset|report):[0-9]+$"},"description":"changeset:<id> or report:<id>"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":20,"default":8},"description":"How many (at most 20)"}],"responses":{"200":{"description":"People","content":{"application/json":{"schema":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["people"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/people/{username}":{"get":{"operationId":"getProfile","tags":["People"],"summary":"A person's public page: who they are, their counts and recent activity (an old handle finds them too, with `movedFrom`)","x-access":"public","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","description":"A handle, without the @","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,38}[A-Za-z0-9]$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":30},"description":"How many (at most 100)"}],"responses":{"200":{"description":"The profile","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/threads":{"get":{"operationId":"searchThreads","tags":["People"],"summary":"Suggestions and issues to #mention, by number or words","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"What follows the #"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":20,"default":8},"description":"How many (at most 20)"}],"responses":{"200":{"description":"Threads","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["changeset","report"]},"number":{"type":"integer"},"title":{"type":"string"},"state":{"type":"string"}}}}},"required":["threads"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/threads/{number}":{"get":{"operationId":"threadByNumber","tags":["People"],"summary":"Which of the two #12 is: a suggestion or an issue, and its id","description":"No account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"integer","description":"The number after #","minimum":1}}],"responses":{"200":{"description":"What it is","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["suggestion","issue"]},"number":{"type":"integer"},"id":{"type":"integer"}},"required":["kind","number","id"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/inbox":{"get":{"operationId":"inbox","tags":["Inbox"],"summary":"Your inbox, newest first: mentions, review requests, assignments and what you follow","description":"Signed in: an API token (read scope is enough), or the site's session.","security":[{"token":["read"]},{"session":[]}],"x-access":"read","x-paged":true,"parameters":[{"name":"filter","in":"query","required":false,"schema":{"enum":["unread","all","mention","review_requested","assigned","author","comment","review","state","followed"]},"description":"unread, all, or one reason"},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Deprecated: lines older than this time; use cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"How many (at most 100)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next` of the page before"}],"responses":{"200":{"description":"Inbox lines and the unread count","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InboxLine"}},"unread":{"type":"integer"},"next":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["items","unread","next"]}}},"headers":{"Link":{"description":"rel=\"next\": the next page","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/inbox/count":{"get":{"operationId":"inboxCount","tags":["Inbox"],"summary":"How many inbox lines are unread","description":"Signed in: an API token (read scope is enough), or the site's session.","security":[{"token":["read"]},{"session":[]}],"x-access":"read","responses":{"200":{"description":"The count","content":{"application/json":{"schema":{"type":"object","properties":{"unread":{"type":"integer"}},"required":["unread"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/inbox/read":{"post":{"operationId":"markInboxRead","tags":["Inbox"],"summary":"Mark inbox lines read (or unread): by id, by conversation, or all","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer"}},"subject":{"type":"object","properties":{"kind":{"enum":["changeset","report","entity","project"]},"id":{"type":"string"}},"required":["kind","id"]},"all":{"type":"boolean"},"unread":{"type":"boolean","description":"true: mark them unread"}}}}}},"responses":{"200":{"description":"How many changed, and the unread count","content":{"application/json":{"schema":{"type":"object","properties":{"changed":{"type":"integer"},"unread":{"type":"integer"}},"required":["changed","unread"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/projects":{"get":{"operationId":"listProjects","tags":["Projects"],"summary":"Projects working through a gap, with their progress","x-access":"public","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["open","merged","closed"]}}],"responses":{"200":{"description":"Projects","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["projects"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"createProject","tags":["Projects"],"summary":"Open a project on a gap (farbrengens without recordings or texts, recordings to sync, pages to proofread)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9-]+$"},"name":{"type":"string"},"goal":{"type":"string"},"set":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"missing":{"enum":["recordings","texts","sync","proofreading"]},"within":{"type":"string"},"scan":{"type":"string","description":"A permanent id: rh- and letters and digits (read forgivingly: RH-7K2M-9Q4D works)","pattern":"^[rR][hH]-[0-9A-Za-z-]+$","examples":["rh-7k2m9q4d"]},"level":{"enum":[1,2]}},"required":["slug","name"]}}}},"responses":{"201":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"slug":{"type":"string"}},"required":["id","slug"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/projects/{slug}":{"get":{"operationId":"getProject","tags":["Projects"],"summary":"A project, its progress and what is left to do","x-access":"public","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","description":"A project's short name","pattern":"^[a-z0-9-]+$"}}],"responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","additionalProperties":true},"next":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"todo":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["project","next","todo"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/projects/{slug}/next":{"post":{"operationId":"claimNext","tags":["Projects"],"summary":"Hand me the next item nobody holds (held for you for a few hours)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","description":"A project's short name","pattern":"^[a-z0-9-]+$"}}],"responses":{"200":{"description":"The item, or null","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["item"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/projects/{slug}/release":{"post":{"operationId":"releaseClaim","tags":["Projects"],"summary":"Let go of an item you held","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","description":"A project's short name","pattern":"^[a-z0-9-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string"}},"required":["item"]}}}},"responses":{"200":{"description":"Released","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/projects/{slug}/close":{"post":{"operationId":"closeProject","tags":["Projects"],"summary":"Close a project (its keepers, stewards)","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","description":"A project's short name","pattern":"^[a-z0-9-]+$"}}],"responses":{"200":{"description":"Closed","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/follows":{"get":{"operationId":"listFollows","tags":["Personal"],"summary":"What you follow, the items themselves, and what changed in them lately","description":"Signed in: an API token (read scope is enough), or the site's session.","security":[{"token":["read"]},{"session":[]}],"x-access":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"How many (at most 100)"}],"responses":{"200":{"description":"Follows and the feed","content":{"application/json":{"schema":{"type":"object","properties":{"follows":{"type":"array","items":{"type":"object","additionalProperties":true}},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"feed":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["follows","items","feed"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"follow","tags":["Personal"],"summary":"Follow or unfollow an item, set, project, suggestion or issue","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["entity","set","project","changeset","report"]},"id":{"type":"string"},"on":{"type":"boolean","description":"false to unfollow"}},"required":["kind","id"]}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/places":{"get":{"operationId":"listPlaces","tags":["Personal"],"summary":"Where you stopped reading and listening lately (never cached)","description":"Signed in: an API token (read scope is enough), or the site's session.","security":[{"token":["read"]},{"session":[]}],"x-access":"read","parameters":[{"name":"kind","in":"query","required":false,"schema":{"enum":["read","listen"]}},{"name":"key","in":"query","required":false,"schema":{"type":"string"},"description":"One thing only"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":60,"default":20},"description":"How many (at most 60)"}],"responses":{"200":{"description":"Places","content":{"application/json":{"schema":{"type":"object","properties":{"places":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["places"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"savePlace","tags":["Personal"],"summary":"Keep where you stopped in one thing","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["read","listen"]},"key":{"type":"string"},"title":{"type":"string"},"sub":{"type":"string"},"href":{"type":"string"},"place":{"type":"object","additionalProperties":true}},"required":["kind","key","title","href","place"]}}}},"responses":{"200":{"description":"The place kept","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"operationId":"forgetPlace","tags":["Personal"],"summary":"Forget one place","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"kind","in":"query","required":true,"schema":{"enum":["read","listen"]}},{"name":"key","in":"query","required":true,"schema":{"type":"string"},"description":"The thing"}],"responses":{"200":{"description":"Forgotten","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/webhooks":{"get":{"operationId":"listWebhooks","tags":["Webhooks"],"summary":"Your webhooks: addresses every merge is posted to","description":"Signed in: an API token (read scope is enough), or the site's session.","security":[{"token":["read"]},{"session":[]}],"x-access":"read","responses":{"200":{"description":"Webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["webhooks"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"createWebhook","tags":["Webhooks"],"summary":"Add a webhook (up to five); its signing secret is shown this once","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"https://…","format":"uri"}},"required":["url"]}}}},"responses":{"201":{"description":"The webhook and its secret","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","tags":["Webhooks"],"summary":"Remove a webhook","description":"Signed in: an API token with the write scope, or the site's session.","security":[{"token":["write"]},{"session":[]}],"x-access":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"The webhook","minimum":1}}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/tokens":{"get":{"operationId":"listTokens","tags":["Tokens"],"summary":"Your API tokens (their prefixes only), revoked ones marked","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/ApiToken"}}},"required":["tokens"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"createToken","tags":["Tokens"],"summary":"Make an API token; the token itself is shown this once","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What uses it","minLength":1,"maxLength":80},"scopes":{"type":"array","items":{"enum":["read","write"]},"description":"Default: read"},"expiresInDays":{"type":"integer","minimum":1,"maximum":3650}},"required":["name"]}}}},"responses":{"201":{"description":"The token, and what is kept of it","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiToken"},{"type":"object","properties":{"token":{"type":"string","description":"rhp_… - keep it secret"}},"required":["token"]}]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/tokens/{id}":{"delete":{"operationId":"revokeToken","tags":["Tokens"],"summary":"Revoke a token; it stops working at once","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^tok-[\\w-]+$"}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/mirrors":{"get":{"operationId":"mirrors","tags":["Mirrors"],"summary":"Everything a mirror needs: the git mirror, the release keys, every edition and its dumps","x-access":"public","responses":{"200":{"description":"Mirrors","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/editions":{"get":{"operationId":"editions","tags":["Mirrors"],"summary":"Catalog editions (dated snapshots) and their dumps, each with its size, sha256 and address","x-access":"public","responses":{"200":{"description":"Editions","content":{"application/json":{"schema":{"type":"object","properties":{"editions":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["editions"]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/editions/{tag}/manifest.json":{"get":{"operationId":"editionManifest","tags":["Mirrors"],"summary":"An edition's signed manifest (Ed25519), exactly as signed","x-access":"public","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","examples":["2026.40"]}}],"responses":{"200":{"description":"The manifest","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/editions/{tag}/SHA256SUMS":{"get":{"operationId":"editionChecksums","tags":["Mirrors"],"summary":"An edition's checksums, for sha256sum -c","x-access":"public","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Checksums","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/dumps/{tag}/{name}":{"get":{"operationId":"getDump","tags":["Mirrors"],"summary":"One of an edition's dumps (SQLite, JSON Lines, Parquet)","x-access":"public","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The dump","content":{"application/octet-stream":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/oai":{"get":{"operationId":"oai","tags":["Libraries"],"summary":"OAI-PMH 2.0 for libraries (oai_dc records), when switched on","x-access":"public","parameters":[{"name":"verb","in":"query","required":true,"schema":{"enum":["Identify","ListMetadataFormats","ListSets","ListIdentifiers","ListRecords","GetRecord"]}},{"name":"metadataPrefix","in":"query","required":false,"schema":{"type":"string"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"until","in":"query","required":false,"schema":{"type":"string"}},{"name":"set","in":"query","required":false,"schema":{"type":"string"}},{"name":"resumptionToken","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OAI-PMH XML","content":{"text/xml":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"oaiPost","tags":["Libraries"],"summary":"OAI-PMH, the same arguments sent as a form","x-access":"public","requestBody":{"required":true,"description":"verb and the other arguments","content":{"application/x-www-form-urlencoded":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"OAI-PMH XML","content":{"text/xml":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/mcp":{"post":{"operationId":"mcp","tags":["Agents"],"summary":"The Model Context Protocol server (Streamable HTTP, JSON answers, no sessions)","description":"Tools: search, get_item, list_children, get_text, suggest_fix (with a write token). Send JSON-RPC 2.0; see docs/developers/agents.md.\n\nNo account needed; signed in, a little more.","security":[{},{"token":[]},{"session":[]}],"x-access":"optional","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"A JSON-RPC 2.0 message, or a batch"}}}},"responses":{"200":{"description":"The JSON-RPC answer","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"202":{"description":"Only notifications were sent: nothing to answer"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"operationId":"mcpStream","tags":["Agents"],"summary":"Not offered: this server opens no event stream","x-access":"public","responses":{"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"405":{"description":"POST only"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"operationId":"mcpEnd","tags":["Agents"],"summary":"Not offered: there are no sessions to end","x-access":"public","responses":{"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"405":{"description":"POST only"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/me":{"get":{"operationId":"me","tags":["Sign-in"],"summary":"Who is signed in, with their passkeys, Google accounts, emails and notifications","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","responses":{"200":{"description":"The person, or null","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/passkey/register/options":{"post":{"operationId":"passkeyRegisterOptions","tags":["Sign-in"],"summary":"A new account: the options for making a passkey","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string","description":"A handle; else one is made from the name"}},"required":["name"]}}}},"responses":{"200":{"description":"WebAuthn options and a challenge id","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/passkey/register/verify":{"post":{"operationId":"passkeyRegisterVerify","tags":["Sign-in"],"summary":"A new account: the passkey made, checked; signs in","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"201":{"description":"The person","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/passkey/add/options":{"post":{"operationId":"passkeyAddOptions","tags":["Sign-in"],"summary":"Another passkey for this account: its options","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","responses":{"200":{"description":"WebAuthn options","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/passkey/add/verify":{"post":{"operationId":"passkeyAddVerify","tags":["Sign-in"],"summary":"Another passkey for this account, checked and kept","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/username":{"get":{"operationId":"checkUsername","tags":["Sign-in"],"summary":"Whether a handle can be had, and a free one suggested from a name","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"The handle wanted"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"A name to suggest one from"}],"responses":{"200":{"description":"Whether it is free, why not, and a suggestion","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"setUsername","tags":["Sign-in"],"summary":"Choose a new handle; the old one keeps leading to you (never with a token)","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"}},"required":["username"]}}}},"responses":{"200":{"description":"The person","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/name":{"post":{"operationId":"rename","tags":["Sign-in"],"summary":"Change the name you go by","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"The person","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/passkey/sign-in/options":{"post":{"operationId":"passkeySignInOptions","tags":["Sign-in"],"summary":"Signing in with a passkey: its options","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","responses":{"200":{"description":"WebAuthn options","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/passkey/sign-in/verify":{"post":{"operationId":"passkeySignInVerify","tags":["Sign-in"],"summary":"Signing in with a passkey: checked; signs in","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"The person","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/google/start":{"get":{"operationId":"googleStart","tags":["Sign-in"],"summary":"Signing in with Google: off to Google","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"return","in":"query","required":false,"schema":{"type":"string"},"description":"Where on the site to come back to"}],"responses":{"302":{"description":"To Google"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/google/callback":{"get":{"operationId":"googleCallback","tags":["Sign-in"],"summary":"Signing in with Google: back from Google","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"code","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"302":{"description":"Back to the site, signed in"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/email/start":{"post":{"operationId":"emailStart","tags":["Sign-in"],"summary":"Signing in by email: send a link","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"return":{"type":"string"},"lang":{"type":"string"}},"required":["email"]}}}},"responses":{"200":{"description":"Sent","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"description":"Too many links for this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/email/check":{"post":{"operationId":"emailCheck","tags":["Sign-in"],"summary":"Signing in by email: what a link is for, before using it","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"The address and whether it has an account","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/email/verify":{"post":{"operationId":"emailVerify","tags":["Sign-in"],"summary":"Signing in by email: use the link; signs in","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"name":{"type":"string"},"username":{"type":"string","description":"For a new account: a handle"}},"required":["token"]}}}},"responses":{"200":{"description":"The person","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/notifications":{"post":{"operationId":"setNotifications","tags":["Sign-in"],"summary":"Email about what you follow: off, a daily digest, or at once","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"enum":["off","daily","immediate"]},"email":{"type":"string"},"lang":{"type":"string"}},"required":["mode"]}}}},"responses":{"200":{"description":"The setting","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/email/unsubscribe":{"post":{"operationId":"unsubscribe","tags":["Sign-in"],"summary":"Stop email updates, from the link in any of them (no sign-in)","x-access":"public","parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"Stopped","content":{"application/json":{"schema":{"type":"object","properties":{"stopped":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/sign-out":{"post":{"operationId":"signOut","tags":["Sign-in"],"summary":"Sign out this browser","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","responses":{"200":{"description":"Signed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/people":{"get":{"operationId":"listPeople","tags":["Stewards"],"summary":"Everyone with an account (stewards)","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"A name or id"}],"responses":{"200":{"description":"People","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/people/{id}/role":{"post":{"operationId":"setRole","tags":["Stewards"],"summary":"Appoint or remove a steward or admin (admins)","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^u-[0-9a-z]+$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"steward":{"type":"boolean"},"admin":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/people/{id}/suspend":{"post":{"operationId":"suspend","tags":["Stewards"],"summary":"Suspend or restore an account (its API tokens are revoked)","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^u-[0-9a-z]+$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"on":{"type":"boolean"},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/takedowns":{"get":{"operationId":"listTakedowns","tags":["Stewards"],"summary":"Takedown requests, with the files each points at","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["open","resolved","dismissed"]}}],"responses":{"200":{"description":"Takedowns","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/files/{sha256}/takedown":{"post":{"operationId":"takeDown","tags":["Stewards"],"summary":"Take a file down: kept privately, no longer served","description":"Only from the site's own pages, signed in; an API token cannot do this.","security":[{"session":[]}],"x-access":"site","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string","description":"A file, named by its sha256","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"integer"}}}}}},"responses":{"200":{"description":"Taken down","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"default":{"description":"Any other error, in the same shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}