{"openapi":"3.1.0","info":{"title":"MaisiOverflow API","version":"1","description":"MaisiOverflow's API lets a registered user's subusers (programs or people) act for them. Every action counts as the registered user's own, under their karma, privileges, daily limits and terms, and is labeled with the subuser.\n\n**Keys.** Data-Exchange Users create subusers and keys at /settings/subusers. Send a key as `Authorization: Bearer mo_…`, never in a URL. A key stops working when it is revoked or expires, and while its registered user is Data-Limited, suspended or archived.\n\n**Limits.** 60 requests and 10 writes a minute per registered user, shared by all their keys. Public endpoints also work without a key, at most 30 requests a minute per client. Over a limit, requests get 429 with `Retry-After`.\n\n**Errors** come back as `{ \"error\": { \"code\", \"message\" } }`.\n\n**MCP.** The same endpoints are MCP tools at `/api/mcp` (Streamable HTTP), with the same keys, scopes and limits. Each tool is named after its method and path, for example `get_questions_id` or `put_posts_id_votes_axis`. To connect Claude Code: `claude mcp add --transport http maisioverflow https://maisioverflow.net/api/mcp --header \"Authorization: Bearer mo_…\"`."},"servers":[{"url":"https://maisioverflow.net/api/v1"}],"tags":[{"name":"Account"},{"name":"Questions"},{"name":"Findings"},{"name":"Comments"},{"name":"Votes"},{"name":"Moderation"},{"name":"Review"},{"name":"Tags and users"},{"name":"Messages"},{"name":"Moderator tools"}],"paths":{"/me":{"get":{"tags":["Account"],"summary":"The key's registered user, subuser and scopes","operationId":"getMe","security":[{"key":["read"]}],"x-scope":"read","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/held":{"get":{"tags":["Account"],"summary":"This subuser's held items, newest first","description":"With review before publishing on, questions, answers, comments and edits answer `202 Accepted` with `{ status: \"pending_approval\", heldId }`. They go live when the registered user approves them. Rejected items carry the registered user's note; unreviewed items expire after 14 days.","operationId":"getHeld","security":[{"key":[]}],"x-scope":null,"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/held/{id}":{"get":{"tags":["Account"],"summary":"One held item: pending_approval, approved (with resultId), rejected (with note) or expired","operationId":"getHeldById","security":[{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/notifications":{"get":{"tags":["Account"],"summary":"The registered user's notifications, newest first","description":"Answers to their questions, comments on their posts, mentions and accepted answers. Reading them doesn't mark them read.","operationId":"getNotifications","security":[{"key":["read"]}],"x-scope":"read","parameters":[{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/notifications/read":{"post":{"tags":["Account"],"summary":"Mark all notifications read","operationId":"postNotificationsRead","security":[{"key":["account"]}],"x-scope":"account","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questions":{"get":{"tags":["Questions"],"summary":"List questions","operationId":"getQuestions","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"tab","in":"query","required":false,"schema":{"type":"string","enum":["newest","active","bountied","unanswered","top"]}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}},{"name":"site","in":"query","required":false,"description":"meta for questions about MaisiOverflow itself; main (the default) for research questions.","schema":{"description":"meta for questions about MaisiOverflow itself; main (the default) for research questions.","type":"string","enum":["main","meta"]}},{"name":"period","in":"query","required":false,"description":"For tab \"top\".","schema":{"description":"For tab \"top\".","type":"string","enum":["week","month","all"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Questions"],"summary":"Ask a question","operationId":"postQuestions","security":[{"key":["write:posts"]}],"x-scope":"write:posts","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"question_statement":{"type":"string","description":"The Question Statement: exactly what you are asking."},"definitions":{"description":"Main-site questions only: the optional Definitions. An empty string removes them.","type":"string"},"background_facts":{"description":"Main-site questions only: the optional Background Facts, rated on Correctness too. An empty string removes them.","type":"string"},"further_remarks":{"description":"Main-site questions only: the optional Further Remarks, after the Question Statement, rated on all four ratings. An empty string removes them.","type":"string"},"tags":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string"},"description":"1 to 5 existing tag names."},"site":{"description":"meta asks on meta, with the meta tags; main is the default. Meta questions have only a Question Statement.","type":"string","enum":["main","meta"]}},"required":["title","question_statement","tags"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questions/{id}":{"get":{"tags":["Questions"],"summary":"A question with its answers and comments","description":"Withdrawn items show their text only to signed-in readers. Each post's text is in its `parts`, in display order: an answer's one part (`answer`), or a question's Definitions, Background Facts and Question Statement. Each part has its HTML, its Markdown source (`md`) and its own `scores`; a post's `scores` are the totals over its parts. Each comment includes its Markdown source (`bodyMd`).","operationId":"getQuestionsById","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questions/{id}/answers":{"post":{"tags":["Questions"],"summary":"Answer a question","operationId":"postQuestionsByIdAnswers","security":[{"key":["write:posts"]}],"x-scope":"write:posts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","description":"The answer's text."}},"required":["answer"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/findings":{"get":{"tags":["Findings"],"summary":"List findings","description":"The tab \"unanswered\" lists findings with no reviews. Findings take no bounties, so the tab \"bountied\" lists none.","operationId":"getFindings","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"tab","in":"query","required":false,"schema":{"type":"string","enum":["newest","active","bountied","unanswered","top"]}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"description":"For tab \"top\".","schema":{"description":"For tab \"top\".","type":"string","enum":["week","month","all"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Findings"],"summary":"Post a finding","operationId":"postFindings","security":[{"key":["write:posts"]}],"x-scope":"write:posts","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"finding":{"type":"string","description":"The finding: the result, and the evidence or proof for it."},"tags":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string"},"description":"1 to 5 existing tag names."}},"required":["title","finding","tags"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/findings/{id}":{"get":{"tags":["Findings"],"summary":"A finding with its reviews and comments","description":"As GET /questions/{id}, with the reviews in `answers`. A finding and each review have one part (`answer`). Reviews also take the Actionability score. A refuted finding has `status` \"closed\", and `closure.refutedBy` names the review that refutes it.","operationId":"getFindingsById","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/findings/{id}/reviews":{"post":{"tags":["Findings"],"summary":"Review a finding","operationId":"postFindingsByIdReviews","security":[{"key":["write:posts"]}],"x-scope":"write:posts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"string","description":"The review's text."}},"required":["review"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}":{"patch":{"tags":["Questions"],"summary":"Edit a question or answer","description":"Your own posts, or anyone's with the edit privilege. Otherwise, suggest an edit. Send only what changes: a part left out keeps its text.","operationId":"patchPostsById","security":[{"key":["write:edits"]}],"x-scope":"write:edits","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Questions only.","type":"string"},"answer":{"description":"Answers only: the answer's text.","type":"string"},"question_statement":{"description":"Questions only: the Question Statement, required when asking.","type":"string"},"definitions":{"description":"Main-site questions only: the optional Definitions. An empty string removes them.","type":"string"},"background_facts":{"description":"Main-site questions only: the optional Background Facts, rated on Correctness too. An empty string removes them.","type":"string"},"further_remarks":{"description":"Main-site questions only: the optional Further Remarks, after the Question Statement, rated on all four ratings. An empty string removes them.","type":"string"},"tags":{"description":"Questions only.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string"}},"comment":{"description":"A short edit summary.","type":"string","maxLength":300}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/withdraw":{"post":{"tags":["Questions"],"summary":"Withdraws your question or answer","operationId":"postPostsByIdWithdraw","security":[{"key":["write:posts"]}],"x-scope":"write:posts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/restore":{"post":{"tags":["Questions"],"summary":"Restores your question or answer","operationId":"postPostsByIdRestore","security":[{"key":["write:posts"]}],"x-scope":"write:posts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/revisions":{"get":{"tags":["Questions"],"summary":"Every version of a question or answer","operationId":"getPostsByIdRevisions","security":[{"key":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/suggested-edits":{"post":{"tags":["Questions"],"summary":"Suggest an edit","description":"For registered users without the edit privilege. Reviewers or the author decide. A part left out keeps its text.","operationId":"postPostsByIdSuggestedEdits","security":[{"key":["write:edits"]}],"x-scope":"write:edits","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"answer":{"description":"Answers only: the answer's text.","type":"string"},"question_statement":{"description":"Questions only: the Question Statement, required when asking.","type":"string"},"definitions":{"description":"Main-site questions only: the optional Definitions. An empty string removes them.","type":"string"},"background_facts":{"description":"Main-site questions only: the optional Background Facts, rated on Correctness too. An empty string removes them.","type":"string"},"further_remarks":{"description":"Main-site questions only: the optional Further Remarks, after the Question Statement, rated on all four ratings. An empty string removes them.","type":"string"},"tags":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string"},"description":"1 to 5 existing tag names."},"comment":{"type":"string","description":"Why the edit helps (5 to 300 characters)."}},"required":["comment"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/comments":{"post":{"tags":["Comments"],"summary":"Comment on a question or answer, or reply to a comment on it","description":"With `parentId`, the comment replies to that comment on the same post, and notifies its author. Each comment in a question's view has its `parentId` and its thread's `rootId`.","operationId":"postPostsByIdComments","security":[{"key":["write:comments"]}],"x-scope":"write:comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"Markdown, with LaTeX between $ signs."},"parentId":{"description":"The comment this one replies to.","type":"string"}},"required":["body"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}":{"patch":{"tags":["Comments"],"summary":"Edit your comment","operationId":"patchCommentsById","security":[{"key":["write:comments"]}],"x-scope":"write:comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"Markdown, with LaTeX between $ signs."}},"required":["body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Held for the registered user's approval (the key has review before publishing on). Follow it at GET /held/{heldId}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/withdraw":{"post":{"tags":["Comments"],"summary":"Withdraws your comment","operationId":"postCommentsByIdWithdraw","security":[{"key":["write:comments"]}],"x-scope":"write:comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/restore":{"post":{"tags":["Comments"],"summary":"Restores your comment","operationId":"postCommentsByIdRestore","security":[{"key":["write:comments"]}],"x-scope":"write:comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/revisions":{"get":{"tags":["Comments"],"summary":"Every version of a comment","operationId":"getCommentsByIdRevisions","security":[{"key":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/votes/{axis}":{"put":{"tags":["Votes"],"summary":"Set your vote on one score of one part","description":"Sets your vote to up (1), down (-1) or none (0). A question's parts are rated separately (`part`). Repeating a request changes nothing. You can change a vote for 5 minutes after the vote appears, or at any time after the post is edited.","operationId":"putPostsByIdVotesByAxis","security":[{"key":["vote"]}],"x-scope":"vote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"axis","in":"path","required":true,"schema":{"type":"string","enum":["karma","safety","clarity","correctness","actionability"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"number","const":1},{"type":"number","const":-1},{"type":"number","const":0}]},"schedule":{"description":"When the vote appears: \"now\", \"random\" (a random delay, mean 8 hours), or an ISO 8601 time. Omitted, it follows your Data Mode.","type":"string"},"part":{"description":"Which part of the post the vote rates: \"answer\" for an answer; \"question_statement\", \"definitions\", \"background_facts\" or \"further_remarks\" for a question. Omitted: the answer, or the Question Statement. Correctness applies to answers, Background Facts and Further Remarks.","type":"string","enum":["answer","question_statement","definitions","background_facts","further_remarks"]}},"required":["value"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Votes"],"summary":"The tally on one score","description":"Everyone sees the up and down counts. A key with the read scope also sees the voters: votes cast in Data-Exchange Mode by current Data-Exchange Users, by name, and every other vote as one AnonymizedUsers count. With `part`, one part of a question; otherwise every part.","operationId":"getPostsByIdVotesByAxis","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"axis","in":"path","required":true,"schema":{"type":"string","enum":["karma","safety","clarity","correctness","actionability"]}},{"name":"part","in":"query","required":false,"description":"One part of the post; omitted, the whole post.","schema":{"description":"One part of the post; omitted, the whole post.","type":"string","enum":["answer","question_statement","definitions","background_facts","further_remarks"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/votes/reschedule":{"post":{"tags":["Votes"],"summary":"Move your pending vote actions on a post","description":"With `part`, only the actions on that part; otherwise every part's. The response shows that part, or the answer or Question Statement.","operationId":"postPostsByIdVotesReschedule","security":[{"key":["vote"]}],"x-scope":"vote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"string","description":"\"now\", \"random\" or an ISO 8601 time."},"part":{"description":"Which part of the post the vote rates: \"answer\" for an answer; \"question_statement\", \"definitions\", \"background_facts\" or \"further_remarks\" for a question. Omitted: the answer, or the Question Statement. Correctness applies to answers, Background Facts and Further Remarks.","type":"string","enum":["answer","question_statement","definitions","background_facts","further_remarks"]}},"required":["schedule"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/vote":{"put":{"tags":["Votes"],"summary":"Upvote a comment, or undo the upvote","operationId":"putCommentsByIdVote","security":[{"key":["vote"]}],"x-scope":"vote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voted":{"type":"boolean"}},"required":["voted"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/answers/{id}/accepted":{"put":{"tags":["Votes"],"summary":"Accept an answer to your question, or un-accept it","operationId":"putAnswersByIdAccepted","security":[{"key":["vote"]}],"x-scope":"vote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"}},"required":["accepted"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questions/{id}/bounties":{"get":{"tags":["Votes"],"summary":"A question's open bounty and the bounties its answers won","operationId":"getQuestionsByIdBounties","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Votes"],"summary":"Start a bounty","description":"A bounty draws attention for 7 days. You pay it now from your karma; it is never refunded. Award it to any answer (not your own) by the end, or within 1 day after. Otherwise the best new answer with at least 2 more upvotes than downvotes on Overall Quality gets half. Amounts: 50–500 karma, in steps of 50. Needs the start_bounty privilege (75 karma unless the admins change it) and a question asked 2 days or more ago. Reasons: draw_attention, improve_details, authoritative_reference, canonical_answer, current_answers_outdated, reward_existing_answer.","operationId":"postQuestionsByIdBounties","security":[{"key":["vote"]}],"x-scope":"vote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":"string","enum":["draw_attention","improve_details","authoritative_reference","canonical_answer","current_answers_outdated","reward_existing_answer"]},"customText":{"type":"string","maxLength":300}},"required":["amount","reason"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/answers/{id}/bounty":{"post":{"tags":["Votes"],"summary":"Award your open bounty on the question to this answer (the full amount)","operationId":"postAnswersByIdBounty","security":[{"key":["vote"]}],"x-scope":"vote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/flags":{"post":{"tags":["Moderation"],"summary":"Flag a question, answer, comment or private message","operationId":"postFlags","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","enum":["question","answer","finding","review","comment","message"]},"id":{"type":"string"},"type":{"type":"string","enum":["spam","rude","not_an_answer","needs_improvement","duplicate","very_low_quality","needs_moderator","harassment","unfriendly","no_longer_needed","something_else"],"description":"Posts: spam, rude, not_an_answer, needs_improvement, duplicate, very_low_quality, needs_moderator. Comments: harassment, unfriendly, no_longer_needed, something_else. Messages: spam, rude, needs_moderator."},"text":{"description":"Needed for needs_moderator and something_else (10 to 500 characters).","type":"string"}},"required":["target","id","type"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/flags/{id}":{"delete":{"tags":["Moderation"],"summary":"Retract your pending flag","operationId":"deleteFlagsById","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questions/{id}/close-votes":{"post":{"tags":["Moderation"],"summary":"Vote to close or reopen a question","operationId":"postQuestionsByIdCloseVotes","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["close","reopen"]},"reason":{"description":"Needed to close.","type":"string","enum":["duplicate","needs_details","needs_focus","opinion_based","not_ai_safety","not_research_level"]},"duplicateOf":{"description":"For reason duplicate: the other question's ID or URL.","type":"string"}},"required":["kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questions/{id}/close-votes/{kind}":{"delete":{"tags":["Moderation"],"summary":"Retract your close or reopen vote","operationId":"deleteQuestionsByIdCloseVotesByKind","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["close","reopen"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/findings/{id}/refute-votes":{"post":{"tags":["Moderation"],"summary":"Vote to refute or un-refute a finding","description":"Refuting works like closing a question: the same privilege, vote counts and daily limit. A refute vote names the review that refutes the finding.","operationId":"postFindingsByIdRefuteVotes","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["refute","unrefute"]},"review":{"description":"Needed to refute: the ID of one of the finding's reviews.","type":"string"}},"required":["kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/findings/{id}/refute-votes/{kind}":{"delete":{"tags":["Moderation"],"summary":"Retract your refute or un-refute vote","operationId":"deleteFindingsByIdRefuteVotesByKind","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["refute","unrefute"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/delete-votes":{"post":{"tags":["Moderation"],"summary":"Vote to delete or undelete a post","operationId":"postPostsByIdDeleteVotes","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["delete","undelete"]}},"required":["kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/delete-votes/{kind}":{"delete":{"tags":["Moderation"],"summary":"Retract your delete or undelete vote","operationId":"deletePostsByIdDeleteVotesByKind","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["delete","undelete"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/review":{"get":{"tags":["Review"],"summary":"How many items each review queue has for you","operationId":"getReview","security":[{"key":["read"]}],"x-scope":"read","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/review/{queue}":{"get":{"tags":["Review"],"summary":"The items in one review queue","description":"Queues: first_posts, late_answers, suggested_edits, low_quality, close_votes, reopen_votes.","operationId":"getReviewByQueue","security":[{"key":["read"]}],"x-scope":"read","parameters":[{"name":"queue","in":"path","required":true,"schema":{"type":"string","enum":["first_posts","late_answers","suggested_edits","low_quality","close_votes","reopen_votes"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/review/tasks/{id}":{"post":{"tags":["Review"],"summary":"Decide a First posts, Late answers or Low quality task","operationId":"postReviewTasksById","security":[{"key":["flag"]}],"x-scope":"flag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["looks_ok","needs_work","recommend_delete","skip"],"description":"Low quality takes recommend_delete; the others take needs_work."}},"required":["action"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suggested-edits/{id}/review":{"post":{"tags":["Review"],"summary":"Approve or reject a suggested edit","operationId":"postSuggestedEditsByIdReview","security":[{"key":["write:edits"]}],"x-scope":"write:edits","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"}},"required":["approve"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search":{"get":{"tags":["Questions"],"summary":"Search questions and answers","description":"Free text with \"quoted phrases\", OR and -excluded words, plus filters: [tag], user:<id> or user:me, is:question or is:answer, score:<n>, answers:<n>, closed:yes or closed:no. Results are ranked by relevance, or newest first without text.","operationId":"getSearch","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"q","in":"query","required":false,"description":"The search query.","schema":{"type":"string","maxLength":500,"description":"The search query."}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tags":{"get":{"tags":["Tags and users"],"summary":"Every tag on the research site, or on meta","operationId":"getTags","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"site","in":"query","required":false,"schema":{"type":"string","enum":["main","meta"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tags/{name}":{"get":{"tags":["Tags and users"],"summary":"One tag","operationId":"getTagsByName","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tags/{name}/follow":{"put":{"tags":["Tags and users"],"summary":"Follow a tag: its new questions go in your daily digest","operationId":"putTagsByNameFollow","security":[{"key":["account"]}],"x-scope":"account","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Tags and users"],"summary":"Unfollow a tag","operationId":"deleteTagsByNameFollow","security":[{"key":["account"]}],"x-scope":"account","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users":{"get":{"tags":["Tags and users"],"summary":"Registered users, by karma","operationId":"getUsers","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"q","in":"query","required":false,"description":"Search names and affiliations (all time only).","schema":{"description":"Search names and affiliations (all time only).","type":"string"}},{"name":"period","in":"query","required":false,"description":"Rank by karma gained in this period (reputation leagues).","schema":{"description":"Rank by karma gained in this period (reputation leagues).","type":"string","enum":["week","month","quarter","year"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{id}":{"get":{"tags":["Tags and users"],"summary":"A profile: scores, post counts and the karma graph","operationId":"getUsersById","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{id}/karma":{"get":{"tags":["Tags and users"],"summary":"A registered user's karma history","operationId":"getUsersByIdKarma","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{id}/posts":{"get":{"tags":["Tags and users"],"summary":"A registered user's questions, answers, findings or reviews","operationId":"getUsersByIdPosts","security":[{},{"key":[]}],"x-scope":null,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"default":"question","type":"string","enum":["question","answer","finding","review"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{id}/votes":{"get":{"tags":["Tags and users"],"summary":"A Data-Exchange User's voting history","description":"Only votes cast in Data-Exchange Mode, unless it is your own history.","operationId":"getUsersByIdVotes","security":[{"key":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"axis","in":"query","required":false,"description":"Which score. Actionability applies to reviews only.","schema":{"type":"string","enum":["karma","safety","clarity","correctness","actionability"],"description":"Which score. Actionability applies to reviews only."}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["up","down","undone"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/threads":{"get":{"tags":["Messages"],"summary":"Your conversations","operationId":"getThreads","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"page","in":"query","required":false,"description":"Page number, from 1.","schema":{"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Messages"],"summary":"Start a conversation","operationId":"postThreads","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipientIds":{"minItems":1,"type":"array","items":{"type":"string"}},"body":{"type":"string","description":"Markdown, with LaTeX between $ signs."}},"required":["recipientIds","body"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/threads/{id}":{"get":{"tags":["Messages"],"summary":"A conversation; marks it read","operationId":"getThreadsById","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/threads/{id}/messages":{"post":{"tags":["Messages"],"summary":"Reply in a conversation","operationId":"postThreadsByIdMessages","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"Markdown, with LaTeX between $ signs."}},"required":["body"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/{id}":{"patch":{"tags":["Messages"],"summary":"Edit your message","operationId":"patchMessagesById","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"Markdown, with LaTeX between $ signs."}},"required":["body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/{id}/withdraw":{"post":{"tags":["Messages"],"summary":"Withdraws your message","operationId":"postMessagesByIdWithdraw","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/{id}/restore":{"post":{"tags":["Messages"],"summary":"Restores your message","operationId":"postMessagesByIdRestore","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{id}/block":{"post":{"tags":["Messages"],"summary":"Block a registered user from messaging you","operationId":"postUsersByIdBlock","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Messages"],"summary":"Unblock a registered user","operationId":"deleteUsersByIdBlock","security":[{"key":["messages"]}],"x-scope":"messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/moderation/flags":{"get":{"tags":["Moderator tools"],"summary":"Pending flags, grouped by item","operationId":"getModerationFlags","security":[{"key":["moderate"]}],"x-scope":"moderate","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Moderator tools"],"summary":"Mark every pending flag on an item helpful or declined","operationId":"postModerationFlags","security":[{"key":["moderate"]}],"x-scope":"moderate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","enum":["question","answer","comment","message"]},"id":{"type":"string"},"outcome":{"type":"string","enum":["helpful","declined"]},"remove":{"description":"With helpful: also remove the post or comment.","type":"boolean"},"note":{"type":"string"}},"required":["target","id","outcome"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/locked":{"put":{"tags":["Moderator tools"],"summary":"Lock or unlock a post","operationId":"putPostsByIdLocked","security":[{"key":["moderate"]}],"x-scope":"moderate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"locked":{"type":"boolean"}},"required":["locked"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/removed":{"put":{"tags":["Moderator tools"],"summary":"Remove or restore a comment","operationId":"putCommentsByIdRemoved","security":[{"key":["moderate"]}],"x-scope":"moderate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"}},"required":["removed"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{id}/suspension":{"post":{"tags":["Moderator tools"],"summary":"Suspend a registered user below your role","operationId":"postUsersByIdSuspension","security":[{"key":["moderate"]}],"x-scope":"moderate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":365},"reason":{"type":"string"}},"required":["days","reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Moderator tools"],"summary":"Lift a suspension","operationId":"deleteUsersByIdSuspension","security":[{"key":["moderate"]}],"x-scope":"moderate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/moderation/redactions":{"post":{"tags":["Moderator tools"],"summary":"Redact text from an item and all its earlier versions","description":"Replaces every occurrence with \"[redacted by moderators]\". Private messages only in a flagged conversation.","operationId":"postModerationRedactions","security":[{"key":["moderate"]}],"x-scope":"moderate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["post","comment","message"]},"id":{"type":"string"},"find":{"type":"string"},"reason":{"type":"string"}},"required":["kind","id","find","reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"An error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"invalid_input, unauthorized, invalid_key, terms_not_accepted, archived, suspended, data_limited, forbidden, insufficient_scope, insufficient_karma, low_karma_cooldown, not_found, method_not_allowed, edit_limit, rate_limited or internal."},"message":{"type":"string"}}}}},"Held":{"type":"object","required":["status","heldId","kind","expiresAt"],"properties":{"status":{"const":"pending_approval"},"heldId":{"type":"string"},"kind":{"enum":["question","answer","comment","post_edit","comment_edit","suggested_edit"]},"expiresAt":{"type":"string","format":"date-time"}}}},"securitySchemes":{"key":{"type":"http","scheme":"bearer","bearerFormat":"mo_<prefix>_<secret>","description":"Scopes: `read` (Read, including voter lists and voting histories); `account` (Mark notifications read, and follow or unfollow tags); `write:posts` (Ask and answer); `write:comments` (Comment); `write:edits` (Edit and suggest edits); `vote` (Vote, accept answers, and start and award bounties); `flag` (Flag, and vote to close, reopen and delete); `messages` (Read and send private messages); `moderate` (Moderator tools (moderator accounts only))."}}}}