{"openapi":"3.1.0","info":{"title":"Quoin API","description":"Quoin research HTTP API. Browse this documentation without a key. For API calls, send header **x-api-key** with your minted Quoin API key (`quoin_api_…`) from [Quoin](https://quoin.ai) workspace settings.","version":"1.0.0"},"paths":{"/health":{"get":{"tags":["meta"],"summary":"Health","description":"Liveness probe; no authentication required.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"tags":["meta"],"summary":"Root","description":"Human-facing landing (no API key). Matches quoin-mcp public homepage styling.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/widgets.json":{"get":{"tags":["openbb"],"summary":"Openbb Widgets","description":"OpenBB Workspace widget manifest — no auth (Workspace fetches this on connect/refresh).","operationId":"openbb_widgets_widgets_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/apps.json":{"get":{"tags":["openbb"],"summary":"Openbb Apps","description":"OpenBB Workspace app/dashboard layout manifest — no auth.","operationId":"openbb_apps_apps_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agents.json":{"get":{"tags":["openbb"],"summary":"Openbb Agents Manifest","description":"OpenBB Workspace **custom AI agent** descriptor — no auth (Workspace fetches this on\nconnect). Distinct from `GET /agents` below, which backs the unrelated `quoin_agents`\n*table widget* (Quoin's own internal research-agent catalog). This manifest instead\nregisters \"Quoin Research\" as a selectable Copilot agent; see `POST /copilot/query`.","operationId":"openbb_agents_manifest_agents_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/copilot/query":{"post":{"tags":["openbb"],"summary":"Copilot Query","description":"Query endpoint for the `quoin-research` copilot agent (see `GET /agents.json`).","operationId":"copilot_query_copilot_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/briefs":{"get":{"tags":["openbb"],"summary":"Openbb Briefs","description":"Quoin Briefs as an OpenBB `newsfeed` widget. Titles/dates/excerpts are always public — no\nAPI key required — but the full `body` requires a known user email; without one,\nquoin-nextjs substitutes a \"connect your email\" teaser. Marketplace-listed installs send\nthis automatically via the `x-openbb-user` header on every request (confirmed by OpenBB's\nMinh Hoang, 2026-07-23) — no widget param needed there. The `email` query param remains a\nfallback for direct custom-backend connections (pre-marketplace testing), where OpenBB\nonly forwards whatever a widget param collects. Proxies quoin-nextjs's internal briefs feed.","operationId":"openbb_briefs_briefs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum number of briefs to return","default":20,"title":"Limit"},"description":"Maximum number of briefs to return"},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Fallback for direct (pre-marketplace) connections without the x-openbb-user header","title":"Email"},"description":"Fallback for direct (pre-marketplace) connections without the x-openbb-user header"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by beat (e.g. 'technology'); blank/omitted returns all","title":"Category"},"description":"Filter by beat (e.g. 'technology'); blank/omitted returns all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Openbb Briefs Briefs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/project_options":{"get":{"tags":["openbb"],"summary":"Openbb Project Options","description":"Options for the `quoin_report_viewer` widget's Project dropdown — every research project\nvisible to this key, most-recent-report-first.","operationId":"openbb_project_options_project_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Openbb Project Options Project Options Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/report_options":{"get":{"tags":["openbb"],"summary":"Openbb Report Options","description":"Dependent-dropdown/tabs options for the `quoin_report_viewer` widget's optional Report\nparam — every individual report for the selected project (`project_id`), including Due\nDiligence catalog sub-agent reports. Lets one specific agent's report (e.g. \"Financial\nSignals & Disclosures\") be viewed directly. The core report (Business Research/Topical\nResearch/Academic Research) always sorts first regardless of date, then the rest newest\nfirst — the core report is the one most people want by default, so it shouldn't get buried\nif a sub-agent report happens to be more recent.","operationId":"openbb_report_options_report_options_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Openbb Report Options Report Options Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report":{"get":{"tags":["openbb"],"summary":"Openbb Report Widget","description":"`quoin_report_viewer` markdown widget. Returns raw markdown (not JSON) — OpenBB's markdown\nwidget type expects a bare string body. `view=diligence` always wins and shows the Due\nDiligence report; otherwise an explicit `report_id` is shown directly; otherwise falls back\nto the project's core report. `view=summary` shows that resolved report's AI-generated\nreview instead of its full text. `view` itself is hidden on this widget (`\"show\": false`)\nand driven entirely by the `quoin_view_selector` HTML widget above it via OpenBB's\nwidget-to-widget parameter bridge (see `openbb_view_selector` below) — both widgets share\nthe `view` paramName and are tagged into the same `apps.json` group.","operationId":"openbb_report_widget_report_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Project Id"}},{"name":"report_id","in":"query","required":false,"schema":{"type":"string","description":"Optional: a specific agent's report. Defaults to the project's core Business Research/Topical/Academic report when blank.","default":"","title":"Report Id"},"description":"Optional: a specific agent's report. Defaults to the project's core Business Research/Topical/Academic report when blank."},{"name":"view","in":"query","required":false,"schema":{"type":"string","description":"'research' (full report), 'summary' (AI-generated review), or 'diligence' (the project's Due Diligence report)","default":"summary","title":"View"},"description":"'research' (full report), 'summary' (AI-generated review), or 'diligence' (the project's Due Diligence report)"}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/view_selector":{"get":{"tags":["openbb"],"summary":"Openbb View Selector","description":"`quoin_view_selector` `\"type\": \"html\"` widget — real toggle buttons (not OpenBB's native\ncheckbox/tabs param controls) styled to match Quoin's own UI. On click, dispatches an\n`openbb:widget-params:update` CustomEvent; Workspace's own injected HtmlViewer bridge script\nforwards it (no manual postMessage needed — that's only required for `\"type\": \"iframe\"`, not\n`\"html\"`), then re-sends the new `view` value to every widget in the `apps.json` \"Quoin View\"\ngroup, including this one and `quoin_report_viewer`. Confirmed against OpenBB's own\n`iframe-bridge-example` reference backend (`widget-examples/iframe-bridge-example/main.py`)\n— a real, working implementation, not inferred from docs alone. No auth needed for the HTML\nshell itself (no user data rendered here), but kept behind the same minted key as every other\nwidget on this connection for consistency — OpenBB resends the same key to all of them anyway.","operationId":"openbb_view_selector_view_selector_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"view","in":"query","required":false,"schema":{"type":"string","default":"summary","title":"View"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents":{"get":{"tags":["openbb"],"summary":"Openbb Agents Widget","description":"Stub for the `quoin_agents` *table widget* — see widgets.json. Not implemented yet.\nNot to be confused with the OpenBB copilot agent (`GET /agents.json`, `POST /copilot/query`).","operationId":"openbb_agents_widget_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/auth":{"get":{"tags":["v1"],"summary":"V1 Auth","description":"Session / scope for the minted key. Body is the Next.js internal session JSON as returned.","operationId":"v1_auth_v1_auth_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/org/{org_uuid}/reports":{"get":{"tags":["v1"],"summary":"V1 Org Reports","description":"List research reports for **org_uuid**. Proxies internal MCP `research/list`; **`items`** are\nreturned unchanged from upstream (same JSON Next returns).","operationId":"v1_org_reports_v1_org__org_uuid__reports_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"org_uuid","in":"path","required":true,"schema":{"type":"string","title":"Org Uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size (max 100)","default":50,"title":"Limit"},"description":"Page size (max 100)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination cursor from a previous response","title":"Cursor"},"description":"Opaque pagination cursor from a previous response"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by report status","title":"Status"},"description":"Filter by report status"},{"name":"entityType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to \"business\" or \"project\" entity type","title":"Entitytype"},"description":"Restrict to \"business\" or \"project\" entity type"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/business/{business_uuid}/reports":{"get":{"tags":["v1"],"summary":"V1 Business Reports","description":"Research list for **business_uuid**. Proxies internal MCP `research/list`; **`items`** are\nupstream JSON unchanged.","operationId":"v1_business_reports_v1_business__business_uuid__reports_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"business_uuid","in":"path","required":true,"schema":{"type":"string","title":"Business Uuid"}},{"name":"org","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization UUID when your key requires an explicit org","title":"Org"},"description":"Organization UUID when your key requires an explicit org"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size (max 100)","default":50,"title":"Limit"},"description":"Page size (max 100)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination cursor from a previous response","title":"Cursor"},"description":"Opaque pagination cursor from a previous response"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by report status","title":"Status"},"description":"Filter by report status"},{"name":"entityType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to \"business\" or \"project\" (cannot be project when scoped to a business)","title":"Entitytype"},"description":"Restrict to \"business\" or \"project\" (cannot be project when scoped to a business)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspace/{workspace_uuid}/reports":{"get":{"tags":["v1"],"summary":"V1 Workspace Reports","description":"Research list for **workspace_uuid**. Proxies internal MCP `research/list`; **`items`** are\nupstream JSON unchanged.","operationId":"v1_workspace_reports_v1_workspace__workspace_uuid__reports_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_uuid","in":"path","required":true,"schema":{"type":"string","title":"Workspace Uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size (max 100)","default":50,"title":"Limit"},"description":"Page size (max 100)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination cursor from a previous response","title":"Cursor"},"description":"Opaque pagination cursor from a previous response"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by report status","title":"Status"},"description":"Filter by report status"},{"name":"entityType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to \"business\" or \"project\" entity type","title":"Entitytype"},"description":"Restrict to \"business\" or \"project\" entity type"},{"name":"org","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization UUID when your key requires an explicit org (same as org-scoped list)","title":"Org"},"description":"Organization UUID when your key requires an explicit org (same as org-scoped list)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspace/{workspace_uuid}/businesses":{"get":{"tags":["v1"],"summary":"V1 Workspace Businesses","description":"Workspace businesses index. Returns the Next.js internal JSON body unchanged.","operationId":"v1_workspace_businesses_v1_workspace__workspace_uuid__businesses_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_uuid","in":"path","required":true,"schema":{"type":"string","title":"Workspace Uuid"}},{"name":"org","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization UUID when your key requires an explicit org","title":"Org"},"description":"Organization UUID when your key requires an explicit org"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/report/{report_uuid}":{"get":{"tags":["v1"],"summary":"V1 Report","description":"Full report for **report_uuid**. Returns the Next.js internal `research/get` JSON unchanged\n(includes **reportUuid**, **reportsUuid**, **markdown**, etc.). Optional query **org** when the\nkey requires it.","operationId":"v1_report_v1_report__report_uuid__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"report_uuid","in":"path","required":true,"schema":{"type":"string","title":"Report Uuid"}},{"name":"org","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization (or personal workspace) UUID — required when the key scopes to it explicitly; omit when resolved from the key alone","title":"Org"},"description":"Organization (or personal workspace) UUID — required when the key scopes to it explicitly; omit when resolved from the key alone"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentFeatureOption":{"properties":{"label":{"type":"string","title":"Label"},"type":{"anyOf":[{"type":"string","enum":["toggle","text","select"]},{"type":"null"}],"title":"Type"},"default":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Default"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentFeatureSelectOption"},"type":"array"},{"type":"null"}],"title":"Options"}},"type":"object","required":["label"],"title":"AgentFeatureOption"},"AgentFeatureSelectOption":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"}},"type":"object","required":["label","value"],"title":"AgentFeatureSelectOption"},"AgentTool":{"properties":{"server_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Id","description":"The ID of the server to execute the tool on"},"name":{"type":"string","title":"Name","description":"The name of the tool."},"url":{"type":"string","title":"Url","description":"The URL of the tool."},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint","description":"The direct REST endpoint of the tool."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the tool."},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"The input schema of the tool."},"auth_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Token","description":"The authentication token for the tool."}},"type":"object","required":["name","url"],"title":"AgentTool","description":"Tool that can be executed by an agent."},"BarChartParameters":{"properties":{"chartType":{"type":"string","const":"bar","title":"Charttype"},"xKey":{"type":"string","title":"Xkey","description":"The key of the x-axis variable."},"yKey":{"items":{"type":"string"},"type":"array","title":"Ykey","description":"The key (or keys) of the y-axis variables."}},"type":"object","required":["chartType","xKey","yKey"],"title":"BarChartParameters"},"Citation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"A unique identifier for the citation."},"source_info":{"$ref":"#/components/schemas/SourceInfo"},"details":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Details","description":"Extra detail to add to the citation, eg. Page numbers."},"quote_bounding_boxes":{"anyOf":[{"items":{"items":{"$ref":"#/components/schemas/CitationHighlightBoundingBox"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Quote Bounding Boxes","description":"Bounding boxes for the highlights in the citation."}},"type":"object","required":["source_info"],"title":"Citation"},"CitationHighlightBoundingBox":{"properties":{"text":{"type":"string","title":"Text"},"page":{"type":"integer","title":"Page"},"x0":{"type":"number","title":"X0"},"top":{"type":"number","title":"Top"},"x1":{"type":"number","title":"X1"},"bottom":{"type":"number","title":"Bottom"}},"type":"object","required":["text","page","x0","top","x1","bottom"],"title":"CitationHighlightBoundingBox"},"ClientCommandResult":{"properties":{"status":{"type":"string","enum":["success","error","warning"],"title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status"],"title":"ClientCommandResult"},"ClientFunctionCallError":{"properties":{"error_type":{"type":"string","title":"Error Type","description":"The type of error that occurred."},"content":{"type":"string","title":"Content","description":"The error message of the function call."}},"type":"object","required":["error_type","content"],"title":"ClientFunctionCallError"},"DashboardInfo":{"properties":{"id":{"type":"string","title":"Id","description":"The ID of the dashboard. Used to identify the dashboard in the workspace."},"name":{"type":"string","title":"Name","description":"The name of the dashboard. Used to display the dashboard in the workspace."},"current_tab_id":{"type":"string","title":"Current Tab Id","description":"The name of the current tab. Used to identify the tab in the workspace."},"tabs":{"anyOf":[{"items":{"$ref":"#/components/schemas/TabInfo"},"type":"array"},{"type":"null"}],"title":"Tabs","description":"A list of tab information. Used to identify the tabs in the dashboard."}},"type":"object","required":["id","name","current_tab_id"],"title":"DashboardInfo"},"DataContent":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SingleDataContent"},"type":"array","title":"Items","description":"A list of data content items."},"extra_citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array","title":"Extra Citations","description":"The citations for the data content."}},"type":"object","required":["items"],"title":"DataContent"},"DataFileReferences":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SingleFileReference"},"type":"array","title":"Items","description":"A list of file references."},"extra_citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array","title":"Extra Citations","description":"The citations for the data content."}},"type":"object","required":["items"],"title":"DataFileReferences"},"DocxDataFormat":{"properties":{"data_type":{"type":"string","const":"docx","title":"Data Type"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["data_type","filename"],"title":"DocxDataFormat"},"DonutChartParameters":{"properties":{"chartType":{"type":"string","const":"donut","title":"Charttype"},"angleKey":{"type":"string","title":"Anglekey","description":"Angle of each pie sector."},"calloutLabelKey":{"type":"string","title":"Calloutlabelkey","description":"Names of the variable used for the callout labels."}},"type":"object","required":["chartType","angleKey","calloutLabelKey"],"title":"DonutChartParameters"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageDataFormat":{"properties":{"data_type":{"type":"string","enum":["jpg","jpeg","png"],"title":"Data Type"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["data_type","filename"],"title":"ImageDataFormat"},"LineChartParameters":{"properties":{"chartType":{"type":"string","const":"line","title":"Charttype"},"xKey":{"type":"string","title":"Xkey","description":"The key of the x-axis variable."},"yKey":{"items":{"type":"string"},"type":"array","title":"Ykey","description":"The key (or keys) of the y-axis variables."}},"type":"object","required":["chartType","xKey","yKey"],"title":"LineChartParameters"},"LlmClientFunctionCall":{"properties":{"function":{"type":"string","title":"Function"},"input_arguments":{"additionalProperties":true,"type":"object","title":"Input Arguments"}},"type":"object","required":["function","input_arguments"],"title":"LlmClientFunctionCall"},"LlmClientFunctionCallResultMessage":{"properties":{"role":{"$ref":"#/components/schemas/RoleEnum","default":"tool"},"function":{"type":"string","title":"Function","description":"The name of the called function."},"input_arguments":{"additionalProperties":true,"type":"object","title":"Input Arguments","description":"The input arguments passed to the function"},"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/ClientCommandResult"},{"$ref":"#/components/schemas/DataContent"},{"$ref":"#/components/schemas/DataFileReferences"},{"$ref":"#/components/schemas/ClientFunctionCallError"}]},"type":"array","title":"Data","description":"The content of the function call. Each element corresponds to the result of a different data source."},"extra_state":{"additionalProperties":true,"type":"object","title":"Extra State","description":"Extra state to be passed between the client and this service."}},"type":"object","required":["function","data"],"title":"LlmClientFunctionCallResultMessage","description":"Contains the result of a function call made against a client."},"LlmClientMessage":{"properties":{"role":{"$ref":"#/components/schemas/RoleEnum","description":"The role of the entity that is creating the message"},"content":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/LlmClientFunctionCall"}],"title":"Content","description":"The content of the message or the result of a function call."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The ID of the agent that created the message. If not provided, it will be set to the default agent ID."}},"type":"object","required":["role","content"],"title":"LlmClientMessage"},"OptionsEndpointParam":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Type of the options parameter."},"name":{"type":"string","title":"Name","description":"Name of the options parameter."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the options parameter."},"inherit_value_from":{"type":"string","title":"Inherit Value From","description":"Name of the user parameter that this parameter inherits its values from."}},"type":"object","required":["name","inherit_value_from"],"title":"OptionsEndpointParam"},"PdfDataFormat":{"properties":{"data_type":{"type":"string","const":"pdf","title":"Data Type"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["data_type","filename"],"title":"PdfDataFormat"},"PieChartParameters":{"properties":{"chartType":{"type":"string","const":"pie","title":"Charttype"},"angleKey":{"type":"string","title":"Anglekey","description":"Angle of each pie sector."},"calloutLabelKey":{"type":"string","title":"Calloutlabelkey","description":"Names of the variable used for the callout labels."}},"type":"object","required":["chartType","angleKey","calloutLabelKey"],"title":"PieChartParameters"},"PlaintextDataFormat":{"properties":{"data_type":{"type":"string","enum":["txt","md","html"],"title":"Data Type"},"parse_as":{"type":"string","const":"text","title":"Parse As","default":"text"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["data_type","filename"],"title":"PlaintextDataFormat"},"QueryRequest":{"properties":{"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/LlmClientFunctionCallResultMessage"},{"$ref":"#/components/schemas/LlmClientMessage"}]},"type":"array","title":"Messages","description":"A list of messages to submit to the copilot."},"context":{"anyOf":[{"items":{"$ref":"#/components/schemas/RawContext"},"type":"array"},{"type":"null"}],"title":"Context","description":"Additional context."},"widgets":{"anyOf":[{"$ref":"#/components/schemas/WidgetCollection"},{"type":"null"}],"description":"A dictionary containing primary, secondary, and extra widgets."},"urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Urls","description":"URLs to retrieve and use as context. Limited to 4 URLs."},"api_keys":{"anyOf":[{"$ref":"#/components/schemas/UserAPIKeys"},{"type":"null"}],"description":"Use custom API keys for the request."},"force_web_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Force Web Search","description":"Set True to force a web search."},"timezone":{"type":"string","title":"Timezone","description":"The timezone to use for the request.","default":"UTC","examples":["UTC","America/New_York","Europe/London","Asia/Tokyo"]},"workspace_state":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceState"},{"type":"null"}],"description":"Context of the workspace, with data about current state of the workspace."},"workspace_options":{"additionalProperties":true,"type":"object","title":"Workspace Options","description":"Workspace option values keyed by option id."},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentTool"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools that can be used to execute the request."}},"type":"object","required":["messages"],"title":"QueryRequest"},"RawContext":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The UUID of the widget."},"name":{"type":"string","title":"Name","description":"The name of the widget."},"description":{"type":"string","title":"Description","description":"A description of the data contained in the widget"},"data":{"$ref":"#/components/schemas/DataContent","description":"The data content of the widget"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional widget metadata (eg. the selected ticker, etc)"}},"type":"object","required":["uuid","name","description","data"],"title":"RawContext"},"RawObjectDataFormat":{"properties":{"data_type":{"type":"string","const":"object","title":"Data Type","default":"object"},"parse_as":{"type":"string","enum":["text","table","chart","snowflake_query","snowflake_python","html"],"title":"Parse As","default":"table"},"chart_params":{"anyOf":[{"$ref":"#/components/schemas/LineChartParameters"},{"$ref":"#/components/schemas/BarChartParameters"},{"$ref":"#/components/schemas/ScatterChartParameters"},{"$ref":"#/components/schemas/PieChartParameters"},{"$ref":"#/components/schemas/DonutChartParameters"},{"type":"null"}],"title":"Chart Params"},"query_data_source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query Data Source"}},"type":"object","title":"RawObjectDataFormat"},"RoleEnum":{"type":"string","enum":["ai","human","tool"],"title":"RoleEnum"},"ScatterChartParameters":{"properties":{"chartType":{"type":"string","const":"scatter","title":"Charttype"},"xKey":{"type":"string","title":"Xkey","description":"The key of the x-axis variable. Only numerical variables can be provided for a scatter plot."},"yKey":{"items":{"type":"string"},"type":"array","title":"Ykey","description":"The key (or keys) of the y-axis variables. Only numerical variables can be provided for a scatter plot."}},"type":"object","required":["chartType","xKey","yKey"],"title":"ScatterChartParameters"},"SingleDataContent":{"properties":{"content":{"type":"string","title":"Content","description":"The data content, either as a raw string, JSON string, or as a base64 encoded string."},"data_format":{"oneOf":[{"$ref":"#/components/schemas/RawObjectDataFormat"},{"$ref":"#/components/schemas/PdfDataFormat"},{"$ref":"#/components/schemas/ImageDataFormat"},{"$ref":"#/components/schemas/SpreadsheetDataFormat"},{"$ref":"#/components/schemas/PlaintextDataFormat"},{"$ref":"#/components/schemas/DocxDataFormat"}],"title":"Data Format","description":"How the data should be parsed and handled.","discriminator":{"propertyName":"data_type","mapping":{"csv":"#/components/schemas/SpreadsheetDataFormat","docx":"#/components/schemas/DocxDataFormat","html":"#/components/schemas/PlaintextDataFormat","jpeg":"#/components/schemas/ImageDataFormat","jpg":"#/components/schemas/ImageDataFormat","md":"#/components/schemas/PlaintextDataFormat","object":"#/components/schemas/RawObjectDataFormat","pdf":"#/components/schemas/PdfDataFormat","png":"#/components/schemas/ImageDataFormat","txt":"#/components/schemas/PlaintextDataFormat","xls":"#/components/schemas/SpreadsheetDataFormat","xlsx":"#/components/schemas/SpreadsheetDataFormat"}}},"citable":{"type":"boolean","title":"Citable","description":"Whether to cite derivatives of the data source.","default":true}},"type":"object","required":["content"],"title":"SingleDataContent"},"SingleFileReference":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"The file reference to the data file. A URL to a file."},"data_format":{"oneOf":[{"$ref":"#/components/schemas/RawObjectDataFormat"},{"$ref":"#/components/schemas/PdfDataFormat"},{"$ref":"#/components/schemas/ImageDataFormat"},{"$ref":"#/components/schemas/SpreadsheetDataFormat"},{"$ref":"#/components/schemas/PlaintextDataFormat"},{"$ref":"#/components/schemas/DocxDataFormat"}],"title":"Data Format","description":"Optional, but recommended. How the data should be parsed. If not provided, a best-effort attempt will be made to automatically determine the data format.","discriminator":{"propertyName":"data_type","mapping":{"csv":"#/components/schemas/SpreadsheetDataFormat","docx":"#/components/schemas/DocxDataFormat","html":"#/components/schemas/PlaintextDataFormat","jpeg":"#/components/schemas/ImageDataFormat","jpg":"#/components/schemas/ImageDataFormat","md":"#/components/schemas/PlaintextDataFormat","object":"#/components/schemas/RawObjectDataFormat","pdf":"#/components/schemas/PdfDataFormat","png":"#/components/schemas/ImageDataFormat","txt":"#/components/schemas/PlaintextDataFormat","xls":"#/components/schemas/SpreadsheetDataFormat","xlsx":"#/components/schemas/SpreadsheetDataFormat"}}},"citable":{"type":"boolean","title":"Citable","description":"Whether to cite derivatives of the data source.","default":true}},"type":"object","required":["url"],"title":"SingleFileReference"},"SourceInfo":{"properties":{"type":{"type":"string","enum":["widget","direct retrieval","web","artifact"],"title":"Type"},"uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Uuid"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"widget_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional metadata (eg. the selected ticker, endpoint used, etc.)."},"citable":{"type":"boolean","title":"Citable","description":"Whether the source is citable.","default":true}},"type":"object","required":["type"],"title":"SourceInfo"},"SpreadsheetDataFormat":{"properties":{"data_type":{"type":"string","enum":["xlsx","xls","csv"],"title":"Data Type"},"parse_as":{"type":"string","enum":["text","table"],"title":"Parse As","default":"table"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["data_type","filename"],"title":"SpreadsheetDataFormat"},"TabInfo":{"properties":{"tab_id":{"type":"string","title":"Tab Id","description":"The ID of the tab. Used to identify the tab in the workspace.","default":"__no_tab__"},"widgets":{"anyOf":[{"items":{"$ref":"#/components/schemas/WidgetInfo"},"type":"array"},{"type":"null"}],"title":"Widgets","description":"A list of widget information. Used to identify the widgets in the tab."}},"type":"object","title":"TabInfo"},"UserAPIKeys":{"properties":{"openai_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Openai Api Key","description":"Use a custom OpenAI API key for the request."}},"type":"object","title":"UserAPIKeys"},"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"},"Widget":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"UUID of the widget. Used to identify widgets present on the dashboard. If an `extra` widget, this will be generated."},"origin":{"type":"string","title":"Origin","description":"Origin of the widget."},"widget_id":{"type":"string","title":"Widget Id","description":"Endpoint ID of the widget."},"name":{"type":"string","title":"Name","description":"Name of the widget."},"description":{"type":"string","title":"Description","description":"Description of the widget."},"params":{"items":{"$ref":"#/components/schemas/WidgetParam"},"type":"array","title":"Params","description":"List of parameters for the widget."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Data provider source for the widget."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Category classification for the widget."},"sub_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Category","description":"Sub-category classification for the widget."},"columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Columns","description":"Column names for table-based widgets."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Metadata for the widget, must not overlap with current_params."}},"type":"object","required":["origin","widget_id","name","description","params"],"title":"Widget"},"WidgetCollection":{"properties":{"primary":{"items":{"$ref":"#/components/schemas/Widget"},"type":"array","title":"Primary","description":"Explicitly-added widgets with top priority."},"secondary":{"items":{"$ref":"#/components/schemas/Widget"},"type":"array","title":"Secondary","description":"Dashboard widgets with second-highest priority."},"extra":{"items":{"$ref":"#/components/schemas/Widget"},"type":"array","title":"Extra","description":"Extra data sources or custom backends."}},"type":"object","title":"WidgetCollection"},"WidgetInfo":{"properties":{"widget_uuid":{"type":"string","title":"Widget Uuid","description":"The ID of the widget. Used to identify the widget in the workspace."},"name":{"type":"string","title":"Name","description":"The name of the widget. Used to display the widget in the workspace."}},"type":"object","required":["widget_uuid","name"],"title":"WidgetInfo"},"WidgetParam":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the parameter."},"type":{"type":"string","enum":["string","text","number","integer","boolean","date","ticker","endpoint","tabs"],"title":"Type","description":"Type of the parameter."},"description":{"type":"string","title":"Description","description":"Description of the parameter."},"default_value":{"anyOf":[{},{"type":"null"}],"title":"Default Value","description":"Default value of the parameter."},"current_value":{"anyOf":[{},{"type":"null"}],"title":"Current Value","description":"Current value of the parameter. Must not be set for 'extra' widgets."},"executed_value":{"anyOf":[{},{"type":"null"}],"title":"Executed Value","description":"Last successfully executed value of the parameter, if available."},"multi_select":{"type":"boolean","title":"Multi Select","description":"Set True to allow multiple values for the parameter.","default":false},"split_param_on_citation":{"type":"boolean","title":"Split Param On Citation","description":"Set True to split the each parameter value into a separate citation. Only works if `multi_select` is True.","default":false},"options":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Options","description":"Optional list of values for enumerations."},"get_options":{"type":"boolean","title":"Get Options","description":"Set True to get options for the parameter dynamically. Requires an `optionsEndpoint` definition for the data source.","default":false},"options_params":{"items":{"$ref":"#/components/schemas/OptionsEndpointParam"},"type":"array","title":"Options Params","description":"A list of parameters to pass to the options endpoint."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Programming language for code execution params (e.g., 'python')"}},"type":"object","required":["name","type","description"],"title":"WidgetParam"},"WorkspaceAgent":{"properties":{"holder_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Url","description":"The URL of the agent holder. Used to display the agent in the workspace."},"id":{"type":"string","title":"Id","description":"The ID of the agent. Used to identify the agent in the workspace."},"name":{"type":"string","title":"Name","description":"The name of the agent. Used to display the agent in the workspace."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A description of the agent."},"features":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#/components/schemas/AgentFeatureOption"}]},"type":"object","title":"Features","description":"A dictionary of features that the agent supports."}},"type":"object","required":["id","name"],"title":"WorkspaceAgent"},"WorkspaceState":{"properties":{"action_history":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Action History","description":"A list of actions taken in the workspace. Used to track the history of actions in the workspace."},"agents":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkspaceAgent"},"type":"array"},{"type":"null"}],"title":"Agents","description":"A list of agents in the workspace."},"current_dashboard_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Dashboard Uuid","description":"The UUID of the current dashboard. Used to identify the dashboard in the workspace."},"current_dashboard_info":{"anyOf":[{"$ref":"#/components/schemas/DashboardInfo"},{"type":"null"}],"description":"Information about the current dashboard including its tabs and widgets."},"current_page_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Page Context","description":"The name of the current page context."}},"type":"object","title":"WorkspaceState"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"}}}}