{"openapi":"3.1.0","info":{"title":"Falconer Public API","version":"0.2.28"},"components":{"schemas":{"FalconerKnowledgeTopic":{"type":"object","properties":{"topic":{"type":"string","description":"Stable Falconer knowledge topic or page path."},"title":{"type":"string"},"description":{"type":"string"}},"required":["topic","title","description"]},"FalconerKnowledgeIndex":{"type":"object","properties":{"topics":{"type":"array","items":{"$ref":"#/components/schemas/FalconerKnowledgeTopic"}}},"required":["topics"]},"FalconerKnowledgeContent":{"allOf":[{"$ref":"#/components/schemas/FalconerKnowledgeTopic"},{"type":"object","properties":{"content":{"type":"string","description":"Falconer knowledge in Markdown."}},"required":["content"]}]},"Error":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message","code"]},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["id","name","email"]},"organization":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["user","organization"]},"Organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"apiAccessEnabled":{"type":"boolean"}},"required":["id","name","apiAccessEnabled"]},"AskQuestions":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120,"description":"One line saying what the answers are for, such as \"A few details before I draft the guide\". Used where the questions are announced, such as notifications, not shown above them."},"questions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["single_choice"],"description":"Radio buttons: exactly one of a few options."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":75,"description":"The choice in a few words. Put your recommended option first."},"description":{"type":"string","maxLength":150,"description":"One short line on what picking this means, when not obvious."},"preview":{"type":"string","maxLength":1500,"description":"Markdown shown beside the options while this one is highlighted: an outline, a draft paragraph, a code snippet. Use it when seeing the result helps the user choose between options."}},"required":["label"]},"minItems":2,"maxItems":8,"description":"2 to 8 distinct options. Never add an \"Other\" option yourself."},"allowOther":{"type":"boolean","default":true,"description":"Adds an \"Other\" choice with a text field. Leave on unless the options are truly exhaustive (yes/no, a fixed list)."},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question","options"]},{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice"],"description":"Checkboxes: any number of a few options."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":75,"description":"The choice in a few words. Put your recommended option first."},"description":{"type":"string","maxLength":150,"description":"One short line on what picking this means, when not obvious."},"preview":{"type":"string","maxLength":1500,"description":"Markdown shown beside the options while this one is highlighted: an outline, a draft paragraph, a code snippet. Use it when seeing the result helps the user choose between options."}},"required":["label"]},"minItems":2,"maxItems":8,"description":"2 to 8 distinct options. Never add an \"Other\" option yourself."},"allowOther":{"type":"boolean","default":true,"description":"Adds an \"Other\" choice with a text field. Leave on unless the options are truly exhaustive (yes/no, a fixed list)."},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question","options"]},{"type":"object","properties":{"type":{"type":"string","enum":["select"],"description":"A dropdown with search, for a long list of options (more than 8), such as teams, projects, or regions."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":75,"description":"The choice in a few words. Put your recommended option first."},"description":{"type":"string","maxLength":150,"description":"One short line on what picking this means, when not obvious."}},"required":["label"]},"minItems":2,"maxItems":50,"description":"2 to 50 distinct options. Never add an \"Other\" option yourself."},"multiple":{"type":"boolean","default":false,"description":"Let the user pick several."},"allowOther":{"type":"boolean","default":true,"description":"Adds an \"Other\" choice with a text field. Leave on unless the options are truly exhaustive (yes/no, a fixed list)."},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question","options"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"A free-text field, for answers you cannot list as options."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"placeholder":{"type":"string","maxLength":100,"description":"Example answer shown in the empty field."},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question"]},{"type":"object","properties":{"type":{"type":"string","enum":["date"],"description":"A date picker, for a deadline, a meeting day, or a range start."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"includeTime":{"type":"boolean","default":false,"description":"Ask for a time of day as well as the date."},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity"],"description":"A search picker over this workspace: Falconer documents or people in the organization. Use it instead of asking the user to type a name."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"entity":{"type":"string","enum":["document","person"]},"multiple":{"type":"boolean","default":false,"description":"Let the user pick several."},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question","entity"]},{"type":"object","properties":{"type":{"type":"string","enum":["confirm"],"description":"A yes or no confirmation before something costly or hard to undo."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"details":{"type":"string","minLength":1,"maxLength":400,"description":"Exactly what will happen if they confirm, including what cannot be undone."},"confirmLabel":{"type":"string","minLength":1,"maxLength":40,"default":"Yes","description":"The confirm choice, naming the action, such as \"Delete 12 docs\"."},"declineLabel":{"type":"string","minLength":1,"maxLength":40,"default":"No"},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question","details"]},{"type":"object","properties":{"type":{"type":"string","enum":["schedule"],"description":"A recurring cadence picker (every N minutes or hours, daily, weekly, monthly, at a time of day), for how often something should run."},"question":{"type":"string","minLength":1,"maxLength":300,"description":"The question, ending with a question mark."},"suggestedCron":{"type":"string","description":"Five-field cron expression to preselect, such as \"0 9 * * 1-5\" for weekdays at 9am."},"optional":{"type":"boolean","default":false,"description":"Let the user skip this question."}},"required":["type","question"]}]},"minItems":1,"maxItems":5,"description":"The user sees one question at a time, in this order. Ask only what you cannot decide yourself."}},"required":["title","questions"],"description":"Questions the agent needs answered before it can continue, to show one at a time in order. single_choice takes exactly one option, multiple_choice any number, and text a free-text answer. When allowOther is true the user may answer in their own words instead of picking an option; optional questions may be skipped."},"AskResponse":{"type":"object","properties":{"answer":{"type":"string","description":"Answer markdown; inline citations are numbered [N]."},"citations":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number","description":"Matches the inline [N] marker (0-based)."},"id":{"type":"string","description":"Source document id."},"title":{"type":"string"},"url":{"type":"string"}},"required":["index","id","title","url"]}},"conversationId":{"type":"string"},"pendingQuestions":{"$ref":"#/components/schemas/AskQuestions"}},"required":["answer","citations","conversationId"]},"AskRequest":{"type":"object","properties":{"question":{"type":"string","minLength":1,"description":"Natural-language question for the Falconer agent to answer over this workspace."},"conversationId":{"type":"string","minLength":1,"description":"Continue a previous ask conversation by passing the conversationId it returned."},"allowQuestions":{"type":"boolean","description":"Let the agent stop and ask the user structured questions (returned in pendingQuestions) instead of guessing. Set only when a person sees the questions and can answer them."}},"required":["question"]},"Document":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"visibility":{"type":"string","enum":["private","shared"]},"updatedAt":{"type":"string"}},"required":["id","title","visibility","updatedAt"]},"DocumentAttachment":{"type":"object","properties":{"referenceId":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0},"downloadUrl":{"type":"string","nullable":true}},"required":["referenceId","filename","mimeType","sizeBytes","downloadUrl"]},"DocumentReadFormat":{"type":"string","enum":["markdown","mdx"],"description":"markdown is Falconer markdown. mdx is the file a two-way sync push writes to the repository (or the page as MDX when it is not synced), with images as repository paths."},"ReadDocument":{"allOf":[{"$ref":"#/components/schemas/Document"},{"type":"object","properties":{"attachments":{"type":"array","items":{"$ref":"#/components/schemas/DocumentAttachment"}},"format":{"$ref":"#/components/schemas/DocumentReadFormat"},"repoPath":{"type":"string","nullable":true,"description":"With format mdx: the repository file path, or null when not synced."},"pendingSuggestions":{"type":"integer","description":"With format mdx: unaccepted suggestions, which the content renders as accepted."}},"required":["attachments"]}]},"DocumentRevisionEditor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true,"description":"GitHub login most recently connected to this Falconer user."},"image":{"type":"string","nullable":true},"displayName":{"type":"string"}},"required":["id","name","username","image","displayName"]},"DocumentRevision":{"type":"object","properties":{"id":{"type":"string"},"documentId":{"type":"string"},"version":{"type":"integer","nullable":true,"description":"Sequential revision number, shown as \"v3\" in the document history. Accepted anywhere a revisionId is expected."},"createdAt":{"type":"string"},"sessionStart":{"type":"string"},"sessionEnd":{"type":"string"},"editors":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRevisionEditor"}}},"required":["id","documentId","version","createdAt","sessionStart","sessionEnd","editors"]},"DocumentRevisionsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRevision"}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]},"DocumentRevisionContent":{"allOf":[{"$ref":"#/components/schemas/DocumentRevision"},{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}]},"DeletedDocumentRevision":{"type":"object","properties":{"id":{"type":"string"},"documentId":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","documentId","deleted"]},"NavSection":{"type":"string","enum":["company","private"],"description":"Where the document landed. Without a parent it lands in your private section."},"CreatedDocument":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"url":{"type":"string"},"updatedAt":{"type":"string"},"navItemId":{"type":"integer"},"section":{"$ref":"#/components/schemas/NavSection"}},"required":["id","title","content","url","updatedAt","navItemId","section"]},"CreateDocument":{"type":"object","properties":{"content":{"type":"string"},"parentFolderId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"description":"Folder to create the document in. Use a Space's folderId to place it at the top of that Space. Omit to create it in your private section."},"parentDocumentId":{"type":"string","minLength":1,"description":"Parent document UUID."}},"required":["content"],"additionalProperties":false},"OverwriteDocument":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]},"DeletedDocument":{"type":"object","properties":{"id":{"type":"string"},"archived":{"type":"boolean"},"pendingRemoval":{"type":"boolean","description":"True when the page is published to a synced GitHub repository and stays readable until the next push removes its file."}},"required":["id","archived","pendingRemoval"]},"DocumentGeneralPermissionLevel":{"type":"string","enum":["none","view","comment","edit"]},"DocumentPermissions":{"type":"object","properties":{"id":{"type":"string"},"visibility":{"type":"string","enum":["private","shared"]},"aclMode":{"type":"string","enum":["inherit","explicit"]},"orgWideLevel":{"$ref":"#/components/schemas/DocumentGeneralPermissionLevel"},"publicLevel":{"$ref":"#/components/schemas/DocumentGeneralPermissionLevel"},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"role":{"type":"string","enum":["view","comment","edit","owner"]},"isExternal":{"type":"boolean"}},"required":["userId","name","email","role","isExternal"]}},"groups":{"type":"array","items":{"type":"object","properties":{"groupSource":{"type":"string","enum":["scim"]},"groupId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["view","comment","edit"]},"matchedUserCount":{"type":"number"}},"required":["groupSource","groupId","name","role","matchedUserCount"]}},"owners":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"role":{"type":"string","enum":["view","comment","edit","owner"]},"isExternal":{"type":"boolean"}},"required":["userId","name","email","role","isExternal"]}}},"required":["id","visibility","aclMode","orgWideLevel","publicLevel","users","groups"]},"DocumentUserPermissionRole":{"type":"string","nullable":true,"enum":["view","comment","edit"],"description":"Permission role to grant. Use null to remove the user permission."},"DocumentGroupPermissionRole":{"type":"string","nullable":true,"enum":["view","comment","edit"],"description":"Permission role to grant. Use null to remove the group permission."},"UpdateDocumentPermissions":{"type":"object","properties":{"aclMode":{"type":"string","enum":["inherit","explicit"],"description":"Permission inheritance mode. Direct permission updates switch inherited documents to explicit automatically when omitted."},"orgWideLevel":{"allOf":[{"$ref":"#/components/schemas/DocumentGeneralPermissionLevel"},{"description":"Access level for members of the document organization."}]},"publicLevel":{"type":"string","enum":["none","view"],"description":"Access level for anyone with the link."},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/DocumentUserPermissionRole"},"sendNotification":{"type":"boolean","description":"Whether to notify the user about newly granted access."}},"required":["role"]}},"groups":{"type":"array","items":{"type":"object","properties":{"groupSource":{"type":"string","enum":["scim"]},"groupId":{"type":"string"},"role":{"$ref":"#/components/schemas/DocumentGroupPermissionRole"}},"required":["groupSource","groupId","role"]}}}},"DocumentMetadataResult":{"type":"object","properties":{"id":{"type":"string","description":"Document UUID"},"autoUpdateEnabled":{"type":"boolean","nullable":true},"docUpdateMode":{"type":"string","nullable":true,"enum":["auto_apply","draft_approval"]},"documentType":{"type":"string","nullable":true},"skillActivation":{"type":"string","nullable":true,"enum":["manual","automatic","in_context"]},"skillContextKeys":{"type":"array","items":{"type":"string"}},"fullWidth":{"type":"boolean","nullable":true},"backgroundColor":{"type":"string","nullable":true}},"required":["id","autoUpdateEnabled","docUpdateMode","documentType","skillActivation","skillContextKeys","fullWidth","backgroundColor"]},"UpdateDocumentMetadata":{"type":"object","properties":{"autoUpdateEnabled":{"type":"boolean"},"docUpdateMode":{"type":"string","enum":["auto_apply","draft_approval"]},"documentType":{"type":"string","nullable":true,"enum":["skill"]},"skillActivation":{"type":"string","enum":["manual","automatic","in_context"],"description":"When agents apply a skill document: manual (explicit invocation only), automatic (whenever the agent finds it relevant), or in_context (only in the listed skillContextKeys). Only valid for documents of type skill."},"skillContextKeys":{"type":"array","items":{"type":"string"},"description":"Contexts an in_context skill applies to, each \"slack_channel:<teamId>:<channelId>\" or \"public_docs:<folderId>\". Ignored for other activations."},"fullWidth":{"type":"boolean"},"backgroundColor":{"type":"string","nullable":true,"pattern":"^#[0-9a-fA-F]{6}$","description":"Background color as #RRGGBB hex. Use null to reset."}}},"DocumentStatusResult":{"type":"object","properties":{"id":{"type":"string","description":"Document UUID"},"status":{"type":"string","enum":["draft","in_review","approved","authoritative","outdated"]}},"required":["id","status"]},"UpdateDocumentStatus":{"type":"object","properties":{"status":{"type":"string","enum":["draft","in_review","approved","authoritative","outdated"],"description":"Review-workflow status: draft, in_review, approved, authoritative, or outdated."}},"required":["status"]},"DocumentReviewer":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"decision":{"type":"string","enum":["pending","approved","changes_requested"]}},"required":["userId","name","email","decision"]},"DocumentReviewers":{"type":"object","properties":{"id":{"type":"string","description":"Document UUID"},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/DocumentReviewer"}}},"required":["id","reviewers"]},"UpdateDocumentReviewers":{"type":"object","properties":{"add":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string","format":"email"}}},"description":"Reviewers to add. Each requires userId or email."},"remove":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string","format":"email"}}},"description":"Reviewers to remove. Each requires userId or email."},"removeAll":{"type":"boolean","description":"Remove all reviewers. Applied before remove and add."}}},"EditDocument":{"type":"object","properties":{"identifier":{"type":"string","description":"Document to edit. Accepts document ID, slug, title, or URL. Legacy exact content replacement; new integrations should prefer /docs/content/replace."},"old_string":{"type":"string","minLength":1,"description":"Exact Markdown text to find from the document read response. Matching is case-sensitive and whitespace-sensitive."},"new_string":{"type":"string","description":"Replacement text. Must differ from old_string. Use empty string to delete."},"replace_all":{"type":"boolean","default":false,"description":"If true, replaces all exact occurrences of old_string. Default false."}},"required":["identifier","old_string","new_string"]},"DocumentEditOutcome":{"type":"object","properties":{"index":{"type":"integer"},"editType":{"type":"string"},"changeDescription":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"reason":{"type":"string"}},"required":["code","reason"]},"createdTableIds":{"type":"array","items":{"type":"string"}}},"required":["index","editType","changeDescription","success"]},"DocumentEditsResult":{"allOf":[{"$ref":"#/components/schemas/Document"},{"type":"object","properties":{"applied":{"type":"integer","description":"How many edits applied"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentEditOutcome"}}},"required":["applied","outcomes"]}]},"ApplyDocumentEdits":{"type":"object","properties":{"identifier":{"type":"string","description":"Document to update. Accepts document ID, slug, title, or URL."},"edits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"editType":{"type":"string","enum":["replace","replace_all","replace_first","insert_after","insert_before","append","prepend","delete"]},"textToMatch":{"type":"string","default":"","description":"Exact markdown text to match. Use 10+ chars when possible for reliable matching; shorter is OK for short headings/items. Use the complete exact markdown snippet copied from the document node. For code blocks, must include the complete node content. To target a whole <Html> block that shows an id, use the self-closing tag <Html id=\"...\"/> instead of copying its body. Never target text inside a <Table> block; use the table edit types. Not required for append/prepend."},"newText":{"type":"string","description":"Markdown content to insert or replace with. Supports full rich text formatting. You MUST include the whole exact markdown for the replacement of textToMatch in Markdown. Optional only for delete operations."},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"}},"required":["editType","changeDescription"]},{"type":"object","properties":{"editType":{"type":"string","enum":["create_table"]},"position":{"type":"string","enum":["after","before","append","prepend"],"default":"append","description":"Where the table goes: after or before the block in textToMatch, or at the document end or start"},"textToMatch":{"type":"string","default":"","description":"The anchor block, copied exactly, for before and after"},"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Omit to derive the id from the nearest heading"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Omit to derive the id from the name"},"name":{"type":"string","description":"Header text"},"type":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"format":{"type":"string","enum":["number","currency","percent"],"description":"How values display: number groups thousands, currency adds a symbol, percent shows 0.12 as 12%. Omit to show values as stored."},"decimals":{"type":"integer","minimum":0,"maximum":6,"description":"Fixed decimal places; omit for as many as the value has"},"currency":{"type":"string","enum":["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY","INR","BRL","MXN","SEK"],"description":"ISO currency code for the currency format; defaults to USD"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["date"]},"format":{"type":"string","enum":["full","relative","mdy","dmy","ymd"],"description":"How dates display: full (Oct 1, 2026, the default), relative (Today, In 3 days), mdy (10/01/2026), dmy (01/10/2026), or ymd (2026/10/01)"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"]},"kind":{"type":"string","enum":["document","task","pr","person"]},"collection":{"type":"object","properties":{"source":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]*$","description":"Source id, such as linear_issues or falconer_documents"},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z_]*$"},"op":{"type":"string","enum":["is","is_not","after","before"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Option id in the source, \"@me\" for whoever views, or for dates an ISO date or relative offset like \"-7d\""},"label":{"type":"string","description":"Readable name of the value"}},"required":["id","label"],"additionalProperties":false},"minItems":1,"maxItems":25}},"required":["field","op","values"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Conditions every item must meet"}},"required":["source"],"additionalProperties":false,"description":"Keeps the column filled with every item of the source that matches all filters; rows the sync adds are marked synced"}},"required":["type","kind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["enum"]},"options":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple"]}},"required":["value"],"additionalProperties":false}]},"minItems":1,"description":"Option values, each a string or { value, color } with color one of red, orange, yellow, green, blue, purple"}},"required":["type","options"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["lookup"]},"from":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Id of a reference field in the same table"},"attribute":{"type":"string","pattern":"^[a-z][a-z_]*$","description":"Attribute of the referenced resource, such as status"}},"required":["type","from","attribute"],"additionalProperties":false},{"nullable":true}],"description":"Enforced type for every cell in the column"}},"required":["name"],"additionalProperties":false},"minItems":1},"rows":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"object","properties":{"ref":{"type":"string","enum":["document","task","pr","person"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["ref","id"],"additionalProperties":false},{"nullable":true}],"description":"A cell value: inline markdown, a JSON number for number fields, true or false for checkbox fields, an ISO date (\"2026-10-01\", \"2026-10-01T14:30\", or \"start/end\") for date fields, {ref, id, name} for reference fields (or plain text when there is nothing to link), text in a lookup field to show instead of the looked-up value, or null (or \"\") to clear the cell."}},"description":"Data rows as {fieldId: value}; the header row comes from fields"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"}},"required":["editType","fields","rows","changeDescription"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["set_cells"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"cells":{"type":"array","items":{"type":"object","properties":{"row":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Row id, the first element of the row line"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Field id from the schema line"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"object","properties":{"ref":{"type":"string","enum":["document","task","pr","person"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["ref","id"],"additionalProperties":false},{"nullable":true}],"description":"A cell value: inline markdown, a JSON number for number fields, true or false for checkbox fields, an ISO date (\"2026-10-01\", \"2026-10-01T14:30\", or \"start/end\") for date fields, {ref, id, name} for reference fields (or plain text when there is nothing to link), text in a lookup field to show instead of the looked-up value, or null (or \"\") to clear the cell."}},"required":["row","field","value"],"additionalProperties":false},"minItems":1,"description":"Any set of cells: one cell, part of a row or column, or a region"}},"required":["editType","table","changeDescription","cells"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["insert_rows"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"},"cells":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"object","properties":{"ref":{"type":"string","enum":["document","task","pr","person"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["ref","id"],"additionalProperties":false},{"nullable":true}],"description":"A cell value: inline markdown, a JSON number for number fields, true or false for checkbox fields, an ISO date (\"2026-10-01\", \"2026-10-01T14:30\", or \"start/end\") for date fields, {ref, id, name} for reference fields (or plain text when there is nothing to link), text in a lookup field to show instead of the looked-up value, or null (or \"\") to clear the cell."},"description":"Values by field id; missing fields stay empty"}},"required":["cells"],"additionalProperties":false},"minItems":1},"at":{"anyOf":[{"type":"string","enum":["start"]},{"type":"string","enum":["end"]},{"type":"object","properties":{"before":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["before"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["after"],"additionalProperties":false}],"default":"end"}},"required":["editType","table","changeDescription","rows"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["delete_rows"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"rows":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"},"minItems":1}},"required":["editType","table","changeDescription","rows"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["move_rows"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"rows":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"},"minItems":1},"at":{"anyOf":[{"type":"string","enum":["start"]},{"type":"string","enum":["end"]},{"type":"object","properties":{"before":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["before"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["after"],"additionalProperties":false}]}},"required":["editType","table","changeDescription","rows","at"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["add_field"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"field":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Omit to derive the id from the name"},"name":{"type":"string","description":"Header text"},"type":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"format":{"type":"string","enum":["number","currency","percent"],"description":"How values display: number groups thousands, currency adds a symbol, percent shows 0.12 as 12%. Omit to show values as stored."},"decimals":{"type":"integer","minimum":0,"maximum":6,"description":"Fixed decimal places; omit for as many as the value has"},"currency":{"type":"string","enum":["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY","INR","BRL","MXN","SEK"],"description":"ISO currency code for the currency format; defaults to USD"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["date"]},"format":{"type":"string","enum":["full","relative","mdy","dmy","ymd"],"description":"How dates display: full (Oct 1, 2026, the default), relative (Today, In 3 days), mdy (10/01/2026), dmy (01/10/2026), or ymd (2026/10/01)"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"]},"kind":{"type":"string","enum":["document","task","pr","person"]},"collection":{"type":"object","properties":{"source":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]*$","description":"Source id, such as linear_issues or falconer_documents"},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z_]*$"},"op":{"type":"string","enum":["is","is_not","after","before"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Option id in the source, \"@me\" for whoever views, or for dates an ISO date or relative offset like \"-7d\""},"label":{"type":"string","description":"Readable name of the value"}},"required":["id","label"],"additionalProperties":false},"minItems":1,"maxItems":25}},"required":["field","op","values"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Conditions every item must meet"}},"required":["source"],"additionalProperties":false,"description":"Keeps the column filled with every item of the source that matches all filters; rows the sync adds are marked synced"}},"required":["type","kind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["enum"]},"options":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple"]}},"required":["value"],"additionalProperties":false}]},"minItems":1,"description":"Option values, each a string or { value, color } with color one of red, orange, yellow, green, blue, purple"}},"required":["type","options"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["lookup"]},"from":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Id of a reference field in the same table"},"attribute":{"type":"string","pattern":"^[a-z][a-z_]*$","description":"Attribute of the referenced resource, such as status"}},"required":["type","from","attribute"],"additionalProperties":false},{"nullable":true}],"description":"Enforced type for every cell in the column"}},"required":["name"],"additionalProperties":false},"at":{"anyOf":[{"type":"string","enum":["start"]},{"type":"string","enum":["end"]},{"type":"object","properties":{"before":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["before"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["after"],"additionalProperties":false}],"default":"end"},"values":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"object","properties":{"ref":{"type":"string","enum":["document","task","pr","person"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["ref","id"],"additionalProperties":false},{"nullable":true}],"description":"A cell value: inline markdown, a JSON number for number fields, true or false for checkbox fields, an ISO date (\"2026-10-01\", \"2026-10-01T14:30\", or \"start/end\") for date fields, {ref, id, name} for reference fields (or plain text when there is nothing to link), text in a lookup field to show instead of the looked-up value, or null (or \"\") to clear the cell."},"description":"Initial values by row id"}},"required":["editType","table","changeDescription","field"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["update_field"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string"},"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"New field id"},"type":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"format":{"type":"string","enum":["number","currency","percent"],"description":"How values display: number groups thousands, currency adds a symbol, percent shows 0.12 as 12%. Omit to show values as stored."},"decimals":{"type":"integer","minimum":0,"maximum":6,"description":"Fixed decimal places; omit for as many as the value has"},"currency":{"type":"string","enum":["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY","INR","BRL","MXN","SEK"],"description":"ISO currency code for the currency format; defaults to USD"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["date"]},"format":{"type":"string","enum":["full","relative","mdy","dmy","ymd"],"description":"How dates display: full (Oct 1, 2026, the default), relative (Today, In 3 days), mdy (10/01/2026), dmy (01/10/2026), or ymd (2026/10/01)"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"]},"kind":{"type":"string","enum":["document","task","pr","person"]},"collection":{"type":"object","properties":{"source":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]*$","description":"Source id, such as linear_issues or falconer_documents"},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z_]*$"},"op":{"type":"string","enum":["is","is_not","after","before"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Option id in the source, \"@me\" for whoever views, or for dates an ISO date or relative offset like \"-7d\""},"label":{"type":"string","description":"Readable name of the value"}},"required":["id","label"],"additionalProperties":false},"minItems":1,"maxItems":25}},"required":["field","op","values"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Conditions every item must meet"}},"required":["source"],"additionalProperties":false,"description":"Keeps the column filled with every item of the source that matches all filters; rows the sync adds are marked synced"}},"required":["type","kind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["enum"]},"options":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple"]}},"required":["value"],"additionalProperties":false}]},"minItems":1,"description":"Option values, each a string or { value, color } with color one of red, orange, yellow, green, blue, purple"}},"required":["type","options"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["lookup"]},"from":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Id of a reference field in the same table"},"attribute":{"type":"string","pattern":"^[a-z][a-z_]*$","description":"Attribute of the referenced resource, such as status"}},"required":["type","from","attribute"],"additionalProperties":false},{"nullable":true}]},"renameOptions":{"type":"object","additionalProperties":{"type":"string","minLength":1},"description":"Enum option renames as { \"old value\": \"new value\" }; cells holding an old value are rewritten"}},"required":["editType","table","changeDescription","field"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["delete_field"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["editType","table","changeDescription","field"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["move_field"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"},"at":{"anyOf":[{"type":"string","enum":["start"]},{"type":"string","enum":["end"]},{"type":"object","properties":{"before":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["before"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$"}},"required":["after"],"additionalProperties":false}]}},"required":["editType","table","changeDescription","field","at"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["merge_cells"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"from":{"type":"object","properties":{"row":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Row id, the first element of the row line"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Field id from the schema line"}},"required":["row","field"],"additionalProperties":false,"description":"Top-left cell of the region"},"to":{"type":"object","properties":{"row":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Row id, the first element of the row line"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Field id from the schema line"}},"required":["row","field"],"additionalProperties":false,"description":"Bottom-right cell of the region"}},"required":["editType","table","changeDescription","from","to"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["split_cell"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"cell":{"type":"object","properties":{"row":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Row id, the first element of the row line"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Field id from the schema line"}},"required":["row","field"],"additionalProperties":false}},"required":["editType","table","changeDescription","cell"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["set_cell_type"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"},"cell":{"type":"object","properties":{"row":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Row id, the first element of the row line"},"field":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Field id from the schema line"}},"required":["row","field"],"additionalProperties":false},"type":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"format":{"type":"string","enum":["number","currency","percent"],"description":"How values display: number groups thousands, currency adds a symbol, percent shows 0.12 as 12%. Omit to show values as stored."},"decimals":{"type":"integer","minimum":0,"maximum":6,"description":"Fixed decimal places; omit for as many as the value has"},"currency":{"type":"string","enum":["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY","INR","BRL","MXN","SEK"],"description":"ISO currency code for the currency format; defaults to USD"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["date"]},"format":{"type":"string","enum":["full","relative","mdy","dmy","ymd"],"description":"How dates display: full (Oct 1, 2026, the default), relative (Today, In 3 days), mdy (10/01/2026), dmy (01/10/2026), or ymd (2026/10/01)"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reference"]},"kind":{"type":"string","enum":["document","task","pr","person"]},"collection":{"type":"object","properties":{"source":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]*$","description":"Source id, such as linear_issues or falconer_documents"},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z_]*$"},"op":{"type":"string","enum":["is","is_not","after","before"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Option id in the source, \"@me\" for whoever views, or for dates an ISO date or relative offset like \"-7d\""},"label":{"type":"string","description":"Readable name of the value"}},"required":["id","label"],"additionalProperties":false},"minItems":1,"maxItems":25}},"required":["field","op","values"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Conditions every item must meet"}},"required":["source"],"additionalProperties":false,"description":"Keeps the column filled with every item of the source that matches all filters; rows the sync adds are marked synced"}},"required":["type","kind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["enum"]},"options":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple"]}},"required":["value"],"additionalProperties":false}]},"minItems":1,"description":"Option values, each a string or { value, color } with color one of red, orange, yellow, green, blue, purple"}},"required":["type","options"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["lookup"]},"from":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Id of a reference field in the same table"},"attribute":{"type":"string","pattern":"^[a-z][a-z_]*$","description":"Attribute of the referenced resource, such as status"}},"required":["type","from","attribute"],"additionalProperties":false},{"nullable":true}]}},"required":["editType","table","changeDescription","cell","type"],"additionalProperties":false},{"type":"object","properties":{"editType":{"type":"string","enum":["delete_table"]},"table":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]*$","description":"The id in the <Table id=\"...\"> block"},"changeDescription":{"type":"string","description":"Brief description of what this edit accomplishes (shown to user)"}},"required":["editType","table","changeDescription"],"additionalProperties":false}]},"minItems":1,"description":"Edits applied in order; a single edit object is also accepted. Each edit is atomic on its own: a failed edit is reported in the response and the others still apply. Text edits locate Markdown with textToMatch; table edits address the <Table> blocks from the read response by table, row, and field id."}},"required":["identifier","edits"]},"ReplaceDocumentContent":{"type":"object","properties":{"identifier":{"type":"string","description":"Document to update. Accepts document ID, slug, title, or URL."},"old_string":{"type":"string","minLength":1,"description":"Exact Markdown text to replace from the document read response. Matching is case-sensitive and whitespace-sensitive."},"new_string":{"type":"string","description":"Replacement Markdown text. Use /docs/content/delete for deletion-only changes."},"occurrence":{"type":"string","enum":["first","all"],"default":"first","description":"Use \"first\" to change a single unique exact match. Ambiguous text that appears more than once is rejected, so add surrounding context or use \"all\". Use \"all\" for intentional global replacements/deletions. Default \"first\"."}},"required":["identifier","old_string","new_string"]},"InsertDocumentContent":{"type":"object","properties":{"identifier":{"type":"string","description":"Document to update. Accepts document ID, slug, title, or URL."},"content":{"type":"string","minLength":1,"description":"Markdown content to insert."},"position":{"type":"string","enum":["before","after","start","end"],"description":"Where to insert content. Use before/after with anchor_string, or start/end without anchor_string."},"anchor_string":{"type":"string","minLength":1,"description":"Exact Markdown anchor text copied from the document read response. Required for before/after; matching is case-sensitive and whitespace-sensitive."}},"required":["identifier","content","position"]},"DeleteDocumentContent":{"type":"object","properties":{"identifier":{"type":"string","description":"Document to update. Accepts document ID, slug, title, or URL."},"old_string":{"type":"string","minLength":1,"description":"Exact Markdown text to delete from the document read response. Matching is case-sensitive and whitespace-sensitive."},"occurrence":{"type":"string","enum":["first","all"],"default":"first","description":"Use \"first\" to change a single unique exact match. Ambiguous text that appears more than once is rejected, so add surrounding context or use \"all\". Use \"all\" for intentional global replacements/deletions. Default \"first\"."}},"required":["identifier","old_string"]},"CommentUser":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"image":{"type":"string","nullable":true},"isBot":{"type":"boolean"}},"required":["id","name","email","image","isBot"]},"CommentReaction":{"type":"object","properties":{"shortcode":{"type":"string"},"emoji":{"type":"string","nullable":true},"count":{"type":"number"},"userIds":{"type":"array","items":{"type":"string"}},"userNames":{"type":"array","items":{"type":"string"}}},"required":["shortcode","emoji","count","userIds","userNames"]},"ReplyComment":{"type":"object","properties":{"id":{"type":"string"},"user":{"$ref":"#/components/schemas/CommentUser"},"content":{"type":"string"},"isTyping":{"type":"boolean"},"url":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"reactions":{"type":"array","items":{"$ref":"#/components/schemas/CommentReaction"}}},"required":["id","user","content","isTyping","url","createdAt","updatedAt","reactions"]},"DocumentComment":{"type":"object","properties":{"id":{"type":"string"},"user":{"$ref":"#/components/schemas/CommentUser"},"content":{"type":"string"},"isTyping":{"type":"boolean"},"replies":{"type":"array","items":{"$ref":"#/components/schemas/ReplyComment"}},"reactions":{"type":"array","items":{"$ref":"#/components/schemas/CommentReaction"}},"textAnchor":{"type":"object","nullable":true,"properties":{"text":{"type":"string"}},"required":["text"]},"imageAnchor":{"type":"object","nullable":true,"properties":{"src":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"}},"required":["src","x","y"]},"url":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["active","deleted","resolved"]}},"required":["id","user","content","isTyping","replies","reactions","textAnchor","imageAnchor","url","createdAt","updatedAt","status"]},"DocumentCommentsResponse":{"type":"object","properties":{"comments":{"type":"array","items":{"$ref":"#/components/schemas/DocumentComment"}}},"required":["comments"]},"CreatedComment":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","createdAt"]},"CreatedDocumentComment":{"allOf":[{"$ref":"#/components/schemas/CreatedComment"},{"type":"object","properties":{"url":{"type":"string"},"textAnchor":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}},"required":["url","textAnchor"]}]},"CreateDocumentComment":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"anchor_string":{"type":"string","minLength":1,"maxLength":10000,"description":"Exact Markdown anchor text copied from the document read response. Matching is case-sensitive and whitespace-sensitive."}},"required":["content","anchor_string"]},"CreateCommentReply":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"]},"UpdatedComment":{"type":"object","properties":{"id":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","updatedAt"]},"UpdateComment":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"]},"CommentMutationSuccess":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"NavDocument":{"type":"object","properties":{"id":{"type":"string","description":"Document UUID"},"title":{"type":"string"},"url":{"type":"string"},"visibility":{"type":"string","enum":["private","shared"]},"updatedAt":{"type":"string"}},"required":["id","title","url","visibility","updatedAt"]},"NavFile":{"type":"object","properties":{"id":{"type":"string","description":"Library file id"},"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"updatedAt":{"type":"string"}},"required":["id","filename","mimeType","size","updatedAt"]},"NavItem":{"type":"object","properties":{"type":{"type":"string","enum":["folder","document","file"]},"navItemId":{"type":"number"},"parentFolderId":{"type":"number","nullable":true,"description":"Parent folder or document nav item ID; null at the section root."},"title":{"type":"string"},"icon":{"type":"string","nullable":true},"order":{"type":"number"},"section":{"$ref":"#/components/schemas/NavSection"},"folderId":{"type":"number"},"description":{"type":"string","nullable":true},"childCount":{"type":"number","description":"Visible direct children of a folder or document."},"childrenLoaded":{"type":"boolean","description":"Whether all visible direct children have been loaded."},"document":{"$ref":"#/components/schemas/NavDocument"},"file":{"$ref":"#/components/schemas/NavFile"},"children":{"type":"array","description":"Nested nav items when returned by tree endpoints.","items":{"$ref":"#/components/schemas/NavItem"}}},"required":["type","navItemId","parentFolderId","title","icon","order","section"]},"NavChildrenResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NavItem"}},"nextCursor":{"type":"string"}},"required":["data"]},"NavTreeResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NavItem"}},"truncated":{"type":"boolean"}},"required":["data","truncated"]},"Folder":{"allOf":[{"$ref":"#/components/schemas/NavItem"},{"type":"object","properties":{"type":{"type":"string","enum":["folder"]},"childCount":{"type":"number"},"childrenLoaded":{"type":"boolean"},"children":{"type":"array","items":{"$ref":"#/components/schemas/NavItem"}}},"required":["folderId","description","childCount","childrenLoaded","children"]}]},"DocsContainerKind":{"type":"string","enum":["group","tab","dropdown","anchor","link"],"description":"How a folder inside a public docs site renders. Requires site management; tab only directly under the site root."},"DocsContainerOptions":{"type":"object","properties":{"icon":{"type":"string","minLength":1,"maxLength":200},"hidden":{"type":"boolean"},"href":{"type":"string","maxLength":2048,"format":"uri"},"access":{"type":"string","enum":["public","private"]}},"additionalProperties":false},"CreateFolder":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","nullable":true,"maxLength":500},"section":{"$ref":"#/components/schemas/NavSection"},"parentFolderId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"containerKind":{"$ref":"#/components/schemas/DocsContainerKind"},"containerConfig":{"$ref":"#/components/schemas/DocsContainerOptions"}},"required":["title"]},"UpdateFolder":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","nullable":true,"maxLength":500}}},"FolderOrder":{"type":"object","properties":{"folderId":{"type":"number"},"navItemIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["folderId","navItemIds"]},"UpdateFolderOrder":{"type":"object","properties":{"navItemIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["navItemIds"]},"NavChildrenOrder":{"type":"object","properties":{"parentNavItemId":{"type":"number"},"navItemIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["parentNavItemId","navItemIds"]},"UpdateNavChildrenOrder":{"type":"object","properties":{"navItemIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["navItemIds"]},"MoveNavItem":{"type":"object","properties":{"beforeNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"afterNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"section":{"$ref":"#/components/schemas/NavSection"},"parentFolderId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"parentDocumentId":{"type":"string","minLength":1,"description":"Parent document UUID."},"acknowledgeWidenedAccess":{"type":"boolean","description":"Confirms a move into a different Space, including out of the private section, that lets more people see the content. Without it, such a move answers 412."}},"additionalProperties":false},"MovedNavItems":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"navItemId":{"type":"integer"},"status":{"type":"string","enum":["moved"]},"item":{"$ref":"#/components/schemas/NavItem"}},"required":["navItemId","status","item"]},{"type":"object","properties":{"navItemId":{"type":"integer"},"status":{"type":"string","enum":["failed"]},"message":{"type":"string"},"code":{"type":"string"}},"required":["navItemId","status","message","code"]}]}}},"required":["data"]},"MoveNavItems":{"type":"object","properties":{"navItemIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1,"maxItems":50,"description":"Items to move, in the order they should land."},"section":{"$ref":"#/components/schemas/NavSection"},"parentFolderId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"parentDocumentId":{"type":"string","minLength":1,"description":"Parent document UUID."},"acknowledgeWidenedAccess":{"type":"boolean","description":"Confirms a move into a different Space, including out of the private section, that lets more people see the content. Without it, such a move answers 412."}},"required":["navItemIds"],"additionalProperties":false},"AmbiguousDocumentPlacement":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"navItemIds":{"type":"array","items":{"type":"number"}}},"required":["navItemIds"]}]},"MoveDocumentNavItem":{"type":"object","properties":{"beforeNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"afterNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"section":{"$ref":"#/components/schemas/NavSection"},"parentFolderId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"parentDocumentId":{"type":"string","minLength":1,"description":"Parent document UUID."},"sourceNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"acknowledgeWidenedAccess":{"type":"boolean","description":"Confirms a move into a different Space, including out of the private section, that lets more people see the content. Without it, such a move answers 412."}},"additionalProperties":false},"PublishDocument":{"anyOf":[{"type":"object","properties":{"beforeNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"afterNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"sourceNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"parentFolderId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["parentFolderId"],"additionalProperties":false},{"type":"object","properties":{"beforeNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"afterNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"sourceNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"parentDocumentId":{"type":"string","minLength":1,"description":"Parent document UUID."}},"required":["parentDocumentId"],"additionalProperties":false}]},"DeletedFolder":{"type":"object","properties":{"folderId":{"type":"number"},"removal":{"type":"string","enum":["archived","unlisted","deleted_files"],"description":"archived for a normal folder. In a docs site the folder leaves the Docs view and its files stay (unlisted); in a GitHub-mirrored Space its directory is deleted (deleted_files)."},"archived":{"type":"boolean","description":"Whether the folder itself was archived."},"archivedDocumentIds":{"type":"array","items":{"type":"string"}}},"required":["folderId","removal","archived","archivedDocumentIds"]},"UploadedMedia":{"type":"object","properties":{"id":{"type":"string","description":"Upload id. For file attachments this is the referenceId used in document content and attachment metadata."},"kind":{"type":"string","enum":["image","video","file"]},"url":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"snippet":{"type":"string","description":"Markdown snippet to insert into document content: an image, a video element, or an <a data-id> attachment reference."}},"required":["id","kind","url","filename","mimeType","size","snippet"]},"UploadMediaRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"kind":{"type":"string","enum":["auto","image","video","file"],"description":"Upload kind. Defaults to auto. Files such as PDF, Office, text and code attachments are kind \"file\"."},"alt":{"type":"string","description":"Alt text for images."}},"required":["file"]},"UploadSession":{"type":"object","properties":{"uploadToken":{"type":"string","description":"Opaque token to pass to the complete call after uploading."},"uploadUrl":{"type":"string","description":"Short-lived URL to send the raw file bytes to. Never persist it."},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers the upload request must send exactly as given."},"expiresAt":{"type":"string","description":"When uploadUrl stops accepting the file (ISO 8601)."}},"required":["uploadToken","uploadUrl","method","headers","expiresAt"]},"CreateUploadSessionRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"description":"Filename, including extension"},"size":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"File size in bytes"},"mimeType":{"type":"string","description":"File MIME type"},"kind":{"type":"string","enum":["auto","image","video","file"],"description":"Upload kind. Defaults to auto. Files such as PDF, Office, text and code attachments are kind \"file\"."},"alt":{"type":"string","description":"Alt text for images."}},"required":["filename","size"]},"CompleteUploadSessionRequest":{"type":"object","properties":{"uploadToken":{"type":"string","minLength":1}},"required":["uploadToken"]},"KhFindingCategoryOutput":{"type":"string","enum":["contradiction","gap","redundancy","freshness","staleness","stale","drift"]},"KhFindingSeverity":{"type":"string","enum":["critical","moderate","minor"]},"KhFindingDocumentRef":{"type":"object","properties":{"documentId":{"type":"string","description":"Document UUID."},"title":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","description":"Absolute editor URL."},"archived":{"type":"boolean"}},"required":["documentId","title","slug","url","archived"]},"KhFinding":{"type":"object","properties":{"findingKey":{"type":"string"},"category":{"$ref":"#/components/schemas/KhFindingCategoryOutput"},"severity":{"$ref":"#/components/schemas/KhFindingSeverity"},"title":{"type":"string"},"description":{"type":"string"},"whyItMatters":{"type":"string"},"suggestedAction":{"type":"string"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/KhFindingDocumentRef"}},"labels":{"type":"array","items":{"type":"string"}},"evidence":{"type":"array","items":{"type":"object","properties":{"quote":{"type":"string"},"source":{"type":"string"},"url":{"type":"string"}},"required":["quote"]}},"codeRefs":{"type":"array","items":{"type":"object","properties":{"repo":{"type":"string"},"path":{"type":"string"},"url":{"type":"string"},"line":{"type":"number"}},"required":["repo","path"]}},"contributingPRs":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"url":{"type":"string"},"title":{"type":"string"}},"required":["number","url","title"]}},"actionStatus":{"type":"string","nullable":true},"owner":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"]}},"required":["findingKey","category","severity","title","description","documents","actionStatus","owner"]},"KhFindingList":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"nextOffset":{"type":"integer","nullable":true,"minimum":0},"findings":{"type":"array","items":{"$ref":"#/components/schemas/KhFinding"}}},"required":["total","nextOffset","findings"]},"KhFindingCategory":{"type":"string","enum":["contradiction","gap","redundancy","freshness","staleness","drift"],"description":"Category to list. One per call - the hosted UI shows one bucket at a time."},"KhFindingUpdateResponse":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"findingKey":{"type":"string"},"status":{"type":"string"},"owner":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"]}},"required":["ok","findingKey"]},{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["ok","message"]}]},"KhFindingUpdateRequest":{"type":"object","properties":{"status":{"type":"string","enum":["resolved","ignored"],"description":"\"resolved\" closes the finding; \"ignored\" dismisses it."},"ownerEmail":{"type":"string","nullable":true,"format":"email","description":"Email of an org member to assign as owner, or null to clear the owner."}}},"DocsEdgeOutcome":{"type":"string","nullable":true,"enum":["propagating","confirmed","unconfirmed","failed"]},"DocsBuildStatus":{"type":"string","enum":["queued","building","succeeded","failed"]},"DocsIndexStatus":{"type":"string","enum":["pending","indexing","ready","failed"],"description":"Search indexing of the build; meaningful once status is succeeded."},"DocsBuildSummary":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"buildNumber":{"type":"integer","nullable":true},"status":{"$ref":"#/components/schemas/DocsBuildStatus"},"indexStatus":{"$ref":"#/components/schemas/DocsIndexStatus"},"error":{"type":"string","nullable":true},"indexError":{"type":"string","nullable":true},"autoPublish":{"type":"boolean"},"isPublished":{"type":"boolean","description":"Whether this build is the one the live site serves."},"staleSubdomain":{"type":"boolean","description":"Built before the site was renamed, so its canonical URLs and sitemap point at the old host. Publishing it serves stale URLs until a rebuild."},"requestedBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["id","name"]},"createdAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","buildNumber","status","indexStatus","error","indexError","autoPublish","isPublished","staleSubdomain","requestedBy","createdAt","completedAt"]},"DocsSite":{"type":"object","properties":{"spaceId":{"type":"integer"},"folderId":{"type":"integer","description":"The Space root folder's ID, for /nav and /folders."},"name":{"type":"string","nullable":true},"subdomain":{"type":"string"},"url":{"type":"string","description":"Canonical live URL."},"falconerSiteUrl":{"type":"string"},"customDomain":{"type":"string","nullable":true},"customDomainStatus":{"type":"string"},"isPublished":{"type":"boolean"},"isPasswordProtected":{"type":"boolean"},"publishedBuildId":{"type":"string","nullable":true},"edgeOutcome":{"$ref":"#/components/schemas/DocsEdgeOutcome"},"canManage":{"type":"boolean","description":"Whether you can publish, roll back, or unpublish."},"latestBuild":{"$ref":"#/components/schemas/DocsBuildSummary"}},"required":["spaceId","folderId","name","subdomain","url","falconerSiteUrl","customDomain","customDomainStatus","isPublished","isPasswordProtected","publishedBuildId","edgeOutcome","canManage","latestBuild"]},"DocsSiteList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DocsSite"}}},"required":["data"]},"CreateDocsSiteRequest":{"type":"object","properties":{"syncWithGithub":{"type":"boolean","description":"Skip the starter pages because the content will come from a repository bound next."}}},"SetDocsSubdomainRequest":{"type":"object","properties":{"subdomain":{"type":"string","minLength":1}},"required":["subdomain"]},"DocsBuild":{"allOf":[{"$ref":"#/components/schemas/DocsBuildSummary"},{"type":"object","properties":{"publicUrl":{"type":"string"},"edgeOutcome":{"allOf":[{"$ref":"#/components/schemas/DocsEdgeOutcome"},{"description":"Publish propagation state; set only on the build the site points at."}]},"edgeError":{"type":"string","nullable":true}},"required":["publicUrl","edgeOutcome","edgeError"]}]},"TriggerDocsBuildRequest":{"type":"object","properties":{"autoPublish":{"type":"boolean","description":"Publish as soon as the build succeeds. Requires public docs management."}}},"DocsBuildList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DocsBuildSummary"}},"nextCursor":{"type":"string"}},"required":["data"]},"PublishDocsBuildRequest":{"type":"object","properties":{"force":{"type":"boolean","description":"Publish even though search indexing is not ready."}}},"DocsBrokenLinks":{"type":"object","properties":{"checkedAt":{"type":"string","nullable":true,"description":"When the latest succeeded build checked links."},"links":{"type":"array","nullable":true,"items":{"type":"object","properties":{"documentId":{"type":"string"},"pageTitle":{"type":"string"},"pageRoute":{"type":"string"},"text":{"type":"string"},"href":{"type":"string"},"reason":{"type":"string","enum":["missing_page","missing_anchor","unpublished_document"]},"occurrences":{"type":"integer"}},"required":["documentId","pageTitle","pageRoute","text","href","reason","occurrences"]}}},"required":["checkedAt","links"]},"ResolvedDocsSiteConfig":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"favicon":{"type":"string","minLength":1,"maxLength":1024},"logo":{"type":"object","properties":{"light":{"type":"string","minLength":1,"maxLength":1024},"dark":{"type":"string","minLength":1,"maxLength":1024},"href":{"type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false},"colors":{"type":"object","properties":{"primary":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"},"primaryDark":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"}},"additionalProperties":false},"navbar":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"href":{"type":"string","maxLength":2048,"format":"uri"}},"required":["label","href"],"additionalProperties":false},"maxItems":10},"primary":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"href":{"type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false}},"additionalProperties":false},"contextual":{"type":"object","properties":{"options":{"type":"array","items":{"type":"string","enum":["copy","view","assistant","chatgpt","claude"]},"maxItems":5}},"additionalProperties":false},"seo":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"indexable":{"type":"boolean"},"metatags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z][A-Za-z0-9:._-]*$"},"content":{"type":"string","minLength":1,"maxLength":1000}},"required":["name","content"],"additionalProperties":false},"maxItems":30}},"required":["indexable"],"additionalProperties":false},"social":{"type":"array","items":{"type":"object","properties":{"icon":{"type":"string","enum":["github","gitlab","bitbucket","codeberg","stackoverflow","discord","slack","matrix","telegram","whatsapp","signal","mastodon","bluesky","threads","twitter","x.com","linkedin","facebook","instagram","tiktok","pinterest","reddit","youtube","twitch","patreon","discourse","zulip","rss","email","phone"]},"href":{"type":"string","maxLength":2048,"format":"uri"}},"required":["icon","href"],"additionalProperties":false},"maxItems":20},"analytics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"snippet":{"type":"string","minLength":1,"maxLength":10000}},"required":["name","snippet"],"additionalProperties":false},"maxItems":10},"footer":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":40},"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"href":{"type":"string","minLength":1,"maxLength":2048}},"required":["label","href"],"additionalProperties":false},"maxItems":10,"default":[]}},"additionalProperties":false},"maxItems":6}},"additionalProperties":false}},"required":["name","seo","social"],"additionalProperties":false},"DocsSiteConfig":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/ResolvedDocsSiteConfig"},"hasUnpublishedChanges":{"type":"boolean","description":"Whether the settings differ from the live build."},"whiteLabel":{"type":"boolean"}},"required":["config","hasUnpublishedChanges","whiteLabel"]},"UpdateDocsSiteConfigRequest":{"type":"object","properties":{"name":{"type":"string","nullable":true,"minLength":1,"maxLength":200},"favicon":{"type":"string","nullable":true,"minLength":1,"maxLength":1024},"logo":{"type":"object","nullable":true,"properties":{"light":{"type":"string","nullable":true,"minLength":1,"maxLength":1024},"dark":{"type":"string","nullable":true,"minLength":1,"maxLength":1024},"href":{"type":"string","nullable":true,"maxLength":2048,"format":"uri"}},"additionalProperties":false},"colors":{"type":"object","nullable":true,"properties":{"primary":{"type":"string","nullable":true,"pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"},"primaryDark":{"type":"string","nullable":true,"pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"}},"additionalProperties":false},"navbar":{"type":"object","nullable":true,"properties":{"links":{"type":"array","nullable":true,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"href":{"type":"string","maxLength":2048,"format":"uri"}},"required":["label","href"],"additionalProperties":false},"maxItems":10},"primary":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"minLength":1,"maxLength":40},"href":{"type":"string","nullable":true,"maxLength":2048,"format":"uri"}},"additionalProperties":false}},"additionalProperties":false},"contextual":{"type":"object","nullable":true,"properties":{"options":{"type":"array","nullable":true,"items":{"type":"string","enum":["copy","view","assistant","chatgpt","claude"]},"maxItems":5}},"additionalProperties":false},"seo":{"type":"object","nullable":true,"properties":{"description":{"type":"string","nullable":true,"maxLength":500},"indexable":{"type":"boolean","nullable":true},"metatags":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z][A-Za-z0-9:._-]*$"},"content":{"type":"string","minLength":1,"maxLength":1000}},"required":["name","content"],"additionalProperties":false},"maxItems":30}},"additionalProperties":false},"social":{"type":"array","nullable":true,"items":{"type":"object","properties":{"icon":{"type":"string","enum":["github","gitlab","bitbucket","codeberg","stackoverflow","discord","slack","matrix","telegram","whatsapp","signal","mastodon","bluesky","threads","twitter","x.com","linkedin","facebook","instagram","tiktok","pinterest","reddit","youtube","twitch","patreon","discourse","zulip","rss","email","phone"]},"href":{"type":"string","maxLength":2048,"format":"uri"}},"required":["icon","href"],"additionalProperties":false},"maxItems":20},"analytics":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"snippet":{"type":"string","minLength":1,"maxLength":10000}},"required":["name","snippet"],"additionalProperties":false},"maxItems":10},"footer":{"type":"object","nullable":true,"properties":{"links":{"type":"array","nullable":true,"items":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":40},"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"href":{"type":"string","minLength":1,"maxLength":2048}},"required":["label","href"],"additionalProperties":false},"maxItems":10,"default":[]}},"additionalProperties":false},"maxItems":6}},"additionalProperties":false}},"additionalProperties":false},"DocsRedirect":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"permanent":{"type":"boolean"}},"required":["from","to"],"additionalProperties":false},"DocsRedirects":{"type":"object","properties":{"redirects":{"type":"array","items":{"$ref":"#/components/schemas/DocsRedirect"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Entries the next build would drop, checked against the latest build."}},"required":["redirects","warnings"]},"SetDocsRedirectsRequest":{"type":"object","properties":{"base":{"type":"array","items":{"$ref":"#/components/schemas/DocsRedirect"},"description":"The redirects list you read, so edits made since are kept."},"redirects":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":500},"to":{"type":"string","minLength":1,"maxLength":2000},"permanent":{"type":"boolean"}},"required":["from","to"],"additionalProperties":false}}},"required":["base","redirects"]},"SetDocsSitePasswordRequest":{"type":"object","properties":{"password":{"type":"string","minLength":12}},"required":["password"]},"DocsPreview":{"type":"object","properties":{"buildId":{"type":"string"},"documentId":{"type":"string","nullable":true,"description":"The page previewUrl opens on. Not stored with the build, so pass it again when polling."},"status":{"$ref":"#/components/schemas/DocsBuildStatus"},"error":{"type":"string","nullable":true},"previewUrl":{"type":"string","nullable":true,"description":"Set once the build succeeded. Opens in a browser signed in to Falconer."},"blockedByAnotherBuild":{"type":"boolean"},"queuedForMs":{"type":"integer","nullable":true}},"required":["buildId","documentId","status","error","previewUrl","blockedByAnotherBuild","queuedForMs"]},"RequestDocsPreviewRequest":{"type":"object","properties":{"documentId":{"type":"string","description":"Open the preview on this document's page."}}},"DocsCustomDomain":{"type":"object","properties":{"customDomain":{"type":"string","nullable":true},"mode":{"type":"string","nullable":true,"enum":["host","path"],"description":"host: point a CNAME at cnameTarget. path: proxy the path to proxyTarget yourself."},"status":{"type":"string","enum":["none","pending","ready","active","suspended","removing","failed"]},"validation":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"description":"DNS record that proves you own a host-mode domain."},"cnameTarget":{"type":"string"},"proxyTarget":{"type":"object","nullable":true,"properties":{"host":{"type":"string"},"basePath":{"type":"string"}},"required":["host","basePath"]},"edgeSettling":{"type":"boolean","description":"The live site is still moving to its new address."},"addonsPending":{"type":"boolean","description":"An enable or disable is still being applied."}},"required":["customDomain","mode","status","validation","cnameTarget","proxyTarget","edgeSettling","addonsPending"]},"SetDocsCustomDomainRequest":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"description":"A host such as docs.example.com, or a host and path such as example.com/docs that your own proxy forwards to the site."}},"required":["domain"]},"DocsCustomDomainCheck":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","ready","active","failed"]},"reason":{"type":"string"}},"required":["status"]},"Space":{"type":"object","properties":{"id":{"type":"integer"},"folderId":{"type":"integer","description":"The Space root folder's ID."},"name":{"type":"string"},"description":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"isRepoSynced":{"type":"boolean"},"hasDocsSite":{"type":"boolean"}},"required":["id","folderId","name","description","icon","isRepoSynced","hasDocsSite"]},"SpaceList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Space"}}},"required":["data"]},"CreateSpaceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","nullable":true,"maxLength":500},"icon":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["open","restricted"],"description":"open (default) lets every member in; restricted starts with only you."}},"required":["name"]},"ConvertFolderToSpaceRequest":{"type":"object","properties":{"folderId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["folderId"]},"GithubConnection":{"type":"object","properties":{"connected":{"type":"boolean"},"username":{"type":"string","nullable":true},"hasRepoScope":{"type":"boolean","description":"Whether the connection carries the repo scope pushes need."},"canPush":{"type":"boolean"},"connectUrl":{"type":"string","description":"Open in a browser signed in to Falconer to connect GitHub."}},"required":["connected","username","hasRepoScope","canPush","connectUrl"]},"TwoWaySyncMergeStrategy":{"type":"string","enum":["direct_commit","review_request","pull_request"]},"TwoWaySyncFileKind":{"type":"string","enum":["markdown","text","config","opaque"]},"TwoWaySyncFileStatus":{"type":"string","enum":["in_sync","modified","added","conflict","remote_deleted","pending_delete","pending_rename","in_review","open_pr"]},"TwoWaySyncFileEntry":{"type":"object","properties":{"path":{"type":"string","description":"Path relative to the sync root."},"repoPath":{"type":"string","description":"Path in the repository."},"fileNodeId":{"type":"string","nullable":true},"kind":{"$ref":"#/components/schemas/TwoWaySyncFileKind"},"documentId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/TwoWaySyncFileStatus"},"fromPath":{"type":"string","nullable":true,"description":"Previous path of a file renamed since the last push."},"conflictId":{"type":"string","nullable":true},"review":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["awaiting","approved","changes_requested"]},"reviewerCount":{"type":"integer"},"isCurrentUserReviewer":{"type":"boolean"}},"required":["state","reviewerCount","isCurrentUserReviewer"]},"hasPendingSuggestions":{"type":"boolean","description":"Un-accepted suggestions block a push until resolved."},"canPush":{"type":"boolean","description":"Whether you can push this change now."}},"required":["path","repoPath","fileNodeId","kind","documentId","title","status","fromPath","conflictId","review","hasPendingSuggestions","canPush"]},"TwoWaySyncStatus":{"type":"object","properties":{"spaceId":{"type":"integer"},"folderId":{"type":"integer","description":"The Space root folder's ID, for /nav and /folders."},"repository":{"type":"string"},"branch":{"type":"string"},"basePath":{"type":"string"},"mergeStrategy":{"$ref":"#/components/schemas/TwoWaySyncMergeStrategy"},"counts":{"type":"object","properties":{"in_sync":{"type":"integer"},"modified":{"type":"integer"},"added":{"type":"integer"},"conflict":{"type":"integer"},"remote_deleted":{"type":"integer"},"pending_delete":{"type":"integer"},"pending_rename":{"type":"integer"},"in_review":{"type":"integer"},"open_pr":{"type":"integer"}}},"lastSyncFailure":{"type":"object","nullable":true,"properties":{"reason":{"type":"string"},"failedAt":{"type":"string"},"neverImported":{"type":"boolean"}},"required":["reason","failedAt","neverImported"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TwoWaySyncFileEntry"}},"nextCursor":{"type":"string"}},"required":["spaceId","folderId","repository","branch","basePath","mergeStrategy","counts","lastSyncFailure","data"]},"FileDiff":{"type":"object","properties":{"path":{"type":"string"},"repoPath":{"type":"string"},"fileNodeId":{"type":"string"},"kind":{"$ref":"#/components/schemas/TwoWaySyncFileKind"},"change":{"type":"string","enum":["none","modified","added","deleted"]},"baseCommitSha":{"type":"string","nullable":true,"description":"Commit the repository side of the diff was read at."},"unifiedDiff":{"type":"string","description":"Repository version to Falconer version; empty when equal."}},"required":["path","repoPath","fileNodeId","kind","change","baseCommitSha","unifiedDiff"]},"PushFileResponse":{"type":"object","properties":{"path":{"type":"string"},"repoPath":{"type":"string"},"outcome":{"type":"string","enum":["committed","no_changes","pull_request_opened","pull_request_updated"]},"commitSha":{"type":"string","nullable":true},"commitUrl":{"type":"string","nullable":true},"pullRequest":{"type":"object","nullable":true,"properties":{"number":{"type":"integer"},"url":{"type":"string"}},"required":["number","url"]}},"required":["path","repoPath","outcome","commitSha","commitUrl","pullRequest"]},"GithubConnectionRequired":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"connectUrl":{"type":"string"}},"required":["connectUrl"]}]},"PushFileRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"fileNodeId":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1,"maxLength":200},"forceNewPullRequest":{"type":"boolean","description":"Open a new pull request instead of updating an open one."}},"required":["commitMessage"]},"KeepRepoFileResponse":{"type":"object","properties":{"path":{"type":"string"},"kept":{"type":"boolean","description":"false when no delete was queued, or it was already pushed."}},"required":["path","kept"]},"KeepRepoFileRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"fileNodeId":{"type":"string","minLength":1}}},"PushAllChangesResponse":{"type":"object","properties":{"pushed":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"},"failures":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","nullable":true},"reason":{"type":"string"}},"required":["path","reason"]}},"heldBack":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","nullable":true}},"required":["path"]},"description":"Files left out because the repository changed them too."},"pullRequestUrl":{"type":"string","nullable":true},"pullRequestUpdated":{"type":"boolean"},"repositoryChangesPushed":{"type":"boolean"},"commitUrl":{"type":"string","nullable":true}},"required":["pushed","failed","skipped","failures","heldBack","pullRequestUrl","pullRequestUpdated","repositoryChangesPushed","commitUrl"]},"PushAllChangesRequest":{"type":"object","properties":{"commitMessage":{"type":"string","minLength":1,"maxLength":2000},"paths":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Markdown pages to push instead of every change. Pull request folders only."},"pullRequestTarget":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["new"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["existing"]},"number":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["mode","number"]}]}}},"TwoWaySyncConflictType":{"type":"string","enum":["update","remove"],"description":"update: edited in the repository; remove: deleted there."},"TwoWaySyncConflict":{"allOf":[{"$ref":"#/components/schemas/TwoWaySyncFileEntry"},{"type":"object","properties":{"conflictId":{"type":"string"},"conflictType":{"$ref":"#/components/schemas/TwoWaySyncConflictType"},"description":{"type":"string"},"detectedAt":{"type":"string"}},"required":["conflictType","description","detectedAt"]}]},"TwoWaySyncConflictList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TwoWaySyncConflict"}},"nextCursor":{"type":"string"}},"required":["data"]},"FileConflict":{"type":"object","properties":{"conflictId":{"type":"string"},"path":{"type":"string"},"repoPath":{"type":"string"},"fileNodeId":{"type":"string","nullable":true},"documentId":{"type":"string"},"type":{"$ref":"#/components/schemas/TwoWaySyncConflictType"},"updatedAt":{"type":"string","description":"Echo back when resolving; a newer conflict returns 409."},"baseCommitSha":{"type":"string","nullable":true},"localMarkdown":{"type":"string"},"remoteMarkdown":{"type":"string","nullable":true},"unifiedDiff":{"type":"string","description":"Falconer version to repository version."},"blockHunks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"op":{"type":"string","enum":["context","changed"]},"local":{"type":"array","items":{"type":"string"}},"remote":{"type":"array","items":{"type":"string"}}},"required":["id","op","local","remote"]}},"blockHunksFingerprint":{"type":"string"},"hasPendingSuggestions":{"type":"boolean"},"allowedResolutions":{"type":"array","items":{"type":"string","enum":["keep_local","archive_local","apply_full","reject","apply_merged"]}}},"required":["conflictId","path","repoPath","fileNodeId","documentId","type","updatedAt","baseCommitSha","localMarkdown","remoteMarkdown","unifiedDiff","blockHunks","blockHunksFingerprint","hasPendingSuggestions","allowedResolutions"]},"ResolveFileConflictResponse":{"type":"object","properties":{"conflictId":{"type":"string"},"path":{"type":"string"},"resolution":{"type":"string","enum":["keep_local","archive_local","apply_full","reject","apply_merged"]},"push":{"type":"object","nullable":true,"properties":{"ok":{"type":"boolean"},"commitSha":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["ok","commitSha","reason"]}},"required":["conflictId","path","resolution","push"]},"ResolveFileConflictRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"fileNodeId":{"type":"string","minLength":1},"conflictId":{"type":"string","minLength":1,"description":"Conflict id from list_two_way_sync_conflicts, instead of a path."},"updatedAt":{"type":"string","format":"date-time"},"resolution":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["keep_local"],"description":"Keep the Falconer page after a repository delete."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["archive_local"],"description":"Accept the repository delete and archive the page."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["apply_full"],"description":"Take the repository version."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["reject"],"description":"Keep the Falconer version and discard the repository edit."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["apply_merged"]},"decisions":{"type":"object","additionalProperties":{"type":"string","enum":["local","remote"]},"description":"Side to keep for each changed block hunk id."},"blockHunksFingerprint":{"type":"string","minLength":1}},"required":["kind","decisions","blockHunksFingerprint"]}]},"push":{"type":"boolean","description":"Push the result to the repository after resolving. Only reject and apply_merged push; keep_local queues the file to be recreated, so push it afterwards with push_file."}},"required":["updatedAt","resolution"]},"ResolveFileConflictsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"conflictId":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"ok":{"type":"boolean"},"push":{"type":"object","nullable":true,"properties":{"ok":{"type":"boolean"},"commitSha":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["ok","commitSha","reason"]},"error":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","nullable":true,"properties":{"status":{"type":"integer"}},"required":["status"]}]}},"required":["conflictId","path","ok","push","error"]}}},"required":["data"]},"ResolveFileConflictsRequest":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"fileNodeId":{"type":"string","minLength":1},"conflictId":{"type":"string","minLength":1,"description":"Conflict id from list_two_way_sync_conflicts, instead of a path."},"updatedAt":{"type":"string","format":"date-time"},"resolution":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["keep_local"],"description":"Keep the Falconer page after a repository delete."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["archive_local"],"description":"Accept the repository delete and archive the page."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["apply_full"],"description":"Take the repository version."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["reject"],"description":"Keep the Falconer version and discard the repository edit."}},"required":["kind"]}]}},"required":["updatedAt","resolution"]},"minItems":1,"maxItems":50},"push":{"type":"boolean"}},"required":["items"]},"GithubRepositoryList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"owner/repo"},"archived":{"type":"boolean"}},"required":["name","archived"]}},"installUrl":{"type":"string","description":"Open in a browser signed in to Falconer to install the GitHub app on more repositories."}},"required":["data","installUrl"]},"GithubBranchList":{"type":"object","properties":{"branches":{"type":"array","items":{"type":"string"}},"defaultBranch":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["branches","defaultBranch","hasMore"]},"GithubBranch":{"type":"object","properties":{"name":{"type":"string"},"baseBranch":{"type":"string"}},"required":["name","baseBranch"]},"CreateGithubBranchRequest":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"description":"owner/repo"},"baseBranch":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["repository","baseBranch","name"]},"GithubFolderList":{"type":"object","properties":{"path":{"type":"string"},"folders":{"type":"array","items":{"type":"string"}},"mdFiles":{"type":"array","items":{"type":"string"}},"configFiles":{"type":"array","items":{"type":"string"}}},"required":["path","folders","mdFiles","configFiles"]},"GithubDocsConfig":{"type":"object","properties":{"fileName":{"type":"string","nullable":true,"description":"The docs config found at the base path, such as docs.json."}},"required":["fileName"]},"TwoWaySyncRunStarted":{"type":"object","properties":{"spaceId":{"type":"integer"},"folderId":{"type":"integer","description":"The Space root folder's ID, for /nav and /folders."},"repository":{"type":"string"},"taskId":{"type":"string","nullable":true,"description":"Poll GET /two-way-sync/{spaceId}/runs/{taskId}. null when no run started: an export bind, or a retry folded into a run already queued."}},"required":["spaceId","folderId","repository","taskId"]},"BindRepositoryRequest":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"description":"owner/repo, from GET /github/repositories."},"branch":{"type":"string","minLength":1},"basePath":{"type":"string","description":"Repository folder to sync; the repository root when omitted."},"mergeStrategy":{"$ref":"#/components/schemas/TwoWaySyncMergeStrategy"},"direction":{"type":"string","enum":["import","export"],"description":"import (default) pulls the repository in. export binds without importing; run POST /two-way-sync/{spaceId}/export next. Export needs direct_commit."},"setUpDocsite":{"type":"boolean","description":"Also reserve a docs site seeded from the repository docs config."}},"required":["repository","branch","mergeStrategy"]},"TwoWaySyncSettings":{"type":"object","properties":{"spaceId":{"type":"integer"},"folderId":{"type":"integer","description":"The Space root folder's ID, for /nav and /folders."},"repository":{"type":"string"},"basePath":{"type":"string"},"branch":{"type":"string"},"mergeStrategy":{"$ref":"#/components/schemas/TwoWaySyncMergeStrategy"},"canEdit":{"type":"boolean"},"pendingReviewCount":{"type":"integer"}},"required":["spaceId","folderId","repository","basePath","branch","mergeStrategy","canEdit","pendingReviewCount"]},"UpdateTwoWaySyncSettingsRequest":{"type":"object","properties":{"mergeStrategy":{"$ref":"#/components/schemas/TwoWaySyncMergeStrategy"}},"required":["mergeStrategy"]},"TwoWaySyncRun":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed","canceled"]},"progress":{"type":"object","nullable":true,"properties":{"current":{"type":"integer"},"total":{"type":"integer"},"percent":{"type":"number"},"message":{"type":"string"}},"required":["current","total","percent"]},"error":{"type":"string","nullable":true},"imported":{"type":"object","properties":{"total":{"type":"integer"},"linked":{"type":"integer"}},"required":["total","linked"],"description":"Markdown files in the folder, and how many this run has linked so far."}},"required":["taskId","status","progress","error","imported"]},"ExportSpaceResponse":{"type":"object","properties":{"commitSha":{"type":"string","nullable":true},"exported":{"type":"integer"},"unresolved":{"type":"array","items":{"type":"string"}},"linkedDocuments":{"type":"integer"}},"required":["commitSha","exported","unresolved","linkedDocuments"]},"ExportSpaceRequest":{"type":"object","properties":{"allowNonEmpty":{"type":"boolean","description":"Write into a base path that already holds files."}}},"TwoWaySyncCommit":{"type":"object","properties":{"sha":{"type":"string"},"shortSha":{"type":"string"},"url":{"type":"string"},"message":{"type":"string"},"authoredAt":{"type":"string","nullable":true},"author":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"login":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true}},"required":["name","login","avatarUrl"]},"pr":{"type":"object","nullable":true,"properties":{"number":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"]}},"required":["sha","shortSha","url","message","authoredAt","author","pr"]},"TwoWaySyncCommitPage":{"type":"object","properties":{"status":{"type":"string","enum":["ok","not_connected","reconnect_required","repo_unreadable"],"description":"Commit history is read with your personal GitHub account; anything but ok means it could not be."},"firstSyncedAt":{"type":"string","nullable":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/TwoWaySyncCommit"}},"nextCursor":{"type":"integer"}},"required":["status","firstSyncedAt","data"]},"TwoWaySyncPullRequestList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"url":{"type":"string"},"title":{"type":"string"},"documentCount":{"type":"integer"},"lastPushedByName":{"type":"string","nullable":true},"isMine":{"type":"boolean"},"reuse":{"type":"string","enum":["allowed","blocked","unrelated"],"description":"allowed: a push can land on it. blocked: it is on the current branch but a push will not join it. unrelated: it targets a branch this folder no longer syncs."}},"required":["number","url","title","documentCount","lastPushedByName","isMine","reuse"]}}},"required":["data"]},"TwoWaySyncFileHistory":{"type":"object","properties":{"path":{"type":"string"},"repository":{"type":"object","nullable":true,"properties":{"owner":{"type":"string"},"repo":{"type":"string"},"fullName":{"type":"string"},"url":{"type":"string"}},"required":["owner","repo","fullName","url"]},"mergeStrategy":{"allOf":[{"$ref":"#/components/schemas/TwoWaySyncMergeStrategy"},{"nullable":true}]},"pushed":{"allOf":[{"$ref":"#/components/schemas/TwoWaySyncCommit"},{"nullable":true,"description":"The last commit Falconer pushed for this page."}]},"source":{"allOf":[{"$ref":"#/components/schemas/TwoWaySyncCommit"},{"nullable":true,"description":"The last repository commit this page was pulled from."}]},"openPullRequest":{"type":"object","nullable":true,"properties":{"number":{"type":"integer"},"url":{"type":"string"},"isMine":{"type":"boolean"}},"required":["number","url","isMine"]}},"required":["path","repository","mergeStrategy","pushed","source","openPullRequest"]},"SpaceFile":{"type":"object","properties":{"fileNodeId":{"type":"string"},"path":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["file","directory"]},"kind":{"type":"string","description":"markdown (a page), text, config, or opaque (binary, such as an image)."},"category":{"type":"string","nullable":true,"enum":["document","asset","config"]},"documentId":{"type":"string","nullable":true,"description":"The page document for a markdown file; read it with GET /docs/{id}."},"hasNavPlacement":{"type":"boolean","description":"False for a page that is only in the Files view."},"hasContent":{"type":"boolean"},"managedConfig":{"type":"boolean","description":"Generated from site settings; edit those instead."},"inertConfig":{"type":"boolean","description":"Seeded the site once and is no longer read."},"repoBacked":{"type":"boolean"},"pendingRemoval":{"type":"boolean","description":"Queued for removal from GitHub on the next push."}},"required":["fileNodeId","path","name","type","kind","category","documentId","hasNavPlacement","hasContent","managedConfig","inertConfig","repoBacked","pendingRemoval"]},"SpaceFileList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SpaceFile"}},"nextCursor":{"type":"string"}},"required":["data"]},"TextFile":{"type":"object","properties":{"path":{"type":"string"},"fileNodeId":{"type":"string"},"content":{"type":"string"},"sourceContent":{"type":"string","nullable":true,"description":"What the repository held at last sync, or null if it never had the file."},"matchesSource":{"type":"boolean"},"etag":{"type":"string","description":"Pass back as ifMatch (or If-Match) so a write cannot clobber an edit you never saw."}},"required":["path","fileNodeId","content","sourceContent","matchesSource","etag"]},"StaleTextFile":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"etag":{"type":"string","description":"The current etag; read the file again before retrying."}},"required":["etag"]}]},"WriteTextFileRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Path relative to the Space root, such as guides/setup.mdx."},"content":{"type":"string"},"ifMatch":{"type":"string","description":"etag from the read; * skips the check. The If-Match header wins when both are set."}},"required":["path","content"]},"SpaceFileRef":{"type":"object","properties":{"fileNodeId":{"type":"string"},"path":{"type":"string"}},"required":["fileNodeId","path"]},"CreateSpaceDirectoryRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Path relative to the Space root, such as guides/setup.mdx."}},"required":["path"]},"CreatedSpacePage":{"type":"object","properties":{"documentId":{"type":"string"},"fileNodeId":{"type":"string"},"path":{"type":"string"}},"required":["documentId","fileNodeId","path"]},"CreateSpacePageRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Path of the new .md or .mdx file."},"title":{"type":"string","maxLength":200},"content":{"type":"string","description":"Markdown body; the page starts empty without it."}},"required":["path"]},"MovedSpaceFile":{"type":"object","properties":{"fileNodeId":{"type":"string"},"path":{"type":"string"},"descendantPaths":{"type":"array","items":{"type":"string"}}},"required":["fileNodeId","path","descendantPaths"]},"MoveSpaceFileRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Path relative to the Space root, such as guides/setup.mdx."},"fileNodeId":{"type":"string","minLength":1},"toPath":{"type":"string","minLength":1,"maxLength":1024,"description":"Full destination path, which may rename the file."}},"required":["toPath"]},"DeletedSpaceFile":{"type":"object","properties":{"deleted":{"type":"integer"},"archivedDocumentIds":{"type":"array","items":{"type":"string"}},"pendingRemovalDocumentIds":{"type":"array","items":{"type":"string"},"description":"Synced pages that stay until a push removes them from GitHub."}},"required":["deleted","archivedDocumentIds","pendingRemovalDocumentIds"]},"DeleteSpaceFileRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Path relative to the Space root, such as guides/setup.mdx."},"fileNodeId":{"type":"string","minLength":1},"confirmedArchive":{"type":"boolean","description":"Whether you expect pages to be archived (synced Spaces) rather than deleted; a mismatch answers 409."}}},"PublishedSpaceFile":{"type":"object","properties":{"navItemId":{"type":"integer"},"documentId":{"type":"string"}},"required":["navItemId","documentId"]},"PublishSpaceFileRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Path relative to the Space root, such as guides/setup.mdx."},"fileNodeId":{"type":"string","minLength":1},"parentNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Navigation container to place the page in; the site root by default."}}},"UploadedSpaceFile":{"type":"object","properties":{"fileNodeId":{"type":"string"},"path":{"type":"string"},"kind":{"type":"string"}},"required":["fileNodeId","path","kind"]},"UploadSpaceFileRequest":{"type":"object","properties":{"contentBase64":{"type":"string","description":"File bytes, base64 encoded; at most 5 MB decoded. Send raw bytes as application/octet-stream for larger files."}},"required":["contentBase64"]},"SpaceFileDownload":{"type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"},"expiresAt":{"type":"string","nullable":true,"description":"When a signed url stops working; null for an inline data: url."}},"required":["url","filename","expiresAt"]},"DocsAccessLevel":{"type":"string","nullable":true,"enum":["public","private"],"description":"The container's own docs site access; null inherits."},"DocsViewNode":{"type":"object","properties":{"navItemId":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string","enum":["container","page"]},"documentId":{"type":"string","nullable":true},"path":{"type":"string","nullable":true,"description":"The page's file, or the container's directory, in the Files view; null when it has none."},"kind":{"allOf":[{"$ref":"#/components/schemas/DocsContainerKind"},{"nullable":true,"description":"How a container renders on the docs site; null for pages."}]},"config":{"allOf":[{"$ref":"#/components/schemas/DocsContainerOptions"},{"nullable":true}]},"hidden":{"type":"boolean"},"access":{"$ref":"#/components/schemas/DocsAccessLevel"},"url":{"type":"string","nullable":true,"description":"Where the published docs site serves the page; null when nothing is published."},"children":{"type":"array","items":{"$ref":"#/components/schemas/DocsViewNode"}}},"required":["navItemId","title","type","documentId","path","kind","config","hidden","access","url","children"]},"DocsView":{"type":"object","properties":{"spaceId":{"type":"integer"},"rootNavItemId":{"type":"integer","description":"The Space root; reorder the top level with its children/order route."},"docsSite":{"type":"boolean"},"twoWaySync":{"type":"boolean"},"mirrorsFiles":{"type":"boolean","description":"Whether the Docs view follows the repo files: containers are directories, pages cannot hold pages, and nothing can be unlisted."},"data":{"type":"array","items":{"$ref":"#/components/schemas/DocsViewNode"}}},"required":["spaceId","rootNavItemId","docsSite","twoWaySync","mirrorsFiles","data"]},"CreatedDocsViewPage":{"type":"object","properties":{"navItemId":{"type":"integer"},"documentId":{"type":"string"},"path":{"type":"string","nullable":true,"description":"The file created for it in the Files view."},"url":{"type":"string"}},"required":["navItemId","documentId","path","url"]},"CreateDocsViewPageRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","description":"Markdown body; the page starts empty without it."},"parentNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Container or page to place it under; the top level by default."},"position":{"type":"string","enum":["start","end"],"description":"Where among its siblings it lands; end by default."}},"required":["title"],"additionalProperties":false},"DocsViewItemRef":{"type":"object","properties":{"navItemId":{"type":"integer"},"path":{"type":"string","nullable":true,"description":"The item's file or directory in the Files view, if any."}},"required":["navItemId","path"]},"CreateDocsViewFolderRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"containerKind":{"allOf":[{"$ref":"#/components/schemas/DocsContainerKind"},{"description":"How it renders on the docs site; tab only at the top level."}]},"containerConfig":{"$ref":"#/components/schemas/DocsContainerOptions"},"parentNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Container or page to place it under; the top level by default."},"position":{"type":"string","enum":["start","end"],"description":"Where among its siblings it lands; end by default."}},"required":["title"],"additionalProperties":false},"DocsContainerEditOptions":{"type":"object","properties":{"icon":{"type":"string","minLength":1,"maxLength":200},"href":{"type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false,"description":"Icon and destination; replaces the ones set before."},"UpdateDocsViewItemRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255,"description":"A container's title. A page's title is its first heading; change it with PUT /docs/{id}."},"fileName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\]+$","description":"Renames the file or directory behind the item in place, such as getting-started.mdx. Its folder stays the same."},"kind":{"$ref":"#/components/schemas/DocsContainerKind"},"config":{"$ref":"#/components/schemas/DocsContainerEditOptions"},"access":{"allOf":[{"$ref":"#/components/schemas/DocsAccessLevel"},{"description":"null clears it so the container inherits again."}]},"hidden":{"type":"boolean"}},"additionalProperties":false},"MovedDocsViewItems":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"navItemId":{"type":"integer"},"status":{"type":"string","enum":["moved"]},"path":{"type":"string","nullable":true,"description":"Where its file or directory is now."}},"required":["navItemId","status","path"]},{"type":"object","properties":{"navItemId":{"type":"integer"},"status":{"type":"string","enum":["failed"]},"message":{"type":"string"},"code":{"type":"string"}},"required":["navItemId","status","message","code"]}]}}},"required":["data"]},"MoveDocsViewItemsRequest":{"type":"object","properties":{"navItemIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1,"maxItems":50,"description":"Items to move, in the order they should land."},"parentNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Container or page to place it under; the top level by default."},"beforeNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"afterNavItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["navItemIds"],"additionalProperties":false},"RemovedDocsViewItem":{"type":"object","properties":{"mode":{"type":"string","enum":["unlist","delete"]},"removedNavItemIds":{"type":"array","items":{"type":"integer"}},"deletedFiles":{"type":"integer","description":"Files and directories deleted from the Files view."},"archivedDocumentIds":{"type":"array","items":{"type":"string"}},"pendingRemovalDocumentIds":{"type":"array","items":{"type":"string"},"description":"Synced pages that stay until a push removes them from GitHub."}},"required":["mode","removedNavItemIds","deletedFiles","archivedDocumentIds","pendingRemovalDocumentIds"]},"RemoveDocsViewItemRequest":{"type":"object","properties":{"navItemId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"mode":{"type":"string","enum":["unlist","delete"],"description":"unlist takes it out of the Docs view and keeps its files; delete also deletes its file or directory and every page under it."},"confirmedArchive":{"type":"boolean","description":"For delete: whether you expect pages to be archived (synced Spaces) rather than deleted; a mismatch answers 409."}},"required":["navItemId","mode"],"additionalProperties":false}},"parameters":{}},"paths":{"/api/v1/knowledge":{"get":{"summary":"List Falconer knowledge topics","security":[],"responses":{"200":{"description":"Public Falconer knowledge topics and product documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FalconerKnowledgeIndex"}}}}}}},"/api/v1/knowledge/content":{"get":{"summary":"Read a Falconer knowledge topic","security":[],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"topic","in":"query"}],"responses":{"200":{"description":"Public Falconer knowledge content in Markdown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FalconerKnowledgeContent"}}}},"400":{"description":"A nonempty topic is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The topic does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/me":{"get":{"responses":{"200":{"description":"Current user and organization info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}}}}},"/api/v1/orgs":{"get":{"responses":{"200":{"description":"Organizations available to the current user","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}},"required":["data"]}}}}}}},"/api/v1/answers":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}}},"responses":{"200":{"description":"Synthesized agent answer with citations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Organization credit balance is negative or member monthly credit limit has been reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/search":{"get":{"parameters":[{"schema":{"type":"string","description":"Document identifier. Accepts multiple formats: document ID, document slug, document title, or a full URL containing /editor/{slug} or /view/{slug} (slug will be extracted). When provided, searches for documents matching the identifier."},"required":false,"description":"Document identifier. Accepts multiple formats: document ID, document slug, document title, or a full URL containing /editor/{slug} or /view/{slug} (slug will be extracted). When provided, searches for documents matching the identifier.","name":"identifier","in":"query"},{"schema":{"type":"string","description":"Keyword/lexical search query"},"required":false,"description":"Keyword/lexical search query","name":"keywords","in":"query"},{"schema":{"type":"string","description":"Semantic/natural language search query"},"required":false,"description":"Semantic/natural language search query","name":"semantic","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"List of matching documents","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"allOf":[{"$ref":"#/components/schemas/DocumentReadFormat"},{"default":"markdown"}]},"required":false,"description":"markdown is Falconer markdown. mdx is the file a two-way sync push writes to the repository (or the page as MDX when it is not synced), with images as repository paths.","name":"format","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"For format mdx, the synced Space whose repository file to render. Required when the page is in more than one."},"required":false,"description":"For format mdx, the synced Space whose repository file to render. Required when the page is in more than one.","name":"spaceId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadDocument"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The page is in more than one synced Space; pass spaceId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverwriteDocument"}}}},"responses":{"200":{"description":"Document overwritten","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedDocument"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/revisions":{"get":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document revisions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to list document revisions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"201":{"description":"Document revision created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevision"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to create document revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/revisions/{revisionId}":{"get":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Revision ID, or revision number such as \"3\" or \"v3\"."},"required":true,"name":"revisionId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document revision content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionContent"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to read document revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document revision not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Revision ID, or revision number such as \"3\" or \"v3\"."},"required":true,"name":"revisionId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document revision deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedDocumentRevision"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to delete document revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document revision not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/revisions/{revisionId}/restore":{"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Revision ID, or revision number such as \"3\" or \"v3\"."},"required":true,"name":"revisionId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document revision restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to restore document revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document revision not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocument"}}}},"responses":{"201":{"description":"Document created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedDocument"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditDocument"}}}},"responses":{"200":{"description":"Document updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/permissions":{"patch":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentPermissions"}}}},"responses":{"200":{"description":"Document permissions updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPermissions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to update document permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/metadata":{"patch":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentMetadata"}}}},"responses":{"200":{"description":"Document metadata updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMetadataResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to update document metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/status":{"patch":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentStatus"}}}},"responses":{"200":{"description":"Document status updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStatusResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to update document status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/reviewers":{"get":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document reviewers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentReviewers"}}}},"403":{"description":"Not allowed to view document reviewers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentReviewers"}}}},"responses":{"200":{"description":"Document reviewers updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentReviewers"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to manage document reviewers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/content/edits":{"patch":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyDocumentEdits"}}}},"responses":{"200":{"description":"Edits applied; see outcomes for each edit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEditsResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/content/replace":{"patch":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceDocumentContent"}}}},"responses":{"200":{"description":"Document content replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/content/insert":{"patch":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsertDocumentContent"}}}},"responses":{"200":{"description":"Document content inserted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/content/delete":{"patch":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDocumentContent"}}}},"responses":{"200":{"description":"Document content deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/comments":{"get":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["active","resolved","all"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Document comment threads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCommentsResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentComment"}}}},"responses":{"201":{"description":"Document comment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedDocumentComment"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/comments/{commentId}/replies":{"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentReply"}}}},"responses":{"201":{"description":"Comment reply created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedComment"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/comments/{commentId}":{"patch":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateComment"}}}},"responses":{"200":{"description":"Comment updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatedComment"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Comment deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentMutationSuccess"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/comments/{commentId}/resolve":{"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Comment resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentMutationSuccess"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/comments/{commentId}/unresolve":{"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Comment unresolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentMutationSuccess"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/nav/children":{"get":{"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/NavSection"},{"default":"company"}]},"required":false,"name":"section","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Parent folder or document nav item ID. Omit for the section root."},"required":false,"description":"Parent folder or document nav item ID. Omit for the section root.","name":"parentFolderId","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Parent document UUID."},"required":false,"description":"Parent document UUID.","name":"parentDocumentId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Read from this Space's root. Pass instead of parentFolderId or parentDocumentId."},"required":false,"description":"Read from this Space's root. Pass instead of parentFolderId or parentDocumentId.","name":"spaceId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Visible child folders and documents for a nav location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavChildrenResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Parent document has multiple nav placements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/nav/tree":{"get":{"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/NavSection"},{"default":"company"}]},"required":false,"name":"section","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Parent folder or document nav item ID. Omit for the section root."},"required":false,"description":"Parent folder or document nav item ID. Omit for the section root.","name":"parentFolderId","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Parent document UUID."},"required":false,"description":"Parent document UUID.","name":"parentDocumentId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Read from this Space's root. Pass instead of parentFolderId or parentDocumentId."},"required":false,"description":"Read from this Space's root. Pass instead of parentFolderId or parentDocumentId.","name":"spaceId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":5,"default":2},"required":false,"name":"depth","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"required":false,"name":"maxNodes","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Visible nav tree for a section, folder, or document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavTreeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Parent document has multiple nav placements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/folders/{folderId}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"folderId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Folder metadata with visible one-level children","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"folderId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFolder"}}}},"responses":{"200":{"description":"Folder updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"folderId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Folder removed: archived, or in a docs site or synced Space removed the way its Docs view removes it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedFolder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/folders":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolder"}}}},"responses":{"201":{"description":"Folder created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/folders/{folderId}/order":{"patch":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"folderId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFolderOrder"}}}},"responses":{"200":{"description":"Folder child order updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/nav/items/{parentNavItemId}/children/order":{"patch":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"parentNavItemId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNavChildrenOrder"}}}},"responses":{"200":{"description":"Nav item child order updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavChildrenOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nav item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/nav/items/{navItemId}/move":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"navItemId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveNavItem"}}}},"responses":{"200":{"description":"Moved nav item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nav item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The move widens who can see the content; retry with acknowledgeWidenedAccess","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/nav/items/move":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveNavItems"}}}},"responses":{"200":{"description":"Each item is moved on its own; a failure does not undo the moves before it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovedNavItems"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/move":{"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveDocumentNavItem"}}}},"responses":{"200":{"description":"Moved document nav item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document or nav item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmbiguousDocumentPlacement"}}}},"412":{"description":"The move widens who can see the content; retry with acknowledgeWidenedAccess","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs/{id}/publish":{"post":{"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDocument"}}}},"responses":{"200":{"description":"Published document nav item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Document or nav item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmbiguousDocumentPlacement"}}}}}}},"/api/v1/uploads":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadMediaRequest"}}}},"responses":{"201":{"description":"Uploaded media or file attachment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedMedia"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/uploads/{id}":{"delete":{"description":"Permanently delete an upload you created. Active document or file references must be removed or archived first.","parameters":[{"schema":{"type":"string","minLength":1,"description":"The ID returned when creating the upload."},"required":true,"description":"The ID returned when creating the upload.","name":"id","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Upload deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"404":{"description":"Upload deletion failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Upload deletion failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Upload deletion failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Upload deletion failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/uploads/sessions":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadSessionRequest"}}}},"responses":{"201":{"description":"Upload session. PUT the raw file bytes to uploadUrl with the given headers, then complete the session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/uploads/sessions/complete":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadSessionRequest"}}}},"responses":{"200":{"description":"The session was already completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedMedia"}}}},"201":{"description":"Uploaded media or file attachment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedMedia"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/knowledge-health/findings":{"get":{"parameters":[{"schema":{"$ref":"#/components/schemas/KhFindingCategory"},"required":true,"description":"Category to list. One per call - the hosted UI shows one bucket at a time.","name":"category","in":"query"},{"schema":{"allOf":[{"$ref":"#/components/schemas/KhFindingSeverity"},{"description":"Optional severity filter."}]},"required":false,"description":"Optional severity filter.","name":"severity","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Open findings for the requested category.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KhFindingList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Knowledge Health v2 is not enabled for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/knowledge-health/findings/{findingKey}":{"patch":{"parameters":[{"schema":{"type":"string","minLength":1,"description":"findingKey from GET /knowledge-health/findings."},"required":true,"description":"findingKey from GET /knowledge-health/findings.","name":"findingKey","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KhFindingUpdateRequest"}}}},"responses":{"200":{"description":"Update applied, or ok:false with a stale-findingKey message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KhFindingUpdateResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Knowledge Health v2 is not enabled for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites":{"get":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Public docs sites you can edit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSiteList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocsSiteRequest"}}}},"responses":{"200":{"description":"The Space already has this docs site.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"201":{"description":"Docs site created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The docs site with its latest build.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/subdomain":{"put":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDocsSubdomainRequest"}}}},"responses":{"200":{"description":"Subdomain saved. The live site moves to it with the next published build.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/builds":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerDocsBuildRequest"}}}},"responses":{"202":{"description":"Release build queued, or the matching build already in the queue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsBuild"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"nextCursor from the previous page."},"required":false,"description":"nextCursor from the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Release builds, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsBuildList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/builds/{buildId}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"buildId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The build.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsBuild"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"buildId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"204":{"description":"The build and its files were deleted."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The build is live or still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/builds/{buildId}/publish":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"buildId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDocsBuildRequest"}}}},"responses":{"200":{"description":"The site after the build was published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/unpublish":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The site after it was taken offline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/broken-links":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Broken links found by the latest succeeded build.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsBrokenLinks"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/config":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The site settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSiteConfig"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocsSiteConfigRequest"}}}},"responses":{"200":{"description":"The settings after the change. Omitted fields are kept and null clears one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSiteConfig"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A logo or favicon path has no image in the site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/redirects":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The stored redirects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsRedirects"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDocsRedirectsRequest"}}}},"responses":{"200":{"description":"The redirects after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsRedirects"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/password":{"put":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDocsSitePasswordRequest"}}}},"responses":{"200":{"description":"The site, now asking visitors for this password.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The site, open to everyone again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/password/sign-out-visitors":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"204":{"description":"Every visitor has to enter the password again."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/builds/{buildId}/retry-index":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"buildId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"202":{"description":"Search indexing queued again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsBuild"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The build is already indexed or indexing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/builds/{buildId}/cancel":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"buildId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"204":{"description":"The queued build was removed."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The build already started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/previews":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestDocsPreviewRequest"}}}},"responses":{"202":{"description":"Preview build queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsPreview"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/previews/{buildId}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"buildId","in":"path"},{"schema":{"type":"string","description":"Open the preview on this document's page."},"required":false,"description":"Open the preview on this document's page.","name":"documentId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Your preview build.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsPreview"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/custom-domain":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The custom domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsCustomDomain"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDocsCustomDomainRequest"}}}},"responses":{"200":{"description":"The domain, pending until its DNS checks out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsCustomDomain"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits for the custom domain add-on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The site changed or the domain is in use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Verify, disable, or remove the current domain first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CloudFront is still working on the domain; retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The site without its domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsCustomDomain"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits for the custom domain add-on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The site changed or the domain is in use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Verify, disable, or remove the current domain first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CloudFront is still working on the domain; retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/custom-domain/check":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Whether the domain is verified and ready to enable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsCustomDomainCheck"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/custom-domain/activate":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The domain, with the paid add-on enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsCustomDomain"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits for the custom domain add-on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The site changed or the domain is in use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Verify, disable, or remove the current domain first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CloudFront is still working on the domain; retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-sites/{spaceId}/custom-domain/disable":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The domain, kept but no longer serving or billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsCustomDomain"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits for the custom domain add-on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Public docs are not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Docs site or build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The site changed or the domain is in use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Verify, disable, or remove the current domain first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CloudFront is still working on the domain; retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/spaces":{"get":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The Spaces you can view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpaceRequest"}}}},"responses":{"201":{"description":"Space created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Only organization owners can create Spaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/spaces/convert":{"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertFolderToSpaceRequest"}}}},"responses":{"201":{"description":"The folder is now a Space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Only organization owners can create Spaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/spaces/{spaceId}":{"delete":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"204":{"description":"Space archived with its documents. Repository sync in it is disconnected."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Only organization owners can archive Spaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Space has a published docs site, a custom domain, or a paid add-on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/me/github":{"get":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Your personal GitHub connection for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnection"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TwoWaySyncFileStatus"},"description":"Only these statuses; repeat or comma-separate."},"required":false,"description":"Only these statuses; repeat or comma-separate.","name":"status","in":"query"},{"schema":{"type":"string","description":"Only paths under this prefix."},"required":false,"description":"Only paths under this prefix.","name":"prefix","in":"query"},{"schema":{"type":"array","items":{"type":"string","minLength":1},"description":"Only these paths; repeat for several."},"required":false,"description":"Only these paths; repeat for several.","name":"path","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Include files with no changes."},"required":false,"description":"Include files with no changes.","name":"includeInSync","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"nextCursor from the previous page."},"required":false,"description":"nextCursor from the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Sync status of the files under the sync root, by path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncStatus"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files/status":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"required":false,"description":"Path relative to the sync root. Pass this or fileNodeId.","name":"path","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"fileNodeId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Sync status of one file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncFileEntry"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files/diff":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"required":false,"description":"Path relative to the sync root. Pass this or fileNodeId.","name":"path","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"fileNodeId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"What pushing the file would change in the repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDiff"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"File has no text diff","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files/push":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushFileRequest"}}}},"responses":{"200":{"description":"The file was pushed, or there was nothing to push.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushFileResponse"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The file has an open conflict, or the repository changed it after your edit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Connect a personal GitHub account with the repo scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionRequired"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files/keep":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeepRepoFileRequest"}}}},"responses":{"200":{"description":"The queued delete was cancelled, so the repository keeps the file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeepRepoFileResponse"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A page, which is kept by restoring its document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/push":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushAllChangesRequest"}}}},"responses":{"200":{"description":"Every pushable change was attempted; per-file failures are listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushAllChangesResponse"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Connect a personal GitHub account with the repo scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionRequired"}}}},"422":{"description":"A selected path is not a markdown page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/conflicts":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"nextCursor from the previous page."},"required":false,"description":"nextCursor from the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Files changed or deleted in the repository and in Falconer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncConflictList"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files/conflict":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"required":false,"description":"Path relative to the sync root. Pass this or fileNodeId.","name":"path","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"fileNodeId","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Conflict id, instead of a path."},"required":false,"description":"Conflict id, instead of a path.","name":"conflictId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Both sides of the conflict and how it can be resolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileConflict"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a markdown page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files/conflict/resolve":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveFileConflictRequest"}}}},"responses":{"200":{"description":"The conflict was resolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveFileConflictResponse"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The conflict or page changed since it was read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Connect a personal GitHub account with the repo scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionRequired"}}}},"422":{"description":"Not a markdown page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/conflicts/resolve":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveFileConflictsRequest"}}}},"responses":{"200":{"description":"One result per item, in request order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveFileConflictsResponse"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Connect a personal GitHub account with the repo scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionRequired"}}}}}}},"/api/v1/github/repositories":{"get":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Repositories the organization connected through the GitHub app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubRepositoryList"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/github/repositories/branches":{"get":{"parameters":[{"schema":{"type":"string","minLength":1,"description":"owner/repo"},"required":true,"description":"owner/repo","name":"repository","in":"query"},{"schema":{"type":"string","description":"Only branches containing this."},"required":false,"description":"Only branches containing this.","name":"query","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Branches of the repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubBranchList"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"parameters":[{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGithubBranchRequest"}}}},"responses":{"201":{"description":"Branch created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubBranch"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The branch already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Connect a personal GitHub account with the repo scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/github/repositories/folders":{"get":{"parameters":[{"schema":{"type":"string","minLength":1,"description":"owner/repo"},"required":true,"description":"owner/repo","name":"repository","in":"query"},{"schema":{"type":"string","description":"Folder to list; the repository root when omitted."},"required":false,"description":"Folder to list; the repository root when omitted.","name":"path","in":"query"},{"schema":{"type":"string"},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"One level of the repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubFolderList"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/github/repositories/docs-config":{"get":{"parameters":[{"schema":{"type":"string","minLength":1,"description":"owner/repo"},"required":true,"description":"owner/repo","name":"repository","in":"query"},{"schema":{"type":"string","minLength":1},"required":true,"name":"branch","in":"query"},{"schema":{"type":"string"},"required":false,"name":"basePath","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The docs config at the base path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubDocsConfig"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/bind":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindRepositoryRequest"}}}},"responses":{"202":{"description":"Bound; the first import is running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncRunStarted"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The folder or the repository path is already synced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The merge strategy cannot be used for this bind","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The Space overlaps a synced folder or holds other metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The folder repository binding.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncSettings"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTwoWaySyncSettingsRequest"}}}},"responses":{"200":{"description":"Settings saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncSettings"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"204":{"description":"Disconnected. Documents keep their content; pending sync reviews are discarded."},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/retry":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"202":{"description":"A full re-sync was queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncRunStarted"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A sync of this folder is already running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/runs/{taskId}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"taskId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The run status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncRun"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/export":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportSpaceRequest"}}}},"responses":{"200":{"description":"The folder was written to the repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportSpaceResponse"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder or repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The base path already holds files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Connect a personal GitHub account with the repo scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/commits":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"nextCursor from the previous page."},"required":false,"description":"nextCursor from the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Repository commits pulled into the folder, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncCommitPage"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/pull-requests":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Open Falconer pull requests from this folder. Empty unless the folder pushes through pull requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncPullRequestList"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/two-way-sync/{spaceId}/files/history":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Path relative to the sync root. Pass this or fileNodeId."},"required":false,"description":"Path relative to the sync root. Pass this or fileNodeId.","name":"path","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"fileNodeId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"A page's last pushed and pulled commits and its open pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoWaySyncFileHistory"}}}},"400":{"description":"Bad request, or a folder that is not the sync root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Two-way sync is not enabled or permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Folder not synced, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The file is not a markdown page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Only paths under this directory, such as guides."},"required":false,"description":"Only paths under this directory, such as guides.","name":"prefix","in":"query"},{"schema":{"type":"string","enum":["file","directory"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["document","asset","config"]},"required":false,"name":"category","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":500},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"nextCursor from the previous page."},"required":false,"description":"nextCursor from the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Files in path order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceFileList"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/text":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Path relative to the Space root. Pass this or fileNodeId."},"required":false,"description":"Path relative to the Space root. Pass this or fileNodeId.","name":"path","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"fileNodeId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"Text file, with its etag also in the ETag header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextFile"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a text file; read pages with GET /docs/{id}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteTextFileRequest"}}}},"responses":{"200":{"description":"File updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextFile"}}}},"201":{"description":"File created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextFile"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"411":{"description":"Content-Length is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The file changed since the etag was read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaleTextFile"}}}},"413":{"description":"Text files are capped at 5 MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a text file; edit pages with PUT /docs/{id}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/directories":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpaceDirectoryRequest"}}}},"responses":{"201":{"description":"Folder created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceFileRef"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Something already exists at that path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/pages":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpacePageRequest"}}}},"responses":{"201":{"description":"Page created, only in the Files view until published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedSpacePage"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Something already exists at that path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/move":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveSpaceFileRequest"}}}},"responses":{"200":{"description":"Moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovedSpaceFile"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Something already exists at the destination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/delete":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSpaceFileRequest"}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedSpaceFile"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"confirmedArchive does not match what the delete would do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/publish-page":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishSpaceFileRequest"}}}},"responses":{"200":{"description":"The file is now a page in the navigation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedSpaceFile"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/content":{"put":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Path of the file to write."},"required":true,"description":"Path of the file to write.","name":"path","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Replace an existing file; without it an existing path answers 409."},"required":false,"description":"Replace an existing file; without it an existing path answers 409.","name":"replace","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":false,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"$ref":"#/components/schemas/UploadSpaceFileRequest"}}}},"responses":{"200":{"description":"File replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedSpaceFile"}}}},"201":{"description":"File created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedSpaceFile"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A file already exists at that path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"411":{"description":"Content-Length is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/file-views/{spaceId}/download":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Path relative to the Space root. Pass this or fileNodeId."},"required":false,"description":"Path relative to the Space root. Pass this or fileNodeId.","name":"path","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"fileNodeId","in":"query"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"A URL that downloads the file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceFileDownload"}}}},"400":{"description":"Bad request, such as a missing parent folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space not found, or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-views/{spaceId}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"responses":{"200":{"description":"The Docs view tree, with file paths","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsView"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space or item not found, or the Space has neither a docs site nor two-way sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-views/{spaceId}/pages":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocsViewPageRequest"}}}},"responses":{"201":{"description":"Page created, with its file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedDocsViewPage"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space or item not found, or the Space has neither a docs site nor two-way sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-views/{spaceId}/folders":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocsViewFolderRequest"}}}},"responses":{"201":{"description":"Container created; a directory too where the Docs view follows the files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsViewItemRef"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space or item not found, or the Space has neither a docs site nor two-way sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-views/{spaceId}/items/{navItemId}":{"patch":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"navItemId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocsViewItemRequest"}}}},"responses":{"200":{"description":"Item updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsViewItemRef"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space or item not found, or the Space has neither a docs site nor two-way sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Something already exists at the new file name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-views/{spaceId}/move":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveDocsViewItemsRequest"}}}},"responses":{"200":{"description":"Each item is moved on its own, with its file; a failure does not undo the moves before it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovedDocsViewItems"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space or item not found, or the Space has neither a docs site nor two-way sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-views/{spaceId}/items/{navItemId}/children/order":{"put":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"navItemId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNavChildrenOrder"}}}},"responses":{"200":{"description":"Children reordered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavChildrenOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space or item not found, or the Space has neither a docs site nor two-way sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/docs-views/{spaceId}/remove":{"post":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Space id, from GET /spaces."},"required":true,"description":"Space id, from GET /spaces.","name":"spaceId","in":"path"},{"schema":{"type":"string","description":"Required when using OAuth bearer tokens."},"required":false,"name":"x-organization-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveDocsViewItemRequest"}}}},"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovedDocsViewItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Space or item not found, or the Space has neither a docs site nor two-way sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"confirmedArchive does not match what the delete would do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}