{"openapi":"3.1.0","info":{"title":"Dosu Public API","summary":"Dosu's knowledge API and MCP server for AI agents and teams.","description":"The Dosu Public API exposes Dosu's knowledge tools to AI agents and applications. It hosts the Dosu MCP server over Streamable HTTP at `/v1/mcp` (and the memory tool surface at `/v2/mcp`), agent authentication discovery at `/auth.md` and `/.well-known/oauth-protected-resource`, and REST endpoints for chat, documents, answers, and integration webhooks. Learn more at https://dosu.dev.","contact":{"name":"Dosu","url":"https://dosu.dev/","email":"hi@dosu.dev"},"version":"a6f810863cbb93a4a8ea9c0bdfa4df5d1385dfbd432e1b2be933003b8edf9672"},"paths":{"/threads/generate-preview/{thread_id}":{"post":{"summary":"Run Preview Backfill","operationId":"run_preview_backfill_threads_generate_preview__thread_id__post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/publish/{message_id}":{"post":{"summary":"Publish Message","operationId":"publish_message_messages_publish__message_id__post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"Supabase-Access-Token","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MessageUpdatePayload"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Publish Message Messages Publish  Message Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/{message_id}/edit":{"post":{"summary":"Edit Message","operationId":"edit_message_messages__message_id__edit_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Edit Message Messages  Message Id  Edit Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/{message_id}":{"delete":{"summary":"Delete Message","operationId":"delete_message_messages__message_id__delete","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Delete Message Messages  Message Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/{message_id}/reject":{"post":{"summary":"Reject Message","description":"Reject a preview message. This tracks the rejection for data analysis\nand then deletes the message.","operationId":"reject_message_messages__message_id__reject_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Reject Message Messages  Message Id  Reject Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/update-status":{"post":{"summary":"Update Page Version Status","description":"Accept, decline, or revert a page version (undo accept/decline).","operationId":"update_page_version_status_review_update_status_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageVersionStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageVersionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/{deployment_id}/chat/{thread_id}/message/{message_id}":{"post":{"summary":"Post Chat Message","operationId":"post_chat_message_deployment__deployment_id__chat__thread_id__message__message_id__post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cli/auth/oauth/callback":{"get":{"tags":["cli-auth"],"summary":"Complete a Supabase OAuth flow for a CLI SSO session","operationId":"complete_cli_oauth_v1_cli_auth_oauth_callback_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"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"}}}}}}},"/v1/cli/auth/tickets":{"post":{"tags":["cli-auth"],"summary":"Mint a login ticket for agent / human-in-the-loop auth","description":"Mint a short-lived ticket the CLI can later redeem for tokens.\n\nNo authentication required — the ticket itself is the bearer of\neventual auth, and is only useful after a logged-in user binds their\nsession to it via the web app.","operationId":"create_ticket_v1_cli_auth_tickets_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketResponse"}}}}}}},"/v1/cli/auth/tickets/{ticket}/bind":{"post":{"tags":["cli-auth"],"summary":"Bind a signed-in Supabase session to a ticket","description":"Mint an independent CLI session for the caller and bind it to ``ticket``.\n\nRequires a valid Supabase access token in the standard\n``Supabase-Access-Token`` header (handled by ``get_access_token_user``);\nan API key is refused, since a leaked key must not become a login.\nThe CLI / agent never calls this directly — it is invoked by the Dosu\nweb app's CLI auth page once the user has signed in there.\n\nThis endpoint deliberately declares NO request body, so the bound tokens\ncan only ever come from the freshly minted session. Pre-rollout frontends\nstill POST the browser's session tokens as JSON; FastAPI never parses a\nbody no handler declares, so those requests succeed and the tokens are\ndiscarded (storing them shared the browser's refresh-token family with\nthe CLI, and GoTrue's rotation + reuse detection then killed both\nsessions). On mint failure the ticket stays pending so the user can\nretry.","operationId":"bind_ticket_v1_cli_auth_tickets__ticket__bind_post","parameters":[{"name":"ticket","in":"path","required":true,"schema":{"type":"string","title":"Ticket"}},{"name":"X-Dosu-CLI-OAuth","in":"header","required":false,"schema":{"type":"boolean","default":false,"title":"X-Dosu-Cli-Oauth"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"204":{"description":"Successful Response"},"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorizationResponse"}}},"description":"OK"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cli/auth/sessions":{"post":{"tags":["cli-auth"],"summary":"Mint an independent Supabase session for the CLI","description":"Mint and return a fresh Supabase session dedicated to the CLI.\n\nServes the web app's localhost-callback login flow: instead of handing\nthe CLI a copy of the browser's session, the web app calls this endpoint\nand forwards the minted tokens, keeping the browser's and the CLI's\nrefresh-token families independent. Like ``bind_ticket``, it takes only\na Supabase access token, never an API key.","operationId":"create_session_v1_cli_auth_sessions_post","parameters":[{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateSessionRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CliSessionResponse"},{"$ref":"#/components/schemas/OAuthAuthorizationResponse"}],"title":"Response Create Session V1 Cli Auth Sessions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cli/auth/tickets/{ticket}/exchange":{"post":{"tags":["cli-auth"],"summary":"Exchange a ticket for the bound session tokens","description":"Redeem ``ticket`` for the session tokens bound to it.\n\nReturns one of three states:\n\n* ``pending`` — the ticket exists but no user has signed in yet.\n  Clients should wait for the user to confirm and call exchange again.\n* ``authenticated`` — tokens are returned and the ticket is destroyed.\n* ``expired`` — the ticket was not found (TTL elapsed or already\n  redeemed).\n\nNo authentication required: possession of the ticket is the credential.","operationId":"exchange_ticket_v1_cli_auth_tickets__ticket__exchange_post","parameters":[{"name":"ticket","in":"path","required":true,"schema":{"type":"string","title":"Ticket"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeTicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cli/tasks":{"get":{"tags":["cli-tasks"],"summary":"List Cli Tasks","description":"Enumerate the supported CLI tasks (capability catalog).","operationId":"list_cli_tasks_v1_cli_tasks_get","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTaskListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cli/task/{task}":{"post":{"tags":["cli-tasks"],"summary":"Start Cli Task","description":"Enqueue a doc-generation + GitHub-publish task. Returns task_id immediately.","operationId":"start_cli_task_v1_cli_task__task__post","parameters":[{"name":"task","in":"path","required":true,"schema":{"type":"string","title":"Task"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTaskEnqueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cli/task/run/{task_id}":{"get":{"tags":["cli-tasks"],"summary":"Get Cli Task Status","description":"Get the status of a CLI task by its ID (mirrors the doc-imports status).","operationId":"get_cli_task_status_v1_cli_task_run__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTaskRunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data-sources/{data_source_id}/sync":{"post":{"summary":"Handle Sync Data Source","operationId":"handle_sync_data_source_data_sources__data_source_id__sync_post","parameters":[{"name":"data_source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Data Source Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SyncDataSourceRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/github":{"post":{"summary":"Import Github Markdown","operationId":"import_github_markdown_doc_imports_github_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGithubFilesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/gitlab":{"post":{"summary":"Import Gitlab Markdown","operationId":"import_gitlab_markdown_doc_imports_gitlab_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGitlabFilesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/azure-devops":{"post":{"summary":"Import Azure Devops Markdown","operationId":"import_azure_devops_markdown_doc_imports_azure_devops_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAzureDevOpsFilesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/coda":{"post":{"summary":"Import Coda","operationId":"import_coda_doc_imports_coda_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportCodaPagesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/confluence":{"post":{"summary":"Import Confluence","operationId":"import_confluence_doc_imports_confluence_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportConfluencePagesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/notion":{"post":{"summary":"Import Notion","operationId":"import_notion_doc_imports_notion_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportNotionPagesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/folder-rules/{knowledge_store_id}":{"get":{"summary":"List Folder Sync Rules","description":"List folder sync rules for a knowledge store.","operationId":"list_folder_sync_rules_doc_imports_folder_rules__knowledge_store_id__get","parameters":[{"name":"knowledge_store_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Knowledge Store Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FolderSyncRuleResponse"},"title":"Response List Folder Sync Rules Doc Imports Folder Rules  Knowledge Store Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/folder-rules/delete":{"post":{"summary":"Delete Folder Sync Rule","description":"Stop syncing a folder. Already-imported pages are left in place.","operationId":"delete_folder_sync_rule_doc_imports_folder_rules_delete_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFolderSyncRuleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Delete Folder Sync Rule Doc Imports Folder Rules Delete Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/status/{task_id}":{"get":{"summary":"Get Import Status","description":"Get the status of an import task by its ID.","operationId":"get_import_status_doc_imports_status__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTaskStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/doc-imports/active/{knowledge_store_id}":{"get":{"summary":"Get Active Import Task","description":"Get the active import task for a knowledge store, if any.","operationId":"get_active_import_task_doc_imports_active__knowledge_store_id__get","parameters":[{"name":"knowledge_store_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Knowledge Store Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportTaskStatusResponse"},{"type":"null"}],"title":"Response Get Active Import Task Doc Imports Active  Knowledge Store Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ask":{"post":{"summary":"Ask","description":"Ask a question and get an AI-generated answer from the knowledge base.\n\nRuns the Pi agent read-only over the selected data sources. Blocks until\nthe answer is ready (can take 10-60 seconds depending on the question).","operationId":"ask_ask_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/pages":{"get":{"summary":"List Pages","description":"List all non-archived pages for a deployment's knowledge store.","operationId":"list_pages_v1_deployments__deployment_id__pages_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PageResponse"},"title":"Response List Pages V1 Deployments  Deployment Id  Pages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Page","description":"Create a new page in a deployment's knowledge store.","operationId":"create_page_v1_deployments__deployment_id__pages_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePageRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pages/{page_id}":{"get":{"summary":"Get Page","description":"Get a single page by ID.","operationId":"get_page_v1_pages__page_id__get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Page","description":"Update a page by creating a new version.","operationId":"update_page_v1_pages__page_id__patch","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Page","description":"Delete a page.","operationId":"delete_page_v1_pages__page_id__delete","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pages/{page_id}/export":{"get":{"summary":"Export Page","description":"Export a single doc as an LLM friendly markdown file","operationId":"export_page_pages__page_id__export_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Export Page Pages  Page Id  Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge-stores/{knowledge_store_id}/pages/export":{"get":{"summary":"Export Pages","description":"Export all docs in a knowledge store as an LLM llms.txt file.","operationId":"export_pages_knowledge_stores__knowledge_store_id__pages_export_get","parameters":[{"name":"knowledge_store_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Knowledge Store Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Export Pages Knowledge Stores  Knowledge Store Id  Pages Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pages/batch-archive":{"post":{"summary":"Batch Archive Pages Endpoint","operationId":"batch_archive_pages_endpoint_v1_pages_batch_archive_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchArchiveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pages/batch-delete":{"post":{"summary":"Batch Delete Pages Endpoint","operationId":"batch_delete_pages_endpoint_v1_pages_batch_delete_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pages/{page_version_id}/change-view":{"get":{"summary":"Get Page Change View","description":"Server-rendered review diff for a specific page version.\n\nRLS-scoped: ``begin_as_user`` restricts the read to page versions the caller\ncan see. Shares one diff renderer with the MCP ``review`` confirm-preview.","operationId":"get_page_change_view_v1_pages__page_version_id__change_view_get","parameters":[{"name":"page_version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Version Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/llm-gateway/capabilities":{"get":{"tags":["llm-gateway"],"summary":"Capabilities","description":"Served-model discovery, so the CLI can shape requests for the model\nthe policy actually serves. Auth and consent only — reading it consumes\nnothing.","operationId":"capabilities_v1_llm_gateway_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/llm-gateway/v1/messages":{"post":{"tags":["llm-gateway"],"summary":"Create Message","operationId":"create_message_v1_llm_gateway_v1_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/llm-gateway/v1/messages/count_tokens":{"post":{"tags":["llm-gateway"],"summary":"Count Tokens","description":"Forward count_tokens so the Agent SDK binary can call it freely.\n\nSame auth/consent/model policy as /v1/messages, but no quota check and no\nusage row — counting consumes nothing.","operationId":"count_tokens_v1_llm_gateway_v1_messages_count_tokens_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/mcp/orgs":{"get":{"tags":["mcp"],"summary":"List Orgs","description":"List all organizations the current user belongs to.","operationId":"list_orgs_v1_mcp_orgs_get","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgResponse"},"title":"Response List Orgs V1 Mcp Orgs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp/deployments":{"get":{"tags":["mcp"],"summary":"List Deployments","description":"List all deployments accessible to the current user.","operationId":"list_deployments_v1_mcp_deployments_get","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentResponse"},"title":"Response List Deployments V1 Mcp Deployments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp/deployments/{deployment_id}/api-keys":{"post":{"tags":["mcp"],"summary":"Create Api Key","description":"Create an API key scoped to a deployment's organization.","operationId":"create_api_key_v1_mcp_deployments__deployment_id__api_keys_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-connections":{"get":{"summary":"List Mcp Connections","description":"List all MCP connections for an org. RLS enforces membership.","operationId":"list_mcp_connections_mcp_connections_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpConnection"},"title":"Response List Mcp Connections Mcp Connections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Mcp Connection","description":"Create an MCP connection. RLS enforces ADMIN+ role.\n\nIf auth_config is provided, it is stored in the mcp_connection_secret table\n(not on the connection itself).","operationId":"create_mcp_connection_mcp_connections_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-connections/{mcp_connection_id}":{"get":{"summary":"Get Mcp Connection","description":"Get a single MCP connection by ID. RLS enforces org membership.","operationId":"get_mcp_connection_mcp_connections__mcp_connection_id__get","parameters":[{"name":"mcp_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Connection Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Mcp Connection","description":"Update an MCP connection. Requires ADMIN+ role.\n\nChanging server_url or auth_type clears the stored secret in the\ndatabase (trigger on mcp_connection), so the new credentials have to be\nwritten in the same transaction as the row. Users can't write the secret\ntable, so the whole update runs as the service role after checking the\ncaller is an org admin.","operationId":"update_mcp_connection_mcp_connections__mcp_connection_id__put","parameters":[{"name":"mcp_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Connection Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMcpConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Mcp Connection","description":"Delete an MCP connection. RLS enforces ADMIN+ role.\n\nThe secret is cascade-deleted by the FK on mcp_connection_secret.","operationId":"delete_mcp_connection_mcp_connections__mcp_connection_id__delete","parameters":[{"name":"mcp_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Connection Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-connections/{mcp_connection_id}/tools":{"get":{"summary":"List Mcp Connection Tools","description":"List the tools available on a saved MCP connection. RLS enforces org membership.","operationId":"list_mcp_connection_tools_mcp_connections__mcp_connection_id__tools_get","parameters":[{"name":"mcp_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Connection Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMcpToolsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-connections/test":{"post":{"summary":"Test Mcp Connection","description":"Verify that an MCP server accepts the supplied credentials.\n\nTwo modes:\n- Ephemeral: pass ``org_id`` + ``server_url`` + ``auth_type`` + ``auth_config``\n  to validate a token the user is entering in the wizard before saving.\n  Requires ADMIN or OWNER in that org: it drives up to three outbound\n  HTTPS requests to a caller-chosen URL with caller-chosen headers, the\n  same trust level as creating/updating a connection.\n- Saved: pass ``mcp_connection_id`` to re-test an existing connection\n  using the stored secret (also verifies token freshness). RLS enforces\n  org membership; the URL and secret are already admin-configured, not\n  attacker input, so any member may re-test it.","operationId":"test_mcp_connection_mcp_connections_test_post","parameters":[{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestMcpConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestMcpConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-connections/space/{space_id}":{"get":{"summary":"List Mcp Connections For Space","description":"List MCP connections assigned to a space. RLS enforces membership.","operationId":"list_mcp_connections_for_space_mcp_connections_space__space_id__get","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Space Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpConnection"},"title":"Response List Mcp Connections For Space Mcp Connections Space  Space Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-connections/{mcp_connection_id}/assign-to-space":{"post":{"summary":"Assign Mcp Connection To Space","description":"Assign an MCP connection to a space.\n\nInserts into space_mcp_connection. DB triggers handle fan-out to\ndeployment_mcp_connection for all deployments in the space.","operationId":"assign_mcp_connection_to_space_mcp_connections__mcp_connection_id__assign_to_space_post","parameters":[{"name":"mcp_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Connection Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignToSpaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Unassign Mcp Connection From Space","description":"Unassign an MCP connection from a space.\n\nDeletes from space_mcp_connection. DB triggers handle removal from\ndeployment_mcp_connection (with sibling-space guard).","operationId":"unassign_mcp_connection_from_space_mcp_connections__mcp_connection_id__assign_to_space_delete","parameters":[{"name":"mcp_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Connection Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnassignFromSpaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{org_id}/reindex-evicted-data-sources":{"post":{"tags":["orgs"],"summary":"Reindex Evicted Data Sources","operationId":"reindex_evicted_data_sources_orgs__org_id__reindex_evicted_data_sources_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexEvictedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/session":{"get":{"tags":["extension"],"summary":"Get Extension Session","description":"Validate access token and return session info for Chrome extension.","operationId":"get_extension_session_extension_session_get","parameters":[{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/verify":{"get":{"tags":["extension"],"summary":"Verify Extension Session","description":"Verify that the Chrome extension's session is still valid.","operationId":"verify_extension_session_extension_verify_get","parameters":[{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Verify Extension Session Extension Verify Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/public/space-info/{owner}/{repo}":{"get":{"tags":["extension"],"summary":"Get Public Space Info","description":"Get public space information for a GitHub repository.\nThis endpoint does not require authentication.","operationId":"get_public_space_info_extension_public_space_info__owner___repo__get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSpaceInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/space-info/{owner}/{repo}":{"get":{"tags":["extension"],"summary":"Get Space Info","description":"Check if a GitHub repository has Dosu integration.\nReturns space info and whether the repo has Dosu enabled.\nWorks for public spaces without authentication.\nFor private spaces, requires a valid access token.","operationId":"get_space_info_extension_space_info__owner___repo__get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/user-repos":{"get":{"tags":["extension"],"summary":"Get User Repos","description":"Get all repositories the authenticated user has access to via Dosu.\nReturns repos from all organizations the user is a member of,\nsorted alphabetically by repo slug.\nRequires authentication.","operationId":"get_user_repos_extension_user_repos_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReposResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/org-repos/{org_name}":{"get":{"tags":["extension"],"summary":"Get Org Repos","description":"Get all repositories in an organization that have Dosu enabled.\nReturns public repos always; private repos only if user is a member of the\nDosu organization that owns the space.","operationId":"get_org_repos_extension_org_repos__org_name__get","parameters":[{"name":"org_name","in":"path","required":true,"schema":{"type":"string","title":"Org Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgReposResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/public/preview":{"get":{"tags":["extension"],"summary":"Get Public Preview Status","description":"Get preview status for a GitHub issue/PR/discussion on a public space.\nThis endpoint does not require authentication but only returns data\nfor repositories with public spaces.","operationId":"get_public_preview_status_extension_public_preview_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"GitHub issue/PR/discussion URL","title":"Url"},"description":"GitHub issue/PR/discussion URL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPreviewStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extension/recent-threads/{owner}/{repo}":{"get":{"tags":["extension"],"summary":"Get Recent Threads","description":"Get recent threads with Dosu activity for a GitHub repository.\nReturns threads where Dosu has responded, sorted by most recent activity.\nWorks for public spaces without authentication.\nFor private spaces, requires a valid access token and org membership.","operationId":"get_recent_threads_extension_recent_threads__owner___repo__get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"thread_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type: issue, pull_request, discussion","title":"Thread Type"},"description":"Filter by type: issue, pull_request, discussion"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":10,"title":"Limit"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentThreadsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/notion/{page_id}":{"post":{"tags":["sync-back"],"summary":"Sync Back To Notion","description":"Sync edited content back to a Notion page via Notion's Markdown API.\n\nThis endpoint:\n1. Fetches the current page markdown from Notion\n2. Computes a diff between current and edited markdown\n3. Applies the diff via PATCH /pages/{id}/markdown (update_content)\n\nArgs:\n    page_id: The internal UUID of the NotionPage record\n    request: The sync request containing edited markdown\n    user: Authenticated user (from Supabase-Access-Token header)\n\nReturns:\n    SyncBackResponse with execution results","operationId":"sync_back_to_notion_sync_back_notion__page_id__post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncBackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncBackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/confluence/{page_id}":{"post":{"tags":["sync-back"],"summary":"Sync Back To Confluence","description":"Succeed without writing, for a frontend deployed before Confluence\nsync-back moved to the page_version CDC handler.\n\nSuch a frontend calls this before publishing an accept. The handler writes\nthe accepted version once it publishes, so writing here too would race it.\nRemove once no frontend from before that move is live.","operationId":"sync_back_to_confluence_sync_back_confluence__page_id__post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncBackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncBackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/azure_devops/{page_id}/publish":{"post":{"tags":["sync-back"],"summary":"Publish To Azure Devops","description":"Publish an internal Dosu document to an Azure DevOps repository via PR.","operationId":"publish_to_azure_devops_sync_back_azure_devops__page_id__publish_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AzureDevOpsPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AzureDevOpsPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/coda/{page_id}/publish":{"post":{"tags":["sync-back"],"summary":"Publish To Coda","description":"Publish an internal Dosu document as a page in a Coda doc.","operationId":"publish_to_coda_sync_back_coda__page_id__publish_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodaPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodaPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/confluence/{page_id}/publish":{"post":{"tags":["sync-back"],"summary":"Publish To Confluence","description":"Publish an internal Dosu document as a child page under a selected Confluence parent page.","operationId":"publish_to_confluence_sync_back_confluence__page_id__publish_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfluencePublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfluencePublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/github/{page_id}/publish":{"post":{"tags":["sync-back"],"summary":"Publish To Github","description":"Publish an internal Dosu document as a new file in a GitHub repository via PR.","operationId":"publish_to_github_sync_back_github__page_id__publish_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/gitlab/{page_id}/publish":{"post":{"tags":["sync-back"],"summary":"Publish To Gitlab","description":"Publish an internal Dosu document to a GitLab repository via MR.","operationId":"publish_to_gitlab_sync_back_gitlab__page_id__publish_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitLabPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitLabPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sync-back/notion/{page_id}/publish":{"post":{"tags":["sync-back"],"summary":"Publish To Notion","description":"Publish an internal Dosu document as a child page under a selected Notion parent page.","operationId":"publish_to_notion_sync_back_notion__page_id__publish_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"X-Dosu-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dosu-Api-Key"}},{"name":"Supabase-Access-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supabase-Access-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotionPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotionPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Health","operationId":"health__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"object","title":"Response Health  Get"}}}}}}}},"components":{"schemas":{"AskRequest":{"properties":{"deployment_id":{"type":"string","format":"uuid","title":"Deployment Id","description":"Deployment to search within"},"question":{"type":"string","title":"Question","description":"The question to ask"},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id","description":"Optional ask session ID to continue a previous ask conversation."},"data_source_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Source Ids","description":"Optional list of data source IDs to search. Omit to search all."}},"type":"object","required":["deployment_id","question"],"title":"AskRequest"},"AskResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"answer":{"type":"string","title":"Answer"},"data_source_ids":{"items":{"type":"string"},"type":"array","title":"Data Source Ids"}},"type":"object","required":["success","session_id","answer","data_source_ids"],"title":"AskResponse"},"AssignToSpaceRequest":{"properties":{"space_id":{"type":"string","format":"uuid","title":"Space Id"}},"type":"object","required":["space_id"],"title":"AssignToSpaceRequest"},"AsyncImportResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"}},"type":"object","required":["task_id"],"title":"AsyncImportResponse","description":"Response for async import endpoints - returns task_id immediately."},"AutoImportRequest":{"properties":{"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"import_paths":{"items":{"type":"string"},"type":"array","title":"Import Paths","default":[]}},"type":"object","required":["knowledge_store_id"],"title":"AutoImportRequest"},"AzureDevOpsPublishRequest":{"properties":{"target_directory":{"type":"string","title":"Target Directory"},"target_data_source_id":{"type":"string","format":"uuid","title":"Target Data Source Id"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}},"type":"object","required":["target_directory","target_data_source_id"],"title":"AzureDevOpsPublishRequest"},"AzureDevOpsPublishResponse":{"properties":{"pr_url":{"type":"string","title":"Pr Url"},"branch_name":{"type":"string","title":"Branch Name"},"file_path":{"type":"string","title":"File Path"}},"type":"object","required":["pr_url","branch_name","file_path"],"title":"AzureDevOpsPublishResponse"},"BatchArchiveRequest":{"properties":{"page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Page Ids"},"archived":{"type":"boolean","title":"Archived"}},"additionalProperties":false,"type":"object","required":["archived"],"title":"BatchArchiveRequest"},"BatchArchiveResponse":{"properties":{"count":{"type":"integer","title":"Count"},"affected_page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Affected Page Ids"}},"type":"object","required":["count","affected_page_ids"],"title":"BatchArchiveResponse"},"BatchDeleteRequest":{"properties":{"page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Page Ids"}},"additionalProperties":false,"type":"object","title":"BatchDeleteRequest"},"BatchDeleteResponse":{"properties":{"count":{"type":"integer","title":"Count"},"deleted_page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Deleted Page Ids"}},"type":"object","required":["count","deleted_page_ids"],"title":"BatchDeleteResponse"},"ChangeView":{"properties":{"title":{"type":"string","title":"Title"},"source":{"type":"string","title":"Source"},"version":{"type":"integer","title":"Version"},"published_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Published Version"},"is_new_doc":{"type":"boolean","title":"Is New Doc"},"has_changes":{"type":"boolean","title":"Has Changes"},"diff":{"type":"string","title":"Diff"},"thread":{"anyOf":[{"$ref":"#/components/schemas/Thread"},{"type":"null"}]}},"type":"object","required":["title","source","version","published_version","is_new_doc","has_changes","diff"],"title":"ChangeView","description":"Server-rendered review diff view for a specific page version.\n\nKeyed on page_version_id so callers (MCP confirm-preview, dashboard, CLI)\nshare one diff renderer. ``diff`` is the rendered unified diff, the new-doc\ncontent preview, or the no-changes notice depending on ``is_new_doc`` /\n``has_changes``. ``thread`` is the triggering PR/Slack thread when the\nchange was externally triggered, else None."},"ChatAgentVersion":{"type":"string","enum":["stable","unstable","experimental"],"title":"ChatAgentVersion"},"ChatMessagePayload":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"type":"string","title":"Body"},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"},"agent_version":{"anyOf":[{"$ref":"#/components/schemas/ChatAgentVersion"},{"type":"string"},{"type":"null"}],"title":"Agent Version"},"disable_cache":{"type":"boolean","title":"Disable Cache","default":false},"channel":{"type":"string","const":"dosu_app_chat","title":"Channel","default":"dosu_app_chat"},"selected_data_source_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Data Source Ids"},"response_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Response Required"},"external_trigger_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Trigger Url"}},"type":"object","required":["body"],"title":"ChatMessagePayload"},"CliDocType":{"type":"string","enum":["agents","readme","architecture","deps"],"title":"CliDocType","description":"The document types the CLI can ask Dosu to generate."},"CliSessionResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"expires_in":{"type":"integer","title":"Expires In"},"email":{"type":"string","title":"Email"}},"type":"object","required":["access_token","refresh_token","expires_in","email"],"title":"CliSessionResponse","description":"Response from ``POST /v1/cli/auth/sessions``."},"CliTaskEnqueueResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"}},"type":"object","required":["task_id"],"title":"CliTaskEnqueueResponse","description":"Response for POST /cli/task/{task} — returned immediately (non-blocking)."},"CliTaskFindings":{"properties":{"rationale":{"type":"string","title":"Rationale"},"action":{"type":"string","enum":["create","update"],"title":"Action"}},"additionalProperties":true,"type":"object","required":["rationale","action"],"title":"CliTaskFindings","description":"One item from the CLI's audit for a single doc.\n\n``action`` is whether the CLI wants to create a new file or update an\nexisting one; ``rationale`` is the human-readable justification that is\nthreaded into the generation instructions."},"CliTaskListResponse":{"properties":{"tasks":{"items":{"$ref":"#/components/schemas/CliTaskSummary"},"type":"array","title":"Tasks"}},"type":"object","required":["tasks"],"title":"CliTaskListResponse","description":"Response for GET /cli/tasks."},"CliTaskRequest":{"properties":{"data_source_id":{"type":"string","format":"uuid","title":"Data Source Id"},"repo":{"type":"string","title":"Repo"},"findings":{"$ref":"#/components/schemas/CliTaskFindings"}},"type":"object","required":["data_source_id","repo","findings"],"title":"CliTaskRequest","description":"Request body for POST /cli/task/{task}."},"CliTaskRunStatusResponse":{"properties":{"state":{"type":"string","enum":["PROGRESS","SUCCESS","FAILURE"],"title":"State"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"pr_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Url"}},"type":"object","required":["state"],"title":"CliTaskRunStatusResponse","description":"Response for GET /cli/task/run/{task_id}, mirroring doc-imports status."},"CliTaskSummary":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"doc_type":{"$ref":"#/components/schemas/CliDocType"}},"type":"object","required":["id","label","description","doc_type"],"title":"CliTaskSummary","description":"The capability shape exposed in GET /cli/tasks (no internal generation fields)."},"CodaPublishRequest":{"properties":{"target_doc_id":{"type":"string","format":"uuid","title":"Target Doc Id"},"target_data_source_id":{"type":"string","format":"uuid","title":"Target Data Source Id"},"parent_page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Page Id"}},"type":"object","required":["target_doc_id","target_data_source_id"],"title":"CodaPublishRequest"},"CodaPublishResponse":{"properties":{"coda_page_external_id":{"type":"string","title":"Coda Page External Id"},"coda_page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coda Page Url"},"doc_external_id":{"type":"string","title":"Doc External Id"},"synced_at":{"type":"string","format":"date-time","title":"Synced At"}},"type":"object","required":["coda_page_external_id","doc_external_id","synced_at"],"title":"CodaPublishResponse"},"ConfluencePublishRequest":{"properties":{"parent_page_id":{"type":"string","format":"uuid","title":"Parent Page Id"},"target_data_source_id":{"type":"string","format":"uuid","title":"Target Data Source Id"}},"type":"object","required":["parent_page_id","target_data_source_id"],"title":"ConfluencePublishRequest"},"ConfluencePublishResponse":{"properties":{"result":{"type":"string","enum":["created","updated","noop"],"title":"Result"},"confluence_page_id":{"type":"string","title":"Confluence Page Id"},"confluence_page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confluence Page Url"},"parent_page_id":{"type":"string","title":"Parent Page Id"},"synced_at":{"type":"string","format":"date-time","title":"Synced At"}},"type":"object","required":["result","confluence_page_id","parent_page_id","synced_at"],"title":"ConfluencePublishResponse"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","title":"Name","default":"dosu-cli"}},"type":"object","title":"CreateApiKeyRequest"},"CreateApiKeyResponse":{"properties":{"api_key":{"type":"string","title":"Api Key"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["api_key","id","name","key_prefix","created_at"],"title":"CreateApiKeyResponse"},"CreateMcpConnectionRequest":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"server_url":{"type":"string","title":"Server Url"},"auth_type":{"type":"string","title":"Auth Type","default":"none"},"auth_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Auth Config"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["org_id","name","server_url"],"title":"CreateMcpConnectionRequest"},"CreatePageRequest":{"properties":{"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"type":{"$ref":"#/components/schemas/PageType","default":"document"},"published":{"type":"boolean","title":"Published","default":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["title","body"],"title":"CreatePageRequest"},"CreateSessionRequest":{"properties":{"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"}},"type":"object","title":"CreateSessionRequest","description":"Optional localhost target used when an SSO account needs OAuth."},"CreateTicketResponse":{"properties":{"ticket":{"type":"string","title":"Ticket"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["ticket","expires_in"],"title":"CreateTicketResponse","description":"Response from ``POST /v1/cli/auth/tickets``."},"DeleteFolderSyncRuleRequest":{"properties":{"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"data_source_id":{"type":"string","format":"uuid","title":"Data Source Id"},"selector_type":{"type":"string","title":"Selector Type"},"selector_value":{"type":"string","title":"Selector Value"}},"type":"object","required":["knowledge_store_id","data_source_id","selector_type","selector_value"],"title":"DeleteFolderSyncRuleRequest"},"DeploymentResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"provider_slug":{"type":"string","title":"Provider Slug"},"enabled":{"type":"boolean","title":"Enabled"},"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"space_id":{"type":"string","title":"Space Id"}},"type":"object","required":["deployment_id","name","description","provider_slug","enabled","org_id","org_name","space_id"],"title":"DeploymentResponse"},"ExchangeTicketResponse":{"properties":{"status":{"type":"string","enum":["pending","authenticated","expired"],"title":"Status"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["status"],"title":"ExchangeTicketResponse","description":"Response from ``POST /v1/cli/auth/tickets/{ticket}/exchange``."},"ExtensionSessionResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"ExtensionSessionResponse"},"FolderSyncRuleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"data_source_id":{"type":"string","format":"uuid","title":"Data Source Id"},"provider":{"type":"string","title":"Provider"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"},"selector_type":{"type":"string","title":"Selector Type"},"selector_value":{"type":"string","title":"Selector Value"},"rule_type":{"type":"string","title":"Rule Type"}},"type":"object","required":["id","knowledge_store_id","data_source_id","provider","repo","selector_type","selector_value","rule_type"],"title":"FolderSyncRuleResponse"},"GitFolderSelector":{"properties":{"repo":{"type":"string","title":"Repo"},"path":{"type":"string","title":"Path"}},"type":"object","required":["repo","path"],"title":"GitFolderSelector"},"GitHubPublishRequest":{"properties":{"target_repository_id":{"type":"integer","title":"Target Repository Id"},"target_directory":{"type":"string","title":"Target Directory"},"target_data_source_id":{"type":"string","format":"uuid","title":"Target Data Source Id"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}},"type":"object","required":["target_repository_id","target_directory","target_data_source_id"],"title":"GitHubPublishRequest"},"GitHubPublishResponse":{"properties":{"pr_url":{"type":"string","title":"Pr Url"},"branch_name":{"type":"string","title":"Branch Name"},"target_file_path":{"type":"string","title":"Target File Path"}},"type":"object","required":["pr_url","branch_name","target_file_path"],"title":"GitHubPublishResponse"},"GitLabPublishRequest":{"properties":{"gitlab_project_id":{"type":"string","format":"uuid","title":"Gitlab Project Id"},"target_directory":{"type":"string","title":"Target Directory"},"target_data_source_id":{"type":"string","format":"uuid","title":"Target Data Source Id"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}},"type":"object","required":["gitlab_project_id","target_directory","target_data_source_id"],"title":"GitLabPublishRequest"},"GitLabPublishResponse":{"properties":{"mr_url":{"type":"string","title":"Mr Url"},"branch_name":{"type":"string","title":"Branch Name"},"file_path":{"type":"string","title":"File Path"}},"type":"object","required":["mr_url","branch_name","file_path"],"title":"GitLabPublishResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImportAzureDevOpsFilesRequest":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"}},"type":"object","required":["file_ids","knowledge_store_id"],"title":"ImportAzureDevOpsFilesRequest"},"ImportCodaPagesRequest":{"properties":{"page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Page Ids","default":[]},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"folder_page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Folder Page Ids","default":[]}},"type":"object","required":["knowledge_store_id"],"title":"ImportCodaPagesRequest"},"ImportConfluencePagesRequest":{"properties":{"page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Page Ids","default":[]},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"folder_page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Folder Page Ids","default":[]}},"type":"object","required":["knowledge_store_id"],"title":"ImportConfluencePagesRequest"},"ImportGithubFilesRequest":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids","default":[]},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"folders":{"items":{"$ref":"#/components/schemas/GitFolderSelector"},"type":"array","title":"Folders","default":[]}},"type":"object","required":["knowledge_store_id"],"title":"ImportGithubFilesRequest"},"ImportGitlabFilesRequest":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids","default":[]},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"folders":{"items":{"$ref":"#/components/schemas/GitFolderSelector"},"type":"array","title":"Folders","default":[]}},"type":"object","required":["knowledge_store_id"],"title":"ImportGitlabFilesRequest"},"ImportNotionPagesRequest":{"properties":{"page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Page Ids","default":[]},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"folder_page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Folder Page Ids","default":[]}},"type":"object","required":["knowledge_store_id"],"title":"ImportNotionPagesRequest"},"ImportTaskStatusResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"state":{"type":"string","title":"State"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["task_id","state","detail","data_source_id","created_at","updated_at"],"title":"ImportTaskStatusResponse","description":"Response for import task status query."},"ListMcpToolsResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"tools":{"items":{"$ref":"#/components/schemas/McpToolInfo"},"type":"array","title":"Tools","default":[]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"ListMcpToolsResponse"},"McpConnection":{"properties":{"mcp_connection_id":{"type":"string","format":"uuid","title":"Mcp Connection Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"server_url":{"type":"string","title":"Server Url"},"auth_type":{"type":"string","title":"Auth Type"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["mcp_connection_id","org_id","name","description","server_url","auth_type","provider_slug","enabled","created_at","updated_at","created_by"],"title":"McpConnection"},"McpToolInfo":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"output_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Schema"}},"type":"object","required":["name","description","input_schema"],"title":"McpToolInfo"},"MessageUpdatePayload":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"MessageUpdatePayload"},"NotionPublishRequest":{"properties":{"parent_notion_page_id":{"type":"string","format":"uuid","title":"Parent Notion Page Id"},"target_data_source_id":{"type":"string","format":"uuid","title":"Target Data Source Id"}},"type":"object","required":["parent_notion_page_id","target_data_source_id"],"title":"NotionPublishRequest"},"NotionPublishResponse":{"properties":{"result":{"type":"string","title":"Result"},"notion_page_id":{"type":"string","title":"Notion Page Id"},"notion_page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notion Page Url"},"parent_page_id":{"type":"string","title":"Parent Page Id"},"synced_at":{"type":"string","format":"date-time","title":"Synced At"}},"type":"object","required":["result","notion_page_id","parent_page_id","synced_at"],"title":"NotionPublishResponse"},"OAuthAuthorizationResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"OAuthAuthorizationResponse"},"OrgRepo":{"properties":{"repo_slug":{"type":"string","title":"Repo Slug"},"repo_name":{"type":"string","title":"Repo Name"},"description":{"type":"string","title":"Description"},"space_id":{"type":"string","title":"Space Id"},"space_url":{"type":"string","title":"Space Url"},"is_public":{"type":"boolean","title":"Is Public"}},"type":"object","required":["repo_slug","repo_name","description","space_id","space_url","is_public"],"title":"OrgRepo","description":"A GitHub repository with Dosu enabled."},"OrgReposResponse":{"properties":{"org_name":{"type":"string","title":"Org Name"},"repos":{"items":{"$ref":"#/components/schemas/OrgRepo"},"type":"array","title":"Repos"},"returned_count":{"type":"integer","title":"Returned Count"}},"type":"object","required":["org_name","repos","returned_count"],"title":"OrgReposResponse","description":"Response for organization repos endpoint."},"OrgResponse":{"properties":{"org_id":{"type":"string","title":"Org Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["org_id","name"],"title":"OrgResponse"},"PageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"knowledge_store_id":{"type":"string","format":"uuid","title":"Knowledge Store Id"},"type":{"$ref":"#/components/schemas/PageType"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"published":{"type":"boolean","title":"Published"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"version":{"type":"integer","title":"Version"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","knowledge_store_id","type","title","body","description","published","created_by","created_at","updated_at","version","url"],"title":"PageResponse"},"PageType":{"type":"string","enum":["document","answer","changelog","template","topic"],"title":"PageType"},"PreviewGenerationResponse":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"status":{"type":"string","title":"Status","default":"pending"}},"type":"object","required":["thread_id"],"title":"PreviewGenerationResponse","description":"Response for preview generation requests."},"PublicPreviewMessage":{"properties":{"id":{"type":"string","title":"Id"},"body":{"type":"string","title":"Body"},"author":{"type":"string","title":"Author"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","body","author","created_at"],"title":"PublicPreviewMessage","description":"A preview message visible to all users."},"PublicPreviewStatus":{"properties":{"has_preview":{"type":"boolean","title":"Has Preview"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"messages":{"items":{"$ref":"#/components/schemas/PublicPreviewMessage"},"type":"array","title":"Messages","default":[]},"public_space_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Space Url"}},"type":"object","required":["has_preview"],"title":"PublicPreviewStatus","description":"Public preview status for a GitHub issue/PR/discussion."},"PublicSpaceInfo":{"properties":{"has_public_space":{"type":"boolean","title":"Has Public Space"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"space_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Url"},"repo_slug":{"type":"string","title":"Repo Slug"}},"type":"object","required":["has_public_space","repo_slug"],"title":"PublicSpaceInfo","description":"Information about a public space for a GitHub repository."},"RecentThreadItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"thread_type":{"type":"string","title":"Thread Type"},"last_dosu_response_at":{"type":"string","title":"Last Dosu Response At"},"has_pending_preview":{"type":"boolean","title":"Has Pending Preview"},"opened_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opened At"},"last_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated At"}},"type":"object","required":["id","title","url","thread_type","last_dosu_response_at","has_pending_preview"],"title":"RecentThreadItem","description":"A recent thread with Dosu activity."},"RecentThreadsResponse":{"properties":{"threads":{"items":{"$ref":"#/components/schemas/RecentThreadItem"},"type":"array","title":"Threads"},"returned_count":{"type":"integer","title":"Returned Count"}},"type":"object","required":["threads","returned_count"],"title":"RecentThreadsResponse","description":"Response for recent threads endpoint."},"ReindexEvictedResponse":{"properties":{"data_source_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Data Source Ids"}},"type":"object","required":["data_source_ids"],"title":"ReindexEvictedResponse"},"SpaceInfoResponse":{"properties":{"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"ask_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Url"},"has_dosu":{"type":"boolean","title":"Has Dosu"},"is_public":{"type":"boolean","title":"Is Public"},"setup_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Url"}},"type":"object","required":["space_id","ask_url","has_dosu","is_public","setup_url"],"title":"SpaceInfoResponse","description":"Response for space info endpoint - checks if a repo has Dosu integration."},"SyncBackRequest":{"properties":{"markdown":{"type":"string","title":"Markdown","description":"Edited markdown content (node IDs stripped automatically)."}},"type":"object","required":["markdown"],"title":"SyncBackRequest","description":"Request to sync edited content back to an external platform."},"SyncBackResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"actions_executed":{"type":"integer","title":"Actions Executed","default":0},"actions_failed":{"type":"integer","title":"Actions Failed","default":0},"warnings":{"items":{"$ref":"#/components/schemas/SyncWarningResponse"},"type":"array","title":"Warnings"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"details":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Details"}},"type":"object","required":["success"],"title":"SyncBackResponse","description":"Response from a sync back operation."},"SyncDataSourceRequest":{"properties":{"auto_import":{"anyOf":[{"$ref":"#/components/schemas/AutoImportRequest"},{"type":"null"}]}},"type":"object","title":"SyncDataSourceRequest"},"SyncWarningResponse":{"properties":{"node_id":{"type":"string","title":"Node Id"},"message":{"type":"string","title":"Message"},"warning_type":{"type":"string","title":"Warning Type"}},"type":"object","required":["node_id","message","warning_type"],"title":"SyncWarningResponse","description":"Warning about a sync operation."},"TestMcpConnectionRequest":{"properties":{"mcp_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Mcp Connection Id"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"server_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Url"},"auth_type":{"type":"string","title":"Auth Type","default":"none"},"auth_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Auth Config"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"}},"type":"object","title":"TestMcpConnectionRequest","description":"Test an MCP connection with either ephemeral credentials or an existing saved connection.\n\nProvide ``mcp_connection_id`` to test an already-saved connection (its stored\nsecret is used). Otherwise provide ``org_id`` + ``server_url`` + ``auth_type`` +\n``auth_config`` to test credentials the user is currently entering in the UI."},"TestMcpConnectionResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"tool_count":{"type":"integer","title":"Tool Count","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"TestMcpConnectionResponse"},"Thread":{"properties":{"platform":{"type":"string","title":"Platform"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"ingested":{"type":"boolean","title":"Ingested"},"messages":{"items":{"$ref":"#/components/schemas/ThreadMessage"},"type":"array","title":"Messages"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["platform","title","url","ingested","messages","total"],"title":"Thread","description":"The PR/Slack thread that triggered a doc change (ENG-507 / ENG-534).\n\nFirst-class data on :class:`ChangeView` so every surface (MCP, tRPC, CLI,\nskill) inherits the originating thread without reimplementing the lookup.\nThis is a capped view-model (not the ``core.db.sql.models.Thread`` entity):\n``ingested`` is False when the trigger URL isn't a thread Dosu has\ningested — consumers then fall back to the bare ``url``. Messages are\nalready capped (see ``_MAX_THREAD_MESSAGES`` / ``_MAX_MESSAGE_CHARS``);\n``total`` is the full ingested count so a renderer can note how many were\nomitted."},"ThreadMessage":{"properties":{"author":{"type":"string","title":"Author"},"author_role":{"type":"string","title":"Author Role"},"body":{"type":"string","title":"Body"}},"type":"object","required":["author","author_role","body"],"title":"ThreadMessage","description":"One ingested message from the triggering PR/Slack thread."},"UnassignFromSpaceRequest":{"properties":{"space_id":{"type":"string","format":"uuid","title":"Space Id"}},"type":"object","required":["space_id"],"title":"UnassignFromSpaceRequest"},"UpdateMcpConnectionRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"server_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Url"},"auth_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Type"},"auth_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Auth Config"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"UpdateMcpConnectionRequest"},"UpdatePageRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdatePageRequest"},"UpdatePageVersionStatusRequest":{"properties":{"page_version_id":{"type":"string","format":"uuid","title":"Page Version Id"},"action":{"type":"string","enum":["accept","decline","revert_to_pending"],"title":"Action"}},"type":"object","required":["page_version_id","action"],"title":"UpdatePageVersionStatusRequest"},"UpdatePageVersionStatusResponse":{"properties":{"page_version_id":{"type":"string","format":"uuid","title":"Page Version Id"}},"type":"object","required":["page_version_id"],"title":"UpdatePageVersionStatusResponse"},"UserReposResponse":{"properties":{"repos":{"items":{"$ref":"#/components/schemas/OrgRepo"},"type":"array","title":"Repos"},"returned_count":{"type":"integer","title":"Returned Count"}},"type":"object","required":["repos","returned_count"],"title":"UserReposResponse","description":"Response for user repos endpoint - all repos the user has access to."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}