{"openapi":"3.1.0","info":{"title":"Markdrop","version":"0.1.0"},"paths":{"/api/v1/documents":{"post":{"tags":["documents"],"summary":"Create Document","operationId":"create_document_api_v1_documents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}":{"get":{"tags":["documents"],"summary":"Get Document","description":"One document, through access.can(read).\n\nScope: a tenant token's workspace wins over ``X-Markdrop-Workspace`` (set by\nthe edge on a workspace's own domain; unsigned, so it can only narrow).\n\nRenamed documents (Q4): a slug that is in some document's ``old_slugs``\nanswers — only to a caller who can read that document — ``200\n{\"moved\": true, \"slug\": <current>, \"url\", \"workspace_url\", \"folder_path\"}``\nwith header ``X-Markdrop-Moved: <current>``; the page then 307s to the\ncanonical address. Anyone else gets exactly the denial the current slug\nwould give them (404 / 401 + gate), never the new slug.","operationId":"get_document_api_v1_documents__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-read-password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Read-Password"}},{"name":"x-edit-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Edit-Secret"}},{"name":"x-markdrop-workspace","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Markdrop-Workspace"}},{"name":"x-markdrop-path","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Markdrop-Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["documents"],"summary":"Update Document","operationId":"update_document_api_v1_documents__slug__put","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-edit-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Edit-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["documents"],"summary":"Delete Document","operationId":"delete_document_api_v1_documents__slug__delete","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-edit-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Edit-Secret"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/edit-secret/rotate":{"post":{"tags":["documents"],"summary":"Rotate Edit Secret","description":"A9: the owner replaces a leaked edit secret. The old one stops working\nat once; the new one is returned once.","operationId":"rotate_edit_secret_api_v1_documents__slug__edit_secret_rotate_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/claim":{"post":{"tags":["documents"],"summary":"Claim Document","description":"Attach an anonymous document to the logged-in account (proven via secret).","operationId":"claim_document_api_v1_documents__slug__claim_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-edit-secret","in":"header","required":true,"schema":{"type":"string","title":"X-Edit-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/copy":{"post":{"tags":["documents"],"summary":"Copy Document","description":"Import a copy of a readable document into the caller's account.\n\nOwned by the caller with a fresh slug, no password and no expiry; born\nprivate unless the source is plainly public (Q3). 404/401/403 exactly as a\nread of the source would answer.","operationId":"copy_document_api_v1_documents__slug__copy_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-markdrop-workspace","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Markdrop-Workspace"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCopyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/slug":{"patch":{"tags":["documents"],"summary":"Change Slug","operationId":"change_slug_api_v1_documents__slug__slug_patch","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-edit-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Edit-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/settings":{"patch":{"tags":["documents"],"summary":"Update Settings","description":"A document's password and expiry, without its content (the share\ndialog's \"More options\"). can(edit_settings): the owner or the edit\nsecret. Same transition as ``PUT /{slug}`` with those fields: a new\npassword narrows (epoch bump, bytes closed first, cache purge awaited);\nremoving it widens; an expiry books its purge. A past date is 422.","operationId":"update_settings_api_v1_documents__slug__settings_patch","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-edit-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Edit-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/report":{"post":{"tags":["documents"],"summary":"Report Document","description":"Flag a document for abuse (public, rate-limited). Always 202; stored\nonly when the slug exists.","operationId":"report_document_api_v1_documents__slug__report_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/artifacts/status":{"get":{"tags":["artifacts"],"summary":"Artifact Status","description":"Feature gate + quota for the UI. Safe to call when nothing is configured.","operationId":"artifact_status_api_v1_artifacts_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactStatusResponse"}}}}}}},"/api/v1/artifacts/upload-url":{"post":{"tags":["artifacts"],"summary":"Create Upload Url","operationId":"create_upload_url_api_v1_artifacts_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactUploadUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/artifacts":{"post":{"tags":["artifacts"],"summary":"Confirm Artifact","description":"Verify the uploaded blob, then publish it at a slug.","operationId":"confirm_artifact_api_v1_artifacts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/artifacts/paste":{"post":{"tags":["artifacts"],"summary":"Paste Html","description":"Publish pasted HTML directly — the most-requested flow.\n\nSmall enough that a presigned round trip would be pointless; anything larger\nshould go through the file-upload path.","operationId":"paste_html_api_v1_artifacts_paste_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactPasteRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/artifacts/{slug}":{"patch":{"tags":["artifacts"],"summary":"Update Artifact Settings","description":"Edit an artifact's title (owner, editors, members on non-private files)\nor its password / expiry (owner only, A3).\n\nSeparate from the markdown update route because that one requires a\n`content` body, which an artifact doesn't have. Publicity, the access epoch,\ncache purges and live events follow from services/transitions.py.","operationId":"update_artifact_settings_api_v1_artifacts__slug__patch","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/artifacts/{slug}/file":{"put":{"tags":["artifacts"],"summary":"Replace Artifact File","description":"Swap the file behind an artifact, keeping its URL and settings.\n\nSingle file → single file: can(replace_file) — the owner, editor grantees\nand workspace members on non-private files (Q6); counted against the\n**owner's** quota, and a non-owner whose upload would need the owner's old\nversions dropped gets 507 instead. Either side a zipped site:\ncan(replace_bundle) — owner only.\n\nSame verify-then-commit shape as creation: the object is HEADed for its real\nsize and type before anything is written, and the previous object (or bundle\nprefix) is freed only once the swap has succeeded.","operationId":"replace_artifact_file_api_v1_artifacts__slug__file_put","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactReplaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/uploads":{"post":{"tags":["files"],"summary":"Create Upload","operationId":"create_upload_api_v1_files_uploads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/uploads/{upload_id}/urls":{"post":{"tags":["files"],"summary":"Refresh Upload Urls","operationId":"refresh_upload_urls_api_v1_files_uploads__upload_id__urls_post","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UploadUrlsRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/uploads/{upload_id}":{"get":{"tags":["files"],"summary":"Upload Status","operationId":"upload_status_api_v1_files_uploads__upload_id__get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["files"],"summary":"Cancel Upload","operationId":"cancel_upload_api_v1_files_uploads__upload_id__delete","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/uploads/{upload_id}/complete":{"post":{"tags":["files"],"summary":"Complete Upload","description":"200 with the result, or 202 ``{state: \"verifying\", upload_id}`` when the\nsha256 check outlasts the wait: poll ``GET /uploads/{id}`` until ``state``\nis \"done\" (``result``) or \"failed\" (``error``). Calling it again on a\nfinished upload returns the same result.","operationId":"complete_upload_api_v1_files_uploads__upload_id__complete_post","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UploadCompleteRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{slug}":{"get":{"tags":["files"],"summary":"File Info","operationId":"file_info_api_v1_files__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{slug}/versions":{"get":{"tags":["files"],"summary":"File Versions","operationId":"file_versions_api_v1_files__slug__versions_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileVersionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{slug}/versions/{version}/restore":{"post":{"tags":["files"],"summary":"Restore File Version","operationId":"restore_file_version_api_v1_files__slug__versions__version__restore_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google/diagram.png":{"get":{"tags":["google-docs"],"summary":"Diagram Image","description":"Render an ASCII/box-drawing diagram to PNG.\n\nPublic and unauthenticated by design: Google's markdown→Doc converter fetches\nthis URL anonymously while importing an exported document. The diagram text is\ncarried (compressed) in ``d`` — nothing is read from the database.","operationId":"diagram_image_api_v1_google_diagram_png_get","parameters":[{"name":"d","in":"query","required":true,"schema":{"type":"string","description":"encoded diagram","title":"D"},"description":"encoded diagram"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google/mermaid.png":{"get":{"tags":["google-docs"],"summary":"Mermaid Image","description":"Render a Mermaid diagram to PNG (public — Google's converter fetches it).\n\nDelegates to Kroki server-side; on any failure we fall back to rendering the\nMermaid source as a monospace image so the export never silently loses it.","operationId":"mermaid_image_api_v1_google_mermaid_png_get","parameters":[{"name":"d","in":"query","required":true,"schema":{"type":"string","description":"encoded mermaid source","title":"D"},"description":"encoded mermaid source"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google/math.png":{"get":{"tags":["google-docs"],"summary":"Math Image","description":"Render a LaTeX expression to PNG (public — Google's converter fetches it).","operationId":"math_image_api_v1_google_math_png_get","parameters":[{"name":"d","in":"query","required":true,"schema":{"type":"string","description":"encoded LaTeX","title":"D"},"description":"encoded LaTeX"},{"name":"display","in":"query","required":false,"schema":{"type":"integer","description":"1 for block/display math, 0 for inline","default":0,"title":"Display"},"description":"1 for block/display math, 0 for inline"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google/connect":{"get":{"tags":["google-docs"],"summary":"Connect","description":"Return the Google consent URL. The frontend redirects the browser to it.\n\nThe logged-in user id is signed into the OAuth ``state`` so the callback can\nattribute the returned refresh token without an Authorization header.","operationId":"connect_api_v1_google_connect_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleConnectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google/callback":{"get":{"tags":["google-docs"],"summary":"Callback","description":"Handle Google's redirect: store the encrypted refresh token on the user.","operationId":"callback_api_v1_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google/status":{"get":{"tags":["google-docs"],"summary":"Status","operationId":"status_api_v1_google_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleStatusResponse"}}}}}}},"/api/v1/google/disconnect":{"post":{"tags":["google-docs"],"summary":"Disconnect","description":"Revoke the grant at Google, then forget the stored token.\n\nWe revoke on Google's side first so the user is fully disconnected (the app\nloses all Drive access), then clear locally regardless of whether the revoke\ncall succeeded — a dead/network-failed token must not leave the account stuck\nin a \"connected\" state.","operationId":"disconnect_api_v1_google_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleStatusResponse"}}}}}}},"/api/v1/google/documents/{doc_id}/export":{"post":{"tags":["google-docs"],"summary":"Export Document","description":"Create the linked Google Doc, or refresh it from the current content.\n\nFirst call creates a Doc (Phase 1). Subsequent calls update the same Doc\nin place (Phase 2). Markdown stays the source of truth.","operationId":"export_document_api_v1_google_documents__doc_id__export_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleExportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}},"patch":{"tags":["auth"],"summary":"Update Me","description":"Set the display name (used for passwordless email accounts with no name).","operationId":"update_me_api_v1_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/google/login":{"get":{"tags":["auth"],"summary":"Google Login","description":"Redirect the browser to Google's consent screen.","operationId":"google_login_api_v1_auth_google_login_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/google/callback":{"get":{"tags":["auth"],"summary":"Google Callback","description":"Handle Google's redirect: exchange code, upsert user, issue our session.","operationId":"google_callback_api_v1_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/email/request":{"post":{"tags":["auth"],"summary":"Email Request","description":"Email the caller a login code + magic link. Always returns {status: sent}.","operationId":"email_request_api_v1_auth_email_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/email/verify":{"post":{"tags":["auth"],"summary":"Email Verify Otp","description":"Verify a 6-digit OTP and return a session token (used by the frontend form).","operationId":"email_verify_otp_api_v1_auth_email_verify_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["auth"],"summary":"Email Verify Link","description":"Consume a magic link and redirect to the frontend with a session token.","operationId":"email_verify_link_api_v1_auth_email_verify_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/unsubscribe":{"get":{"tags":["auth"],"summary":"Unsubscribe","description":"One-click opt-out of bulk email. Public by design.\n\nMail clients hit this unauthenticated via List-Unsubscribe, so authority\ncomes from the signed token (HMAC(AUTH_SECRET, \"unsub:{uid}\")) rather than a\nsession. It only ever stops mail, so there is nothing to escalate even if a\nlink leaks. Transactional mail (sign-in codes, invitations) is unaffected:\nthose are never bulk sends.\n\nAlso served at /api/v1/unsubscribe (``unsubscribe_alias_router`` below):\ncampaigns sent before the URL fix link there.","operationId":"unsubscribe_api_v1_auth_unsubscribe_get","parameters":[{"name":"t","in":"query","required":false,"schema":{"type":"string","default":"","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["auth"],"summary":"Unsubscribe Post","description":"RFC 8058 one-click: some clients POST rather than GET.","operationId":"unsubscribe_post_api_v1_auth_unsubscribe_post","parameters":[{"name":"t","in":"query","required":false,"schema":{"type":"string","default":"","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents":{"get":{"tags":["me"],"summary":"List My Documents","operationId":"list_my_documents_api_v1_me_documents_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"per_page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50,"minimum":1},{"type":"null"}],"title":"Per Page"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(markdown|document|artifact)$"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyDocListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics":{"get":{"tags":["me"],"summary":"Document Analytics","description":"Aggregated analytics: can(view_stats) — the owner only. A reader who\nisn't the owner gets 403, anyone else the read denial (404).","operationId":"document_analytics_api_v1_me_documents__slug__analytics_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|all)$","default":"30d","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/contacts":{"get":{"tags":["me"],"summary":"List Contacts","description":"Up to 50 people to suggest in the share dialog.\n\nOnly two sources, both people the caller already has a relationship with:\naddresses they have granted document access to themselves, and members of\nworkspaces they belong to (whom any member can already list). It is never a\nsearch over all users -- that would turn the share box into an oracle for\n\"does this address have an account here\". For the same reason a grant-only\ncontact carries no name: the share list never showed one either.\n\n`q` narrows by case-insensitive substring of email or name. Most recently\nshared-with first, then co-members by name. The caller is never included.","operationId":"list_contacts_api_v1_me_contacts_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/tokens":{"get":{"tags":["me"],"summary":"List Api Tokens","operationId":"list_api_tokens_api_v1_me_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenListResponse"}}}}}},"post":{"tags":["me"],"summary":"Create Api Token","description":"Create a personal API token (raw value returned once).","operationId":"create_api_token_api_v1_me_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/tokens/{token_id}":{"delete":{"tags":["me"],"summary":"Revoke Api Token","operationId":"revoke_api_token_api_v1_me_tokens__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics/overview":{"get":{"tags":["creator-analytics"],"summary":"Analytics Overview","operationId":"analytics_overview_api_v1_me_documents__slug__analytics_overview_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics/media":{"get":{"tags":["creator-analytics"],"summary":"Analytics Media","operationId":"analytics_media_api_v1_me_documents__slug__analytics_media_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"ver","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100000,"minimum":1},{"type":"null"}],"title":"Ver"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics/frame":{"get":{"tags":["creator-analytics"],"summary":"Analytics Frame","description":"A frame of the owner's video at ``t`` seconds (rounded), as a JPEG.\n404 when it isn't a video, or frames can't be made here.","operationId":"analytics_frame_api_v1_me_documents__slug__analytics_frame_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"t","in":"query","required":true,"schema":{"type":"number","maximum":86400,"minimum":0,"title":"T"}},{"name":"ver","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100000,"minimum":1},{"type":"null"}],"title":"Ver"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics/content":{"get":{"tags":["creator-analytics"],"summary":"Analytics Content","operationId":"analytics_content_api_v1_me_documents__slug__analytics_content_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics/pages":{"get":{"tags":["creator-analytics"],"summary":"Analytics Pages","operationId":"analytics_pages_api_v1_me_documents__slug__analytics_pages_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics/audience":{"get":{"tags":["creator-analytics"],"summary":"Analytics Audience","operationId":"analytics_audience_api_v1_me_documents__slug__analytics_audience_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics/versions":{"get":{"tags":["creator-analytics"],"summary":"Analytics Versions","operationId":"analytics_versions_api_v1_me_documents__slug__analytics_versions_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/documents/{slug}/analytics.csv":{"get":{"tags":["creator-analytics"],"summary":"Analytics Csv","operationId":"analytics_csv_api_v1_me_documents__slug__analytics_csv_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/analytics":{"get":{"tags":["creator-analytics"],"summary":"Analytics Home","operationId":"analytics_home_api_v1_me_analytics_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/analytics/live":{"get":{"tags":["creator-analytics"],"summary":"Analytics Live","operationId":"analytics_live_api_v1_me_analytics_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/me/analytics.csv":{"get":{"tags":["creator-analytics"],"summary":"Analytics Home Csv","operationId":"analytics_home_csv_api_v1_me_analytics_csv_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Range"}},{"name":"internal","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/preferences":{"patch":{"tags":["creator-analytics"],"summary":"Update Preferences","description":"Account preferences: ``analytics_digest`` \"weekly\" | \"off\".","operationId":"update_preferences_api_v1_me_preferences_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/digest/off":{"get":{"tags":["creator-analytics"],"summary":"Digest Off Page","description":"The \"Turn off weekly emails\" link. It asks before acting: mail scanners\nopen every link in an email, and a GET that acted would turn the email off\nfor people who never clicked. The button (and one-click) POSTs.","operationId":"digest_off_page_api_v1_me_digest_off_get","parameters":[{"name":"t","in":"query","required":false,"schema":{"type":"string","default":"","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["creator-analytics"],"summary":"Digest Off","description":"The page's button, and RFC 8058 one-click from List-Unsubscribe-Post.","operationId":"digest_off_api_v1_me_digest_off_post","parameters":[{"name":"t","in":"query","required":false,"schema":{"type":"string","default":"","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sync":{"post":{"tags":["sync"],"summary":"Sync Create","description":"Create + link a document from the editor (owned by the caller).\n\nA markdown file becomes a markdown document; an .html (or other text\nartifact) file becomes an artifact, so it publishes as a rendered page\nrather than as escaped source. Both sync through the same endpoints below,\nso the editor needs no second protocol.","operationId":"sync_create_api_v1_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncDocResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sync/{doc_id}":{"get":{"tags":["sync"],"summary":"Sync Pull","description":"Full pull of the current server content.","operationId":"sync_pull_api_v1_sync__doc_id__get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncDocResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["sync"],"summary":"Sync Push","description":"Push local content. 409 (with current content) if base_rev is stale.","operationId":"sync_push_api_v1_sync__doc_id__put","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPushRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncDocResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sync/{doc_id}/rev":{"get":{"tags":["sync"],"summary":"Sync Rev","description":"Cheap revision check for polling.","operationId":"sync_rev_api_v1_sync__doc_id__rev_get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRevResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/og/{slug}.png":{"get":{"tags":["og-image"],"summary":"Og Image","operationId":"og_image_api_v1_og__slug__png_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"host","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}],"title":"Host"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Record a bug report or feature request. Always returns {status: received}.","operationId":"submit_feedback_api_v1_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/docs/ask":{"post":{"tags":["docs"],"summary":"Ask","operationId":"ask_api_v1_docs_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/docs/ask/feedback":{"post":{"tags":["docs"],"summary":"Ask Feedback","operationId":"ask_feedback_api_v1_docs_ask_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerFeedbackBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/docs/feedback":{"post":{"tags":["docs"],"summary":"Page Feedback","operationId":"page_feedback_api_v1_docs_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageFeedbackBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/docs/ai/status":{"get":{"tags":["docs"],"summary":"Ai Status","operationId":"ai_status_api_v1_docs_ai_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/workspaces":{"get":{"tags":["workspaces"],"summary":"List Workspaces","operationId":"list_workspaces_api_v1_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceListResponse"}}}}}},"post":{"tags":["workspaces"],"summary":"Create Workspace","operationId":"create_workspace_api_v1_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}":{"get":{"tags":["workspaces"],"summary":"Get Workspace","operationId":"get_workspace_api_v1_workspaces__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workspaces"],"summary":"Update Workspace","operationId":"update_workspace_api_v1_workspaces__workspace_id__put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Delete Workspace","description":"Delete a workspace and everything that belongs to it.\n\nShared documents are released, not deleted -- they belong to their owners,\nnot to the workspace.","operationId":"delete_workspace_api_v1_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members":{"get":{"tags":["workspaces"],"summary":"List Members","operationId":"list_members_api_v1_workspaces__workspace_id__members_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/invitations":{"get":{"tags":["workspaces"],"summary":"List Invitations","operationId":"list_invitations_api_v1_workspaces__workspace_id__invitations_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workspaces"],"summary":"Create Invitation","description":"Invite someone by email.\n\nRate-limited by the hour rather than the minute, because the thing being\nspent here is not our CPU — it is someone else's inbox, and this endpoint\nwill happily send mail to an address its caller does not own.","operationId":"create_invitation_api_v1_workspaces__workspace_id__invitations_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/invitations/{invite_id}":{"delete":{"tags":["workspaces"],"summary":"Revoke Invitation","operationId":"revoke_invitation_api_v1_workspaces__workspace_id__invitations__invite_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/branding/{kind}":{"post":{"tags":["workspaces"],"summary":"Upload Branding Asset","description":"Upload a favicon or logo.\n\nThe stored URL is returned but not saved onto the workspace here: the\nsettings form owns that, and saving a field the user hasn't confirmed would\nmake \"upload, change your mind, close the tab\" leave the wrong logo live.","operationId":"upload_branding_asset_api_v1_workspaces__workspace_id__branding__kind__post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_branding_asset_api_v1_workspaces__workspace_id__branding__kind__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingAssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members/{member_user_id}":{"put":{"tags":["workspaces"],"summary":"Set Member Role","operationId":"set_member_role_api_v1_workspaces__workspace_id__members__member_user_id__put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Remove Member","operationId":"remove_member_api_v1_workspaces__workspace_id__members__member_user_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/domains":{"get":{"tags":["domains"],"summary":"List Domains","operationId":"list_domains_api_v1_workspaces__workspace_id__domains_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["domains"],"summary":"Add Domain","operationId":"add_domain_api_v1_workspaces__workspace_id__domains_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/domains/{domain_id}/verify":{"post":{"tags":["domains"],"summary":"Verify Domain","operationId":"verify_domain_api_v1_workspaces__workspace_id__domains__domain_id__verify_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/domains/{domain_id}/attach":{"post":{"tags":["domains"],"summary":"Attach Domain","description":"Attach a verified host so the edge will terminate TLS for it.\n\nReturns 501 rather than a 500 when no hosting credentials are configured:\nthat is a deployment that hasn't enabled the integration, not a fault, and\nthe caller should be told to finish the step by hand.","operationId":"attach_domain_api_v1_workspaces__workspace_id__domains__domain_id__attach_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/domains/{domain_id}/detach":{"post":{"tags":["domains"],"summary":"Detach Domain","description":"Take a verified domain off the air without discarding its verification.","operationId":"detach_domain_api_v1_workspaces__workspace_id__domains__domain_id__detach_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/domains/{domain_id}/provider":{"get":{"tags":["domains"],"summary":"Dns Provider Hint","description":"Which DNS panel this customer is about to open.\n\nA separate endpoint rather than a field on the domain list, because it costs\na live DNS lookup and the list is rendered on every visit to the tab. The UI\nasks for it only while the setup instructions are actually on screen, and\nonly admins see those.","operationId":"dns_provider_hint_api_v1_workspaces__workspace_id__domains__domain_id__provider_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsProviderHint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/domains/{domain_id}/primary":{"put":{"tags":["domains"],"summary":"Set Primary Domain","description":"Choose the domain this workspace is addressed by.\n\nAdmin, because it changes the address printed on every preview card and\nhanded out by the library — the workspace's public face, not one person's\npreference.","operationId":"set_primary_domain_api_v1_workspaces__workspace_id__domains__domain_id__primary_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/domains/{domain_id}":{"delete":{"tags":["domains"],"summary":"Remove Domain","operationId":"remove_domain_api_v1_workspaces__workspace_id__domains__domain_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/folders":{"get":{"tags":["folders"],"summary":"List Folders","operationId":"list_folders_api_v1_workspaces__workspace_id__folders_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["folders"],"summary":"Create Folder","operationId":"create_folder_api_v1_workspaces__workspace_id__folders_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/folders/{folder_id}":{"put":{"tags":["folders"],"summary":"Update Folder","operationId":"update_folder_api_v1_workspaces__workspace_id__folders__folder_id__put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["folders"],"summary":"Delete Folder","operationId":"delete_folder_api_v1_workspaces__workspace_id__folders__folder_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(unfile|move_up)$","default":"unfile","title":"Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workspace-items"],"summary":"Patch Folder","description":"Rename and/or move (``parent_id`` present; null = top level). Admin+\n(A10). The subtree's depth is validated, every document below gets its new\npath, and all of them are purged.","operationId":"patch_folder_api_v1_workspaces__workspace_id__folders__folder_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/documents/move":{"post":{"tags":["folders"],"summary":"Move Document","operationId":"move_document_api_v1_workspaces__workspace_id__documents_move_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMoveRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/tree":{"get":{"tags":["workspace-items"],"summary":"Workspace Tree","operationId":"workspace_tree_api_v1_workspaces__workspace_id__tree_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/items":{"get":{"tags":["workspace-items"],"summary":"Workspace Items","operationId":"workspace_items_api_v1_workspaces__workspace_id__items_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder","in":"query","required":false,"schema":{"type":"string","maxLength":64,"default":"all","title":"Folder"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(markdown|document|artifact)$"},{"type":"null"}],"title":"Kind"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/preview":{"get":{"tags":["workspace-items"],"summary":"Workspace Preview","description":"\"Preview as\": what ``as`` would see in this folder, and what is hidden\nfrom them and why — among the items the caller can see (services/preview.py).\nMember+; ``as=email`` admin+ (it reveals that person's grants).","operationId":"workspace_preview_api_v1_workspaces__workspace_id__preview_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder","in":"query","required":false,"schema":{"type":"string","maxLength":64,"default":"root","title":"Folder"}},{"name":"as","in":"query","required":false,"schema":{"enum":["anyone","member","email"],"type":"string","default":"anyone","title":"As"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/items/move":{"post":{"tags":["workspace-items"],"summary":"Items Move","description":"Batch refile (drag-and-drop): member+ for documents they can read. All\nare checked before any moves; one refusal refuses the batch.","operationId":"items_move_api_v1_workspaces__workspace_id__items_move_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsMove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/items/add":{"post":{"tags":["workspace-items"],"summary":"Items Add","description":"The owner files their own documents (D1); level unchanged unless\n``access`` is given.","operationId":"items_add_api_v1_workspaces__workspace_id__items_add_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/items/remove":{"post":{"tags":["workspace-items"],"summary":"Items Remove","description":"Unshare (D2/D4): the owner always (even after leaving), or an admin —\nincluding redacted rows, by ``handles`` (``id_token`` from /items).\n``workspace`` level becomes ``private``; a link document leaving a sign-in\nworkspace becomes private (Q2). Returns ``{items:[{slug, access_after}]}``\n(``slug`` is null for a handle the caller can't read).","operationId":"items_remove_api_v1_workspaces__workspace_id__items_remove_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsRemove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/folders/{folder_id}/share":{"put":{"tags":["workspace-items"],"summary":"Share Folder","description":"D2: a folder link shows each visitor only what they could already open.\nIt never changes any document's access. ``hidden`` lists the items the\ncaller can read that the link's audience couldn't.","operationId":"share_folder_api_v1_workspaces__workspace_id__folders__folder_id__share_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderShare"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workspace-items"],"summary":"Get Folder Share","description":"The folder's share (same shape as the PUT), or 404 when not shared.","operationId":"get_folder_share_api_v1_workspaces__workspace_id__folders__folder_id__share_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspace-items"],"summary":"Unshare Folder","operationId":"unshare_folder_api_v1_workspaces__workspace_id__folders__folder_id__share_delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/transfer":{"post":{"tags":["workspace-items"],"summary":"Transfer Ownership","description":"M5: owner → any existing member — viewers included: it is the owner's\nexplicit choice, and the new owner can change their own standing. The old\nowner becomes admin. Docs, grants and domains are unchanged.","operationId":"transfer_ownership_api_v1_workspaces__workspace_id__transfer_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipTransfer"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/folders/shared/{share_id}":{"get":{"tags":["folder-pages"],"summary":"Shared Folder","description":"A shared folder: ``{workspace:{name, branding…}, folder:{name, path,\nbreadcrumbs:[{name, path}]}, subfolders:[{name, path, count}], items:[{slug,\ntitle, kind, mime, url, size_bytes?, updated_at, poster_url?}]}`` — paths\nrelative to the shared root; items filtered to what this caller can read.\nLevel ``workspace`` needs a member (else 401 signin / 404).","operationId":"shared_folder_api_v1_folders_shared__share_id__get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","maxLength":1000,"default":"","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}":{"get":{"tags":["invitations"],"summary":"Preview Invitation","description":"What this link is for — shown before anyone commits to anything.\n\nResolved invitations still return 200 rather than an error, because \"this was\nalready accepted\" and \"you were uninvited\" are answers the reader needs, and\na 4xx here would leave the page with nothing to say.","operationId":"preview_invitation_api_v1_invites__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}/accept":{"post":{"tags":["invitations"],"summary":"Accept Invitation","operationId":"accept_invitation_api_v1_invites__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteAcceptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}/decline":{"post":{"tags":["invitations"],"summary":"Decline Invitation","operationId":"decline_invitation_api_v1_invites__token__decline_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/documents":{"get":{"tags":["library"],"summary":"List Library","operationId":"list_library_api_v1_workspaces__workspace_id__documents_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"per_page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50,"minimum":1},{"type":"null"}],"title":"Per Page"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(markdown|document|artifact)$"},{"type":"null"}],"title":"Kind"}},{"name":"folder_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},{"name":"unfiled","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unfiled"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyDocListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["library"],"summary":"Add To Library","operationId":"add_to_library_api_v1_workspaces__workspace_id__documents_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAddRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyDocListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/documents/counts":{"get":{"tags":["library"],"summary":"Library Counts","operationId":"library_counts_api_v1_workspaces__workspace_id__documents_counts_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/documents/{document_id}":{"delete":{"tags":["library"],"summary":"Remove From Library","description":"Unshare, not delete. The document goes back to its owner untouched.","operationId":"remove_from_library_api_v1_workspaces__workspace_id__documents__document_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/documents/{document_id}/folder":{"put":{"tags":["library"],"summary":"File Document","operationId":"file_document_api_v1_workspaces__workspace_id__documents__document_id__folder_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryFolderRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/access/level":{"post":{"tags":["access"],"summary":"Set Levels","description":"Batch level change (\"Open up the K you own\"): owner-only per document,\neach through the same rules as PUT /{slug}/access/level. Per-slug results\n``{results:[{slug, ok, error?}]}``.","operationId":"set_levels_api_v1_documents_access_level_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLevelUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/access":{"get":{"tags":["access"],"summary":"Get Access","description":"The sharing state, for anyone holding a role on the document (A6).\n\nA reader who merely has the link (no role) gets 404: the owner's address\nand the grantee list are not something a link exposes. Viewers see their\nown role and the owner's display name; the grantee list (and the owner's\naddress) is for the owner and editors.","operationId":"get_access_api_v1_documents__slug__access_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/access/level":{"put":{"tags":["access"],"summary":"Set Level","operationId":"set_level_api_v1_documents__slug__access_level_put","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LevelUpdate"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/access/resharing":{"put":{"tags":["access"],"summary":"Set Resharing","operationId":"set_resharing_api_v1_documents__slug__access_resharing_put","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResharingUpdate"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/access/people":{"post":{"tags":["access"],"summary":"Add Person","description":"Share with a named person, optionally telling them.\n\nA failed notification does **not** undo the grant: the access is real and\ncorrect, the email is a courtesy. The response says whether it went.","operationId":"add_person_api_v1_documents__slug__access_people_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/access/people/{email}":{"delete":{"tags":["access"],"summary":"Remove Person","operationId":"remove_person_api_v1_documents__slug__access_people__email__delete","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/shared":{"get":{"tags":["personal"],"summary":"Shared With Me","operationId":"shared_with_me_api_v1_me_shared_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/recent":{"get":{"tags":["personal"],"summary":"Recent","operationId":"recent_api_v1_me_recent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/search/quick":{"get":{"tags":["personal"],"summary":"Quick Search","operationId":"quick_search_api_v1_search_quick_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/access-requests":{"post":{"tags":["personal"],"summary":"Request Access","operationId":"request_access_api_v1_documents__slug__access_requests_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{slug}/access-requests/mine":{"get":{"tags":["personal"],"summary":"My Access Request","operationId":"my_access_request_api_v1_documents__slug__access_requests_mine_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/access-requests":{"get":{"tags":["personal"],"summary":"Access Requests For Me","operationId":"access_requests_for_me_api_v1_me_access_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["pending","approved","declined","all"],"type":"string","default":"pending","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-requests/{request_id}":{"get":{"tags":["personal"],"summary":"Get Access Request","operationId":"get_access_request_api_v1_access_requests__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/access-requests/{request_id}/decision":{"post":{"tags":["personal"],"summary":"Decide Access Request","operationId":"decide_access_request_api_v1_access_requests__request_id__decision_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/requests/{request_id}":{"get":{"tags":["oauth"],"summary":"Get Authorization Request","operationId":"get_authorization_request_api_v1_oauth_requests__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/requests/{request_id}/decision":{"post":{"tags":["oauth"],"summary":"Decide Authorization Request","operationId":"decide_authorization_request_api_v1_oauth_requests__request_id__decision_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/connections":{"get":{"tags":["oauth"],"summary":"List Connections","operationId":"list_connections_api_v1_me_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/me/connections/{client_id}":{"delete":{"tags":["oauth"],"summary":"Disconnect","operationId":"disconnect_api_v1_me_connections__client_id__delete","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"get":{"tags":["mcp"],"summary":"Mcp Get","operationId":"mcp_get_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["mcp"],"summary":"Mcp Post","operationId":"mcp_post_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["mcp"],"summary":"Mcp Delete","operationId":"mcp_delete_mcp_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccessRequestCreate":{"properties":{"message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Message"}},"type":"object","title":"AccessRequestCreate"},"AccessRequestDecision":{"properties":{"decision":{"type":"string","enum":["view","edit","decline"],"title":"Decision"}},"type":"object","required":["decision"],"title":"AccessRequestDecision"},"AccessResponse":{"properties":{"level":{"type":"string","enum":["private","link","workspace"],"title":"Level"},"allow_resharing":{"type":"boolean","title":"Allow Resharing"},"is_password_protected":{"type":"boolean","title":"Is Password Protected"},"encrypted":{"type":"boolean","title":"Encrypted"},"in_workspace":{"type":"boolean","title":"In Workspace"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"},"can":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Can"},"your_role":{"type":"string","enum":["owner","editor","viewer"],"title":"Your Role"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"your_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Your Email"},"can_manage":{"type":"boolean","title":"Can Manage"},"can_share":{"type":"boolean","title":"Can Share"},"grants":{"items":{"$ref":"#/components/schemas/GrantResponse"},"type":"array","title":"Grants"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"workspace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Url"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["level","allow_resharing","is_password_protected","encrypted","in_workspace","your_role","can_manage","can_share","grants"],"title":"AccessResponse"},"AnswerFeedbackBody":{"properties":{"request_id":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"Request Id"},"helpful":{"type":"boolean","title":"Helpful"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["request_id","helpful"],"title":"AnswerFeedbackBody"},"ApiTokenCreateResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"token":{"type":"string","title":"Token"}},"type":"object","required":["id","name","prefix","created_at","token"],"title":"ApiTokenCreateResponse"},"ApiTokenItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","name","prefix","created_at"],"title":"ApiTokenItem"},"ApiTokenListResponse":{"properties":{"tokens":{"items":{"$ref":"#/components/schemas/ApiTokenItem"},"type":"array","title":"Tokens"}},"type":"object","required":["tokens"],"title":"ApiTokenListResponse"},"ArtifactCreateRequest":{"properties":{"blob_key":{"type":"string","maxLength":300,"minLength":1,"title":"Blob Key"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Filename"},"custom_slug":{"anyOf":[{"type":"string","maxLength":50,"minLength":3,"pattern":"^[a-zA-Z0-9_-]+$"},{"type":"null"}],"title":"Custom Slug"},"expires_in":{"type":"string","enum":["never","1d","7d","30d","custom"],"title":"Expires In","default":"never"},"custom_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Custom Expires At"},"read_password":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Read Password"},"access_level":{"type":"string","enum":["private","link","workspace"],"title":"Access Level","default":"link"},"workspace":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Workspace"},"folder":{"anyOf":[{"type":"string","maxLength":400,"minLength":1},{"type":"null"}],"title":"Folder"}},"type":"object","required":["blob_key"],"title":"ArtifactCreateRequest","description":"Step 2: confirm an uploaded blob and mint the shareable document."},"ArtifactCreateResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"kind":{"type":"string","title":"Kind","default":"artifact"},"mime":{"type":"string","title":"Mime"},"renderer":{"type":"string","title":"Renderer"},"type_label":{"type":"string","title":"Type Label"},"size_bytes":{"type":"integer","title":"Size Bytes"},"original_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Filename"},"artifact_url":{"type":"string","title":"Artifact Url"},"workspace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Url"},"download_url":{"type":"string","title":"Download Url"},"poster_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Url"},"media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"views":{"type":"integer","title":"Views","default":0},"is_password_protected":{"type":"boolean","title":"Is Password Protected","default":false},"is_owner":{"type":"boolean","title":"Is Owner","default":false},"edit_secret":{"type":"string","title":"Edit Secret"},"workspace_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Error"}},"type":"object","required":["slug","url","title","mime","renderer","type_label","size_bytes","artifact_url","download_url","created_at","updated_at","edit_secret"],"title":"ArtifactCreateResponse"},"ArtifactPasteRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"custom_slug":{"anyOf":[{"type":"string","maxLength":50,"minLength":3,"pattern":"^[a-zA-Z0-9_-]+$"},{"type":"null"}],"title":"Custom Slug"},"expires_in":{"type":"string","enum":["never","1d","7d","30d","custom"],"title":"Expires In","default":"never"},"custom_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Custom Expires At"},"read_password":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Read Password"},"access_level":{"type":"string","enum":["private","link"],"title":"Access Level","default":"link"}},"type":"object","required":["content"],"title":"ArtifactPasteRequest","description":"Paste-an-HTML-page shortcut — no presigned round trip for small pages."},"ArtifactReplaceRequest":{"properties":{"blob_key":{"type":"string","maxLength":300,"minLength":1,"title":"Blob Key"},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Filename"}},"type":"object","required":["blob_key"],"title":"ArtifactReplaceRequest","description":"Swap the underlying file while keeping the slug, password and expiry."},"ArtifactResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"kind":{"type":"string","title":"Kind","default":"artifact"},"mime":{"type":"string","title":"Mime"},"renderer":{"type":"string","title":"Renderer"},"type_label":{"type":"string","title":"Type Label"},"size_bytes":{"type":"integer","title":"Size Bytes"},"original_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Filename"},"artifact_url":{"type":"string","title":"Artifact Url"},"workspace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Url"},"download_url":{"type":"string","title":"Download Url"},"poster_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Url"},"media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"views":{"type":"integer","title":"Views","default":0},"is_password_protected":{"type":"boolean","title":"Is Password Protected","default":false},"is_owner":{"type":"boolean","title":"Is Owner","default":false}},"type":"object","required":["slug","url","title","mime","renderer","type_label","size_bytes","artifact_url","download_url","created_at","updated_at"],"title":"ArtifactResponse"},"ArtifactSettingsRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"read_password":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Read Password"},"remove_password":{"type":"boolean","title":"Remove Password","default":false},"expires_in":{"anyOf":[{"type":"string","enum":["never","1h","1d","7d","30d","custom"]},{"type":"null"}],"title":"Expires In"},"custom_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Custom Expires At"}},"type":"object","title":"ArtifactSettingsRequest","description":"Owner-editable settings. Every field is optional — omitted means unchanged.\n\nSeparate from ``DocumentUpdate`` because that schema requires ``content``,\nwhich an artifact doesn't have (its bytes live in R2)."},"ArtifactStatusResponse":{"properties":{"configured":{"type":"boolean","title":"Configured"},"origin_isolated":{"type":"boolean","title":"Origin Isolated"},"origin_separate_site":{"type":"boolean","title":"Origin Separate Site","default":false},"max_file_bytes":{"type":"integer","title":"Max File Bytes"},"max_video_bytes":{"type":"integer","title":"Max Video Bytes","default":0},"quota_bytes":{"type":"integer","title":"Quota Bytes"},"used_bytes":{"type":"integer","title":"Used Bytes","default":0},"accepted_types":{"items":{"type":"string"},"type":"array","title":"Accepted Types","default":[]}},"type":"object","required":["configured","origin_isolated","max_file_bytes","quota_bytes"],"title":"ArtifactStatusResponse","description":"Drives UI gating — the feature stays hidden until R2 is wired up."},"ArtifactUploadUrlRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":255,"title":"Content Type"},"size_bytes":{"type":"integer","minimum":1.0,"title":"Size Bytes"},"target_slug":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}],"title":"Target Slug"}},"type":"object","required":["filename","content_type","size_bytes"],"title":"ArtifactUploadUrlRequest","description":"Step 1 of the upload: ask for a presigned PUT."},"ArtifactUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"blob_key":{"type":"string","title":"Blob Key"},"mime":{"type":"string","title":"Mime"},"required_content_type":{"type":"string","title":"Required Content Type"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["upload_url","blob_key","mime","required_content_type","expires_in"],"title":"ArtifactUploadUrlResponse"},"AskBody":{"properties":{"question":{"type":"string","maxLength":10000,"title":"Question"},"history":{"items":{},"type":"array","maxItems":60,"title":"History"},"page_path":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Page Path"},"conversation_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["question"],"title":"AskBody"},"BatchLevelUpdate":{"properties":{"slugs":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Slugs"},"level":{"type":"string","enum":["private","link","workspace"],"title":"Level"}},"type":"object","required":["slugs","level"],"title":"BatchLevelUpdate"},"Body_upload_branding_asset_api_v1_workspaces__workspace_id__branding__kind__post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_branding_asset_api_v1_workspaces__workspace_id__branding__kind__post"},"BrandingAssetResponse":{"properties":{"url":{"type":"string","title":"Url"},"kind":{"type":"string","enum":["favicon","logo"],"title":"Kind"}},"type":"object","required":["url","kind"],"title":"BrandingAssetResponse"},"BrandingPayload":{"properties":{"site_name":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Site Name"},"favicon_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Favicon Url"},"logo_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Logo Url"},"accent_color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},{"type":"null"}],"title":"Accent Color"},"hide_markdrop_branding":{"type":"boolean","title":"Hide Markdrop Branding","default":false},"logo_well":{"anyOf":[{"type":"string","enum":["light","dark","checker"]},{"type":"null"}],"title":"Logo Well"}},"type":"object","title":"BrandingPayload","description":"Every field optional — an unset workspace looks exactly like Markdrop."},"ContactItem":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"source":{"type":"string","enum":["shared","workspace"],"title":"Source"}},"type":"object","required":["email","source"],"title":"ContactItem","description":"Someone the signed-in user may be offered as a share suggestion.\n\nOnly ever drawn from people the user already has a relationship with — see\n`routers.me.list_contacts`. Never a global user search."},"ContactListResponse":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/ContactItem"},"type":"array","title":"Contacts"}},"type":"object","required":["contacts"],"title":"ContactListResponse"},"Decision":{"properties":{"approve":{"type":"boolean","title":"Approve"}},"type":"object","required":["approve"],"title":"Decision"},"DnsProviderHint":{"properties":{"detected":{"type":"boolean","title":"Detected","default":false},"provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Id"},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name"},"panel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Panel Url"},"host_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Host Field"},"record_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Host"},"target_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Host"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"nameservers":{"items":{"type":"string"},"type":"array","title":"Nameservers","default":[]}},"type":"object","title":"DnsProviderHint","description":"Who runs this domain's DNS, so the instructions can use their words.\n\nEverything is optional: an unrecognised provider falls back to the generic\ninstructions, which is what every customer sees today."},"DnsRecord":{"properties":{"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","name","value"],"title":"DnsRecord"},"DocumentCopyRequest":{"properties":{"read_password":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Read Password"}},"type":"object","title":"DocumentCopyRequest"},"DocumentCreate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"content":{"type":"string","maxLength":500000,"minLength":1,"title":"Content"},"custom_slug":{"anyOf":[{"type":"string","maxLength":50,"minLength":3,"pattern":"^[a-zA-Z0-9_-]+$"},{"type":"null"}],"title":"Custom Slug"},"expires_in":{"type":"string","enum":["never","1d","7d","30d","custom"],"title":"Expires In","default":"never"},"custom_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Custom Expires At"},"read_password":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Read Password"},"encrypted":{"type":"boolean","title":"Encrypted","default":false},"access_level":{"type":"string","enum":["private","link","workspace"],"title":"Access Level","default":"link"},"workspace":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Workspace"},"folder":{"anyOf":[{"type":"string","maxLength":400,"minLength":1},{"type":"null"}],"title":"Folder"}},"type":"object","required":["content"],"title":"DocumentCreate"},"DocumentCreateResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"url":{"type":"string","title":"Url"},"folder_path":{"items":{"type":"string"},"type":"array","title":"Folder Path","default":[]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"views":{"type":"integer","title":"Views","default":0},"is_password_protected":{"type":"boolean","title":"Is Password Protected","default":false},"is_owned":{"type":"boolean","title":"Is Owned","default":false},"is_owner":{"type":"boolean","title":"Is Owner","default":false},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"google_doc_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Doc Url"},"google_doc_stale":{"type":"boolean","title":"Google Doc Stale","default":false},"vscode_synced":{"type":"boolean","title":"Vscode Synced","default":false},"encrypted":{"type":"boolean","title":"Encrypted","default":false},"kind":{"type":"string","title":"Kind","default":"markdown"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime"},"renderer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renderer"},"type_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Label"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"original_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Filename"},"artifact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Url"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"poster_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Url"},"media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media"},"file_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Version"},"workspace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Url"},"access_level":{"type":"string","title":"Access Level","default":"link"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"can":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Can"},"read_ticket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read Ticket"},"access_epoch":{"type":"integer","title":"Access Epoch","default":0},"edit_secret":{"type":"string","title":"Edit Secret"},"workspace_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Error"}},"type":"object","required":["slug","url","title","content","created_at","updated_at","edit_secret"],"title":"DocumentCreateResponse"},"DocumentMoveRequest":{"properties":{"slug":{"type":"string","maxLength":50,"minLength":1,"title":"Slug"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},"type":"object","required":["slug"],"title":"DocumentMoveRequest"},"DocumentResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"url":{"type":"string","title":"Url"},"folder_path":{"items":{"type":"string"},"type":"array","title":"Folder Path","default":[]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"views":{"type":"integer","title":"Views","default":0},"is_password_protected":{"type":"boolean","title":"Is Password Protected","default":false},"is_owned":{"type":"boolean","title":"Is Owned","default":false},"is_owner":{"type":"boolean","title":"Is Owner","default":false},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"google_doc_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Doc Url"},"google_doc_stale":{"type":"boolean","title":"Google Doc Stale","default":false},"vscode_synced":{"type":"boolean","title":"Vscode Synced","default":false},"encrypted":{"type":"boolean","title":"Encrypted","default":false},"kind":{"type":"string","title":"Kind","default":"markdown"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime"},"renderer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renderer"},"type_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Label"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"original_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Filename"},"artifact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Url"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"poster_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Url"},"media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media"},"file_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Version"},"workspace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Url"},"access_level":{"type":"string","title":"Access Level","default":"link"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"can":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Can"},"read_ticket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read Ticket"},"access_epoch":{"type":"integer","title":"Access Epoch","default":0}},"type":"object","required":["slug","url","title","content","created_at","updated_at"],"title":"DocumentResponse"},"DocumentSettingsRequest":{"properties":{"read_password":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Read Password"},"remove_password":{"type":"boolean","title":"Remove Password","default":false},"expires_in":{"anyOf":[{"type":"string","enum":["never","1h","1d","7d","30d","custom"]},{"type":"null"}],"title":"Expires In"},"custom_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Custom Expires At"}},"type":"object","title":"DocumentSettingsRequest","description":"``PATCH /documents/{slug}/settings``: a document's password and expiry\nwithout resending its content (the share dialog's \"More options\"). Every\nfield is optional; omitted means unchanged. ``read_password: \"\"`` removes\nthe password, like ``remove_password: true``."},"DocumentUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"content":{"type":"string","maxLength":500000,"minLength":1,"title":"Content"},"read_password":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Read Password"},"remove_password":{"type":"boolean","title":"Remove Password","default":false},"expires_in":{"anyOf":[{"type":"string","enum":["never","1h","1d","7d","30d","custom"]},{"type":"null"}],"title":"Expires In"},"custom_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Custom Expires At"}},"type":"object","required":["content"],"title":"DocumentUpdate"},"DomainCreate":{"properties":{"host":{"type":"string","maxLength":253,"minLength":3,"title":"Host"},"kind":{"type":"string","enum":["app","cdn"],"title":"Kind"}},"type":"object","required":["host","kind"],"title":"DomainCreate"},"DomainListResponse":{"properties":{"domains":{"items":{"$ref":"#/components/schemas/DomainResponse"},"type":"array","title":"Domains"}},"type":"object","required":["domains"],"title":"DomainListResponse"},"DomainResponse":{"properties":{"id":{"type":"string","title":"Id"},"host":{"type":"string","title":"Host"},"kind":{"type":"string","enum":["app","cdn"],"title":"Kind"},"status":{"type":"string","enum":["pending","verified","failed","lapsed"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"attached":{"type":"boolean","title":"Attached","default":false},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"dns_record_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dns Record Name"},"dns_record_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dns Record Type","default":"TXT"},"dns_record_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dns Record Value"},"dns_target_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dns Target Name"},"dns_target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dns Target Type"},"dns_target_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dns Target Value"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"},"live":{"type":"boolean","title":"Live","default":false},"routing_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Routing Ok"},"txt_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Txt Ok"},"failures":{"type":"integer","title":"Failures","default":0},"first_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Failed At"},"lapsed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lapsed At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"apex_certain":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apex Certain","default":true},"dns_routing_options":{"items":{"$ref":"#/components/schemas/DnsRecord"},"type":"array","title":"Dns Routing Options","default":[]}},"type":"object","required":["id","host","kind","status","created_at"],"title":"DomainResponse"},"DomainSummary":{"properties":{"host":{"type":"string","title":"Host"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"status":{"type":"string","title":"Status","default":"pending"},"verified":{"type":"boolean","title":"Verified"},"primary":{"type":"boolean","title":"Primary"},"live":{"type":"boolean","title":"Live"},"txt_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Txt Ok"},"routing_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Routing Ok"},"failures":{"type":"integer","title":"Failures","default":0}},"type":"object","required":["host","verified","primary","live"],"title":"DomainSummary"},"EmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"EmailRequest"},"EmailVerifyRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"EmailVerifyRequest"},"FeedbackCreate":{"properties":{"type":{"type":"string","enum":["bug","feature"],"title":"Type"},"message":{"type":"string","maxLength":4000,"minLength":3,"title":"Message"},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"page_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Page Url"}},"type":"object","required":["type","message"],"title":"FeedbackCreate"},"FileInfoResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"url":{"type":"string","title":"Url"},"markdrop_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdrop Url"},"workspace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"version":{"type":"integer","title":"Version"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"media":{"anyOf":[{"$ref":"#/components/schemas/MediaInfo"},{"type":"null"}]},"poster_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Url"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"access":{"type":"string","title":"Access"}},"type":"object","required":["slug","url","content_type","size_bytes","version","updated_at","created_at","access"],"title":"FileInfoResponse"},"FileVersion":{"properties":{"version":{"type":"integer","title":"Version"},"size_bytes":{"type":"integer","title":"Size Bytes"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"content_type":{"type":"string","title":"Content Type"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"current":{"type":"boolean","title":"Current"},"media":{"anyOf":[{"$ref":"#/components/schemas/MediaInfo"},{"type":"null"}]},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},"type":"object","required":["version","size_bytes","content_type","current"],"title":"FileVersion"},"FileVersionsResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/FileVersion"},"type":"array","title":"Versions"}},"type":"object","required":["versions"],"title":"FileVersionsResponse"},"FolderCreate":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["name"],"title":"FolderCreate"},"FolderDeleteResponse":{"properties":{"unfiled_documents":{"type":"integer","title":"Unfiled Documents"}},"type":"object","required":["unfiled_documents"],"title":"FolderDeleteResponse"},"FolderListResponse":{"properties":{"folders":{"items":{"$ref":"#/components/schemas/FolderResponse"},"type":"array","title":"Folders"}},"type":"object","required":["folders"],"title":"FolderListResponse"},"FolderPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Slug"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"default_access":{"anyOf":[{"type":"string","enum":["private","workspace","link"]},{"type":"null"}],"title":"Default Access"}},"type":"object","title":"FolderPatch"},"FolderResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"slug":{"type":"string","title":"Slug","default":""},"path":{"items":{"type":"string"},"type":"array","title":"Path","default":[]}},"type":"object","required":["id","workspace_id","name","created_at","updated_at"],"title":"FolderResponse"},"FolderShare":{"properties":{"level":{"type":"string","enum":["link","workspace"],"title":"Level"}},"type":"object","required":["level"],"title":"FolderShare"},"FolderUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Name"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"reparent":{"type":"boolean","title":"Reparent","default":false}},"type":"object","title":"FolderUpdate"},"GoogleConnectResponse":{"properties":{"auth_url":{"type":"string","title":"Auth Url"}},"type":"object","required":["auth_url"],"title":"GoogleConnectResponse"},"GoogleExportResponse":{"properties":{"google_doc_id":{"type":"string","title":"Google Doc Id"},"google_doc_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Doc Url"},"synced_rev":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Synced Rev"},"rev":{"type":"integer","title":"Rev"}},"type":"object","required":["google_doc_id","google_doc_url","synced_rev","rev"],"title":"GoogleExportResponse"},"GoogleStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"configured":{"type":"boolean","title":"Configured"}},"type":"object","required":["connected","configured"],"title":"GoogleStatusResponse"},"GrantCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["viewer","editor"],"title":"Role","default":"viewer"},"notify":{"type":"boolean","title":"Notify","default":true},"message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Message"}},"type":"object","required":["email"],"title":"GrantCreate"},"GrantResponse":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["viewer","editor"],"title":"Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"granted_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granted By Email"},"notified":{"type":"boolean","title":"Notified","default":false},"active":{"type":"boolean","title":"Active","default":true},"effective_role":{"anyOf":[{"type":"string","enum":["viewer","editor"]},{"type":"null"}],"title":"Effective Role"}},"type":"object","required":["email","role","created_at"],"title":"GrantResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InviteAcceptResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"workspace_name":{"type":"string","title":"Workspace Name"},"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"}},"type":"object","required":["workspace_id","workspace_name","role"],"title":"InviteAcceptResponse"},"InviteCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["admin","member","viewer"],"title":"Role","default":"member"}},"type":"object","required":["email"],"title":"InviteCreateRequest"},"InviteListResponse":{"properties":{"invitations":{"items":{"$ref":"#/components/schemas/InviteResponse"},"type":"array","title":"Invitations"}},"type":"object","required":["invitations"],"title":"InviteListResponse"},"InvitePreview":{"properties":{"workspace_name":{"type":"string","title":"Workspace Name"},"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"},"email":{"type":"string","title":"Email"},"invited_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By Name"},"status":{"type":"string","enum":["pending","accepted","declined","revoked","expired"],"title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"signed_in_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed In As"},"email_matches":{"type":"boolean","title":"Email Matches","default":false},"already_member":{"type":"boolean","title":"Already Member","default":false},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"logo_well":{"anyOf":[{"type":"string","enum":["light","dark","checker"]},{"type":"null"}],"title":"Logo Well"}},"type":"object","required":["workspace_name","role","email","status","expires_at"],"title":"InvitePreview","description":"What the person holding the link is shown before deciding.\n\nNames the workspace, the inviter and the address it was sent to, and nothing\nelse — in particular not who else is a member. The recipient already knows\ntheir own address; everything here was in the email they were sent."},"InviteResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"},"status":{"type":"string","enum":["pending","accepted","declined","revoked","expired"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"invited_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By Name"},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"}},"type":"object","required":["id","email","role","status","created_at","expires_at"],"title":"InviteResponse","description":"The admin-facing view of an invitation. Deliberately has no token field:\nthe raw token exists for exactly as long as it takes to compose the email,\nand putting it in an API response would turn any workspace admin into a\ncredential oracle for an address they do not control."},"ItemsAdd":{"properties":{"slugs":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Slugs"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"},"access":{"anyOf":[{"type":"string","enum":["link","private","workspace"]},{"type":"null"}],"title":"Access"}},"type":"object","required":["slugs"],"title":"ItemsAdd"},"ItemsMove":{"properties":{"slugs":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Slugs"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},"type":"object","required":["slugs"],"title":"ItemsMove"},"ItemsRemove":{"properties":{"slugs":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Slugs"},"handles":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Handles"}},"type":"object","title":"ItemsRemove"},"LevelUpdate":{"properties":{"level":{"type":"string","enum":["private","link","workspace"],"title":"Level"}},"type":"object","required":["level"],"title":"LevelUpdate"},"LibraryAddRequest":{"properties":{"document_id":{"type":"string","title":"Document Id"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},"type":"object","required":["document_id"],"title":"LibraryAddRequest"},"LibraryFolderRequest":{"properties":{"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},"type":"object","title":"LibraryFolderRequest"},"MediaInfo":{"properties":{"duration_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration S"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"video_codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Codec"},"audio_codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Codec"}},"type":"object","title":"MediaInfo"},"MemberListResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/MemberResponse"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"MemberListResponse"},"MemberResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","role","created_at"],"title":"MemberResponse"},"MemberRoleRequest":{"properties":{"role":{"type":"string","enum":["admin","member","viewer"],"title":"Role"}},"type":"object","required":["role"],"title":"MemberRoleRequest"},"MyDocListItem":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"slug":{"type":"string","title":"Slug"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content_preview":{"type":"string","title":"Content Preview"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"views":{"type":"integer","title":"Views","default":0},"export_pdf_count":{"type":"integer","title":"Export Pdf Count","default":0},"copy_url_count":{"type":"integer","title":"Copy Url Count","default":0},"is_password_protected":{"type":"boolean","title":"Is Password Protected","default":false},"google_doc_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Doc Url"},"google_doc_stale":{"type":"boolean","title":"Google Doc Stale","default":false},"vscode_synced":{"type":"boolean","title":"Vscode Synced","default":false},"encrypted":{"type":"boolean","title":"Encrypted","default":false},"kind":{"type":"string","title":"Kind","default":"markdown"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime"},"renderer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renderer"},"type_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Label"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"original_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Filename"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"},"folder_path":{"items":{"type":"string"},"type":"array","title":"Folder Path","default":[]},"access_level":{"type":"string","title":"Access Level","default":"link"},"shared_with_count":{"type":"integer","title":"Shared With Count","default":0},"shared_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shared By Name"},"shared_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shared By Email"},"is_mine":{"type":"boolean","title":"Is Mine","default":true}},"type":"object","required":["slug","url","title","content_preview","created_at","updated_at"],"title":"MyDocListItem"},"MyDocListResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/MyDocListItem"},"type":"array","title":"Documents"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"pages":{"type":"integer","title":"Pages"},"per_page":{"type":"integer","title":"Per Page","default":20},"count_all":{"type":"integer","title":"Count All","default":0},"count_markdown":{"type":"integer","title":"Count Markdown","default":0},"count_artifact":{"type":"integer","title":"Count Artifact","default":0}},"type":"object","required":["documents","total","page","pages"],"title":"MyDocListResponse"},"NameUpdateRequest":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"NameUpdateRequest"},"OwnershipTransfer":{"properties":{"user_id":{"type":"string","maxLength":64,"minLength":1,"title":"User Id"}},"type":"object","required":["user_id"],"title":"OwnershipTransfer"},"PageFeedbackBody":{"properties":{"path":{"type":"string","maxLength":400,"title":"Path"},"helpful":{"type":"boolean","title":"Helpful"},"comment":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["path","helpful"],"title":"PageFeedbackBody"},"PreferencesUpdate":{"properties":{"analytics_digest":{"type":"string","enum":["weekly","off"],"title":"Analytics Digest"}},"type":"object","required":["analytics_digest"],"title":"PreferencesUpdate"},"ReportRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ReportRequest"},"ResharingUpdate":{"properties":{"allow":{"type":"boolean","title":"Allow"}},"type":"object","required":["allow"],"title":"ResharingUpdate"},"SettingsPayload":{"properties":{"viewer_chrome":{"type":"string","enum":["full","minimal","none"],"title":"Viewer Chrome","default":"full"},"require_auth_to_view":{"type":"boolean","title":"Require Auth To View","default":false},"members_can_share_folders":{"type":"boolean","title":"Members Can Share Folders","default":true},"default_access":{"type":"string","enum":["link","workspace","private"],"title":"Default Access","default":"workspace"}},"type":"object","title":"SettingsPayload"},"SlugChangeRequest":{"properties":{"new_slug":{"type":"string","maxLength":50,"minLength":3,"pattern":"^[a-zA-Z0-9_-]+$","title":"New Slug"}},"type":"object","required":["new_slug"],"title":"SlugChangeRequest"},"SyncCreateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"content":{"type":"string","maxLength":33554432,"minLength":1,"title":"Content"},"desired_slug":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Desired Slug"}},"type":"object","required":["content"],"title":"SyncCreateRequest"},"SyncDocResponse":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"type":"string","title":"Content"},"rev":{"type":"integer","title":"Rev"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","url","title","content","rev","updated_at"],"title":"SyncDocResponse"},"SyncPushRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"content":{"type":"string","maxLength":33554432,"minLength":1,"title":"Content"},"base_rev":{"type":"integer","minimum":0.0,"title":"Base Rev"}},"type":"object","required":["content","base_rev"],"title":"SyncPushRequest"},"SyncRevResponse":{"properties":{"id":{"type":"string","title":"Id"},"rev":{"type":"integer","title":"Rev"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","rev","updated_at"],"title":"SyncRevResponse"},"TokenCreateRequest":{"properties":{"name":{"type":"string","maxLength":80,"title":"Name","default":"API token"}},"type":"object","title":"TokenCreateRequest"},"TokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"user":{"$ref":"#/components/schemas/UserResponse"}},"type":"object","required":["token","expires_at","user"],"title":"TokenResponse"},"UploadCompleteRequest":{"properties":{"parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/UploadedPart"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Parts"}},"type":"object","title":"UploadCompleteRequest"},"UploadCreateRequest":{"properties":{"file_name":{"type":"string","maxLength":255,"minLength":1,"title":"File Name"},"size_bytes":{"type":"integer","minimum":1.0,"title":"Size Bytes"},"content_type":{"type":"string","maxLength":255,"title":"Content Type","default":""},"sha256":{"type":"string","pattern":"^[0-9a-fA-F]{64}$","title":"Sha256"},"target_slug":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}],"title":"Target Slug"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"access":{"anyOf":[{"type":"string","enum":["link","private","password","workspace"]},{"type":"null"}],"title":"Access"},"password":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Password"},"workspace":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Workspace"},"folder":{"anyOf":[{"type":"string","maxLength":400,"minLength":1},{"type":"null"}],"title":"Folder"},"slug":{"anyOf":[{"type":"string","maxLength":50,"minLength":3,"pattern":"^[a-zA-Z0-9_-]+$"},{"type":"null"}],"title":"Slug"}},"type":"object","required":["file_name","size_bytes","sha256"],"title":"UploadCreateRequest"},"UploadPartStatus":{"properties":{"part_number":{"type":"integer","title":"Part Number"},"etag":{"type":"string","title":"Etag"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["part_number","etag","size"],"title":"UploadPartStatus"},"UploadPartUrl":{"properties":{"part_number":{"type":"integer","title":"Part Number"},"url":{"type":"string","title":"Url"}},"type":"object","required":["part_number","url"],"title":"UploadPartUrl"},"UploadResult":{"properties":{"url":{"type":"string","title":"Url"},"markdrop_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdrop Url"},"workspace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Url"},"workspace_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Error"},"slug":{"type":"string","title":"Slug"},"version":{"type":"integer","title":"Version"},"size_bytes":{"type":"integer","title":"Size Bytes"},"content_type":{"type":"string","title":"Content Type"},"sha256":{"type":"string","title":"Sha256"}},"type":"object","required":["url","slug","version","size_bytes","content_type","sha256"],"title":"UploadResult"},"UploadSessionResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"part_size":{"type":"integer","title":"Part Size"},"parts":{"items":{"$ref":"#/components/schemas/UploadPartUrl"},"type":"array","title":"Parts"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["upload_id","part_size","parts","expires_at"],"title":"UploadSessionResponse"},"UploadStatusResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"state":{"type":"string","title":"State"},"file_name":{"type":"string","title":"File Name"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"sha256":{"type":"string","title":"Sha256"},"part_size":{"type":"integer","title":"Part Size"},"part_count":{"type":"integer","title":"Part Count"},"parts_uploaded":{"items":{"$ref":"#/components/schemas/UploadPartStatus"},"type":"array","title":"Parts Uploaded"},"target_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Slug"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"verified_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Verified Bytes"},"result":{"anyOf":[{"$ref":"#/components/schemas/UploadResult"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["upload_id","state","file_name","content_type","size_bytes","sha256","part_size","part_count","parts_uploaded","expires_at"],"title":"UploadStatusResponse"},"UploadUrlsRequest":{"properties":{"part_numbers":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Part Numbers"}},"type":"object","title":"UploadUrlsRequest"},"UploadedPart":{"properties":{"part_number":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Part Number"},"etag":{"type":"string","maxLength":200,"minLength":1,"title":"Etag"}},"type":"object","required":["part_number","etag"],"title":"UploadedPart"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"providers":{"items":{"type":"string"},"type":"array","title":"Providers","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"analytics_digest":{"type":"string","enum":["weekly","off"],"title":"Analytics Digest","default":"weekly"}},"type":"object","required":["id","email","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkspaceCreate":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"WorkspaceCreate"},"WorkspaceDeleteRequest":{"properties":{"confirm_name":{"type":"string","maxLength":80,"minLength":1,"title":"Confirm Name"}},"type":"object","required":["confirm_name"],"title":"WorkspaceDeleteRequest","description":"The workspace's own name, typed back. See `services.workspace.delete_workspace`."},"WorkspaceDeleteResponse":{"properties":{"documents_released":{"type":"integer","title":"Documents Released"},"domains_removed":{"type":"integer","title":"Domains Removed"},"members_removed":{"type":"integer","title":"Members Removed"}},"type":"object","required":["documents_released","domains_removed","members_removed"],"title":"WorkspaceDeleteResponse"},"WorkspaceListResponse":{"properties":{"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceResponse"},"type":"array","title":"Workspaces"}},"type":"object","required":["workspaces"],"title":"WorkspaceListResponse"},"WorkspaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"owner_id":{"type":"string","title":"Owner Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"branding":{"$ref":"#/components/schemas/BrandingPayload"},"settings":{"$ref":"#/components/schemas/SettingsPayload"},"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"},"primary_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Host"},"domains":{"items":{"$ref":"#/components/schemas/DomainSummary"},"type":"array","title":"Domains","default":[]},"default_access":{"type":"string","title":"Default Access","default":"workspace"},"privacy":{"type":"string","title":"Privacy","default":"custom"},"member_count":{"type":"integer","title":"Member Count","default":0},"pending_invite_count":{"type":"integer","title":"Pending Invite Count","default":0},"domain_count":{"type":"integer","title":"Domain Count","default":0}},"type":"object","required":["id","name","owner_id","created_at","updated_at","branding","settings","role"],"title":"WorkspaceResponse"},"WorkspaceUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Name"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingPayload"},{"type":"null"}]},"settings":{"anyOf":[{"$ref":"#/components/schemas/SettingsPayload"},{"type":"null"}]}},"type":"object","title":"WorkspaceUpdate"}}}}