{"openapi":"3.1.0","info":{"title":"Southwind Whispers - API","description":"\nSouthwind Whispers API for data ingestion, report generation, AI sections, and report chat.\n\nAuthentication:\n- Send the API key in the `X-API-Key` header.\n\nError format:\n- API errors are returned as `{\"error\": {\"detail\": \"...\", \"request_id\": \"...\"}}`.\n- `request_id` is usually present only for server-side failures.\n\nMain flows:\n\n1. Upload a file and generate a report\n- `POST /v1/origins/file/`\n- `POST /v1/reports/` with `agent_id='custom_report'`\n\n2. Create a blank report and then generate AI sections\n- `POST /v1/reports/` with `agent_id='blank_report'`\n- `POST /v1/reports/{task_id}/ai-section`\n\n3. Chat with the AI assistant while editing a report\n- `GET /v1/reports/{task_id}/chat/history`\n- `POST /v1/reports/{task_id}/chat`\n- `DELETE /v1/reports/{task_id}/chat/history`\n- chat responses are streamed as `text/event-stream`\n\nID validation:\n- `task_id`, `origin_id`, and `source_id` path parameters are UUIDs.\n- Malformed UUIDs return validation errors.\n","version":"1.81.0"},"paths":{"/v1/me":{"get":{"tags":["Me"],"summary":"Get Me","operationId":"get_me","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/me/organizations":{"get":{"tags":["Me"],"summary":"Get My Organizations","operationId":"get_my_organizations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationBase"},"type":"array","title":"Response Get My Organizations V1 Me Organizations Get"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organizations":{"post":{"tags":["Me"],"summary":"Create Organization","operationId":"create_organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/invitations":{"get":{"tags":["Me"],"summary":"List Invitations","operationId":"list_invitations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvitationResponse"},"type":"array","title":"Response List Invitations V1 Invitations Get"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/invitations/{invitation_id}/accept":{"post":{"tags":["Me"],"summary":"Respond To Invitation","operationId":"respond_to_invitation","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationActionRequest"}}}},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"Invitation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/":{"get":{"tags":["Agents"],"summary":"List Agents","description":"List agents available to the current organization.","operationId":"list_agents","responses":{"200":{"description":"Agents listed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentsResponse"}}}},"500":{"description":"The agent list could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/reports/":{"post":{"tags":["Reports"],"summary":"Create Report","description":"Create a report task from one or more data sources.\n\n- default: queues full report generation\n- `agent_id='blank_report'`: creates an empty report container in `completed` state\n- use `/v1/reports/{task_id}/ai-section` to build sections incrementally on blank reports","operationId":"create_report","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CustomCreateReportRequest"},{"$ref":"#/components/schemas/ResearchCreateReportRequest"},{"$ref":"#/components/schemas/CobaltoMarketingCreateReportRequest"},{"$ref":"#/components/schemas/RoverCreateReportRequest"},{"$ref":"#/components/schemas/BlankReportCreateRequest"}],"discriminator":{"propertyName":"agent_id","mapping":{"custom_report":"#/components/schemas/CustomCreateReportRequest","research_report":"#/components/schemas/ResearchCreateReportRequest","cobalto_marketing_report":"#/components/schemas/CobaltoMarketingCreateReportRequest","rover_report":"#/components/schemas/RoverCreateReportRequest","blank_report":"#/components/schemas/BlankReportCreateRequest"}},"title":"Report Request"}}}},"responses":{"201":{"description":"Report task created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportStatus"},"example":{"id":"11111111-1111-4111-8111-111111111111","status":"queued","last_update":1775649600,"params":{"language":"italian","currency":"EUR","color":"","prompt":"Analizza i pagamenti di oggi.","dataset_info":"","data_provenance":false}}}}},"402":{"description":"Plan limit reached for reports or prompt improvement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report could not be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"get":{"tags":["Reports"],"summary":"List Reports","description":"List reports for the current organization.\n\nIf `user_filter=true`, only reports created by the current user are returned.","operationId":"list_reports","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"user_filter","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"User Filter"}}],"responses":{"200":{"description":"Reports listed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReportsResponse"}}}},"500":{"description":"The report list could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Reports"],"summary":"Bulk Delete Reports","description":"Delete multiple reports by UUID.\n\nReturns the number of deleted reports and any IDs that could not be deleted.","operationId":"bulk_delete_reports","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteReportsRequest"}}}},"responses":{"200":{"description":"Bulk report deletion completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteReportsResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The reports could not be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/improve-prompt":{"post":{"tags":["Reports"],"summary":"Improve Prompt","description":"Improve a report prompt using AI before creating a report.","operationId":"improve_prompt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovePromptRequest"}}},"required":true},"responses":{"200":{"description":"Improved prompt returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovePromptResponse"}}}},"402":{"description":"Plan limit reached for prompt improvement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The prompt could not be improved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/reports/{task_id}":{"get":{"tags":["Reports"],"summary":"Get Report","description":"Retrieve a report task by ID.\n\nIf `format=embed` is provided, the endpoint returns an embedded URL instead of the report payload.","operationId":"get_report","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"}}],"responses":{"200":{"description":"Report returned successfully.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportStatus"},{"$ref":"#/components/schemas/EmbedResponse"}],"title":"Response Get Report V1 Reports  Task Id  Get"}}}},"404":{"description":"The requested report does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"delete":{"tags":["Reports"],"summary":"Delete Report","operationId":"delete_report","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Report not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report could not be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"put":{"tags":["Reports"],"summary":"Save Report Edit","operationId":"save_report","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveReportRequest"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Report not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report could not be saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/redo":{"post":{"tags":["Reports"],"summary":"Redo Report","description":"Create a new report task using the configuration of an existing report.\n\nThis can optionally resync compatible data sources before queueing the new report.","operationId":"redo_report","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RedoReportRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"New report task created from the original report configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportStatus"}}}},"400":{"description":"The report could not be redone with the requested options.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"402":{"description":"Plan limit reached for reports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"The requested report does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report could not be redone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/ai-section":{"post":{"tags":["Reports"],"summary":"Generate AI Section","description":"Generate a report section within the context of an existing report task.\n\nThis endpoint is designed to be used with a report task, not as a standalone assistant. A common flow is:\n- create a blank report with `POST /v1/reports/` and `params.blank=true`\n- call this endpoint one or more times to append AI-generated sections","operationId":"generate_ai_section","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAISectionRequest"}}}},"responses":{"200":{"description":"AI section generated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAISectionResponse"}}}},"402":{"description":"Plan limit reached for AI sections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"The requested report does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The AI section could not be generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/chat/history":{"get":{"tags":["Reports"],"summary":"Get Report Chat History","description":"Return the persisted chat history associated with a report task.","operationId":"get_report_chat_history","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Chat history returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportChatHistoryResponse"},"example":{"messages":[{"id":"msg-1","role":"user","content":"Spiegami meglio il picco di oggi.","timestamp":"2026-04-08T08:00:00+00:00"},{"id":"msg-2","role":"assistant","content":"Il picco è concentrato tra le 10:00 e le 12:00.","timestamp":"2026-04-08T08:00:02+00:00"}]}}}},"404":{"description":"The requested report does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The chat history could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"delete":{"tags":["Reports"],"summary":"Delete Report Chat History","description":"Delete the persisted chat history associated with a report task.","operationId":"delete_report_chat_history","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Chat history deleted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteReportChatHistoryResponse"}}}},"404":{"description":"The requested report does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The chat history could not be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/chat":{"post":{"tags":["Reports"],"summary":"Chat With Report Assistant","description":"Start a report-scoped assistant chat with streaming output.\n\nThe assistant uses report content as context and persists user/assistant messages on success.\nResponse media type is `text/event-stream` with incremental `data:` events, optional `event: error`, and final `event: chatComplete`.\n\nExample stream:\n```text\ndata: Primo chunk\n\ndata: Secondo chunk\n\nevent: chatComplete\ndata:\n\n```","operationId":"report_chat","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportChatRequest"}}}},"responses":{"200":{"description":"Streaming chat response (`text/event-stream`).","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"data: Primo chunk\\n\\ndata: Secondo chunk\\n\\nevent: chatComplete\\ndata: \\n\\n"}}},"400":{"description":"The chat message is missing or empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"402":{"description":"Plan limit reached for report chat.","content":{"application/json":{"example":{"error":{"detail":"Organization chat_messages limit reached."}},"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"The requested report does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"409":{"description":"The report is not ready for chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report chat could not be started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/title":{"patch":{"tags":["Reports"],"summary":"Rename Report","operationId":"rename_report","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTitleRequest"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Report not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report could not be renamed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/share":{"put":{"tags":["Reports"],"summary":"Update Report Sharing","operationId":"update_report_share","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportShareResponse"}}}},"403":{"description":"Public sharing is disabled for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"Report not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The sharing state could not be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"get":{"tags":["Reports"],"summary":"Get Report Sharing State","operationId":"get_report_share","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportShareResponse"}}}},"404":{"description":"Report not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The sharing state could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/events":{"get":{"tags":["Reports"],"summary":"Report Events Stream","description":"SSE stream that multiplexes status updates and AI thoughts.\n\n- `event: status` — `data: {status, progress}` on each poll\n- `event: thought` — `data: {message, type, icon, ...}` for each new thought\n- `event: done` — signals the stream has ended (task completed or failed)","operationId":"report_events","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"SSE stream (`text/event-stream`).","content":{"application/json":{"schema":{}},"text/event-stream":{}}},"404":{"description":"Report not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."}}}},"/v1/reports/{task_id}/export":{"get":{"tags":["Reports"],"summary":"Export Report","description":"Download the report as PDF (default) or PPTX.\n\nUse `?format=pdf` or `?format=pptx` query parameter.","operationId":"export_report","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"pdf","title":"Format"}}],"responses":{"200":{"description":"Binary file download.","content":{"application/json":{"schema":{}}}},"404":{"description":"Report not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The report could not be exported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/{task_id}/provenance/{provenance_id}":{"get":{"tags":["Reports"],"summary":"Get Provenance Record","operationId":"get_provenance","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"provenance_id","in":"path","required":true,"schema":{"type":"string","title":"Provenance Id"}}],"responses":{"200":{"description":"Provenance record.","content":{"application/json":{"schema":{"title":"Response Get Provenance V1 Reports  Task Id  Provenance  Provenance Id  Get"}}}},"404":{"description":"Provenance record not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The provenance record could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/reports/templates":{"get":{"tags":["Reports"],"summary":"List Report Templates","operationId":"list_templates","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Templates V1 Reports Templates Get"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"tags":["Reports"],"summary":"Create Report Template","operationId":"create_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptTemplate"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/reports/templates/{template_id}":{"delete":{"tags":["Reports"],"summary":"Delete Report Template","operationId":"delete_template","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"Template not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/dataset-info":{"get":{"tags":["Reports"],"summary":"List Dataset Info","operationId":"list_dataset_info","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Dataset Info V1 Reports Dataset Info Get"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"tags":["Reports"],"summary":"Create Dataset Info","operationId":"create_dataset_info","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetInfoRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetInfo"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/reports/dataset-info/{dataset_info_id}":{"delete":{"tags":["Reports"],"summary":"Delete Dataset Info","operationId":"delete_dataset_info","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"dataset_info_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Info Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"Dataset info not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organization":{"get":{"tags":["Organization"],"summary":"Get Organization","operationId":"get_organization","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/settings":{"get":{"tags":["Organization"],"summary":"Get Org Settings","operationId":"get_org_settings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSettingsResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"patch":{"tags":["Organization"],"summary":"Patch Org Settings","operationId":"patch_org_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSettingsPatchRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/settings/logo":{"post":{"tags":["Organization"],"summary":"Upload Org Logo","operationId":"upload_org_logo","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_org_logo_v1_organization_settings_logo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoUploadResponse"}}}},"400":{"description":"Invalid file type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"Admin required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"500":{"description":"Could not upload logo.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/users":{"get":{"tags":["Organization"],"summary":"List Org Users","operationId":"list_org_users","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrgUserResponse"},"type":"array","title":"Response List Org Users V1 Organization Users Get"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_USERS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/users/invite":{"post":{"tags":["Organization"],"summary":"Invite Org User","operationId":"invite_org_user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_USERS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"402":{"description":"Plan limit reached for users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/users/{user_id}":{"delete":{"tags":["Organization"],"summary":"Remove Org User","operationId":"remove_org_user","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_USERS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organization/api-keys":{"get":{"tags":["Organization"],"summary":"List Org Api Keys","operationId":"list_org_api_keys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Org Api Keys V1 Organization Api Keys Get"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_API_KEYS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"tags":["Organization"],"summary":"Create Org Api Key","operationId":"create_org_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_API_KEYS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/api-keys/{key_id}":{"delete":{"tags":["Organization"],"summary":"Delete Org Api Key","operationId":"delete_org_api_key","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_API_KEYS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organization/email-reports":{"get":{"tags":["Organization"],"summary":"Get Email Reports","operationId":"get_email_reports","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailReportsResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_USERS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"put":{"tags":["Organization"],"summary":"Update Email Reports","operationId":"update_email_reports","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailReportsRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_USERS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/email-reports/domains":{"post":{"tags":["Organization"],"summary":"Add Email Report Domain","operationId":"add_email_report_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDomainRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid domain format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_USERS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/organization/email-reports/domains/{domain}":{"delete":{"tags":["Organization"],"summary":"Remove Email Report Domain","operationId":"remove_email_report_domain","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"403":{"description":"MANAGE_USERS required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/google-ads/auth-url":{"get":{"tags":["Integrations"],"summary":"Google Ads Auth Url","operationId":"google_ads_auth_url","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthUrlResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/integrations/meta-ads/auth-url":{"get":{"tags":["Integrations"],"summary":"Meta Ads Auth Url","operationId":"meta_ads_auth_url","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthUrlResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/integrations/connections":{"get":{"tags":["Integrations"],"summary":"List Connections","operationId":"list_connections","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConnectionResponse"},"type":"array","title":"Response List Connections V1 Integrations Connections Get"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/integrations/google-ads/sync":{"post":{"tags":["Integrations"],"summary":"Sync Google Ads","operationId":"sync_google_ads","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAdsSyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"500":{"description":"Sync failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/integrations/meta-ads/sync":{"post":{"tags":["Integrations"],"summary":"Sync Meta Ads","operationId":"sync_meta_ads","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaAdsSyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"500":{"description":"Sync failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/integrations/meta-ads/accounts/{connection_id}":{"get":{"tags":["Integrations"],"summary":"List Meta Ads Accounts","operationId":"list_meta_ads_accounts","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Meta Ads Accounts V1 Integrations Meta Ads Accounts  Connection Id  Get"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"500":{"description":"Could not list ad accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/plans":{"get":{"tags":["Billing"],"summary":"List Plans","operationId":"list_plans","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanResponse"},"type":"array","title":"Response List Plans V1 Billing Plans Get"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"503":{"description":"Billing not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/billing/status":{"get":{"tags":["Billing"],"summary":"Get Billing Status","operationId":"get_billing_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create Checkout","operationId":"create_checkout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"503":{"description":"Billing not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/billing/portal":{"get":{"tags":["Billing"],"summary":"Get Billing Portal","operationId":"get_billing_portal","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"return_url","in":"query","required":true,"schema":{"type":"string","title":"Return Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}},"401":{"description":"Not authenticated or not a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"503":{"description":"Billing not configured or no billing customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/":{"get":{"tags":["Data Sources"],"summary":"List Sources","description":"List data sources for the current organization.\n\nOptional filters:\n- `source_id`: return a single source by UUID\n- `origin_id`: return all sources belonging to a single origin\n\nDo not provide both filters at the same time.","operationId":"list_data_sources","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}},{"name":"origin_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Id"}}],"responses":{"200":{"description":"Data sources listed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourcesList"}}}},"400":{"description":"Invalid filter combination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The data sources could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"delete":{"tags":["Data Sources"],"summary":"Delete Sources","description":"Delete multiple data sources by UUID.\n\nThe response includes both the number of deleted sources and any requested IDs that could not be deleted.","operationId":"delete_data_sources","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDataSourcesRequest"}}}},"responses":{"200":{"description":"Bulk source deletion completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDataSourcesResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The data sources could not be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/sources/{source_id}/preview":{"get":{"tags":["Data Sources"],"summary":"Preview Source","description":"Return a paginated preview of the rows contained in a data source.\n\n`page` and `page_size` must be greater than or equal to 1.","operationId":"preview_data_source_data","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10,"title":"Page Size"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Data source preview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewDataResponse"}}}},"404":{"description":"The requested data source does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The data source preview could not be generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/sources/{data_source_id}/sync":{"post":{"tags":["Data Sources"],"summary":"Sync Source","description":"Sync a data source by fetching fresh data from its upstream origin.\n\nOnly syncable data sources can be refreshed. File-based sources are not syncable.","operationId":"sync_data_source","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"data_source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Data Source Id"}}],"responses":{"200":{"description":"Data source synchronized successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncDataSourceResponse"}}}},"207":{"description":"Partial success - some data sources failed to sync.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncDataSourcePartialResponse"}}}},"404":{"description":"The requested data source does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"409":{"description":"The data source is not syncable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The data source could not be synchronized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/sources/{source_id}":{"patch":{"tags":["Data Sources"],"summary":"Update Source","description":"Partially update a data source and resync its data from the upstream origin.\n\nThe request body must include a `type` discriminator matching the source's origin type. At least one field besides `type` must be provided. After applying the changes, fresh data is fetched from the upstream endpoint.","operationId":"update_data_source","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceBody"}}}},"responses":{"200":{"description":"Data source updated and resynced successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSource"}}}},"400":{"description":"No update fields provided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"The requested data source does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"409":{"description":"The request body type does not match the source's origin type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The data source could not be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/sources/{source_id}/tags":{"put":{"tags":["Data Sources"],"summary":"Update Source Tags","description":"Replace the tags of a data source.","operationId":"update_source_tags","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceTagsRequest"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"The requested data source does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The tags could not be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/origins/":{"get":{"tags":["Data Origins"],"summary":"List Origins","description":"List data origins for the current organization, including nested data sources.\n\nUse `origin_id` to retrieve a single origin by UUID.","operationId":"list_origins","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"origin_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Id"}}],"responses":{"200":{"description":"Origins listed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataOriginsList"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The origins could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"delete":{"tags":["Data Origins"],"summary":"Delete Origins","description":"Delete multiple data origins by UUID.\n\nThe response includes both the number of deleted origins and any requested IDs that could not be deleted.","operationId":"delete_data_origins","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDataOriginsRequest"}}}},"responses":{"200":{"description":"Bulk origin deletion completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDataOriginsResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The data origins could not be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/origins/{origin_id}/sources":{"get":{"tags":["Data Origins"],"summary":"List Sources For Origin","description":"List the data sources that belong to a single data origin.","operationId":"list_origin_sources","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"origin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Origin Id"}}],"responses":{"200":{"description":"Sources for the origin listed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourcesList"}}}},"404":{"description":"The requested data origin does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The origin sources could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}},"post":{"tags":["Data Origins"],"summary":"Create Source For Origin","description":"Create a new data source under an existing origin and immediately sync its data.\n\nThe request body must include a `type` discriminator that matches the origin type. File-type origins do not support individual source creation — sources in a file origin represent worksheets inside the uploaded file.","operationId":"create_source_for_origin","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"origin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Origin Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSourceBody"}}}},"responses":{"201":{"description":"Data source created and synced successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSource"}}}},"400":{"description":"The upstream endpoint could not be reached or returned an error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"402":{"description":"Plan limit reached for data sources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"404":{"description":"The requested data origin does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"409":{"description":"The request body type does not match the origin type, or the origin type does not support source creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The data source could not be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}}}},"/v1/origins/file/":{"post":{"tags":["Data Origins"],"summary":"Create File Origin","description":"Create a file-based data origin and its derived data sources from one or more remote files.\n\nThis endpoint is commonly used as the first step in the flow:\n- `POST /v1/origins/file/`\n- `POST /v1/reports/`","operationId":"process_files","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessFilesRequest"}}},"required":true},"responses":{"201":{"description":"File origin processed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessFilesResponse"}}}},"400":{"description":"File content is not processable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"402":{"description":"Plan limit reached for data sources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"502":{"description":"The upstream file source is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"500":{"description":"The files could not be processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/origins/file/s3/params":{"get":{"tags":["Data Origins"],"summary":"Get Upload Params","operationId":"get_upload_params","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"filename","in":"query","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_UploadParamsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/origins/file/s3/multipart":{"post":{"tags":["Data Origins"],"summary":"Create Multipart Upload","operationId":"create_multipart_upload","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_CreateMultipartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_CreateMultipartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/origins/file/s3/multipart/{upload_id}/batch":{"get":{"tags":["Data Origins"],"summary":"Sign Parts Batch","operationId":"sign_parts_batch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}},{"name":"partNumbers","in":"query","required":true,"schema":{"type":"string","title":"Partnumbers"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_SignedBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/origins/file/s3/multipart/{upload_id}/{part_number}":{"get":{"tags":["Data Origins"],"summary":"Sign Part","operationId":"sign_part","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"part_number","in":"path","required":true,"schema":{"type":"integer","title":"Part Number"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_SignedPartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/origins/file/s3/multipart/{upload_id}":{"get":{"tags":["Data Origins"],"summary":"List Parts","operationId":"list_parts","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/_UploadPart"},"title":"Response List Parts V1 Origins File S3 Multipart  Upload Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Data Origins"],"summary":"Abort Multipart Upload","operationId":"abort_multipart_upload","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_AbortMultipartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/origins/file/s3/multipart/{upload_id}/complete":{"post":{"tags":["Data Origins"],"summary":"Complete Multipart Upload","operationId":"complete_multipart_upload","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_CompleteMultipartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_CompleteMultipartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/origins/data-api/":{"post":{"tags":["Data Origins"],"summary":"Create API Origin","description":"Create a data origin backed by an external data API.\n\nEach declared endpoint is ingested and converted into one or more data sources. Supported endpoint formats are JSON and CSV.\n\nTop-level `headers`, `api_key`, and `api_key_header` define the shared upstream request configuration for the origin. Each endpoint can also define its own `query_params` and `headers` to customize the request made to that specific upstream path.","operationId":"ingest_from_data_api","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFromDataAPIRequest"}}},"required":true},"responses":{"201":{"description":"API origin ingested successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFromDataAPIResponse"}}}},"400":{"description":"The upstream API is unavailable or returned an error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"402":{"description":"Plan limit reached for data sources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}},"422":{"description":"Invalid parameters were provided."},"500":{"description":"The API origin could not be ingested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"APIErrorPayload":{"properties":{"detail":{"type":"string","title":"Detail","description":"Public, sanitized error message."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Optional machine-readable error code for specific API flows."},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"Server-side request identifier for troubleshooting internal errors."}},"type":"object","required":["detail"],"title":"APIErrorPayload"},"APIErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/APIErrorPayload"}},"type":"object","required":["error"],"title":"APIErrorResponse"},"AddDomainRequest":{"properties":{"domain":{"type":"string","title":"Domain"}},"type":"object","required":["domain"],"title":"AddDomainRequest"},"Agent":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["id","name","icon","is_default"],"title":"Agent"},"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","name","created_at","last_used_at"],"title":"ApiKeyResponse"},"AuthUrlResponse":{"properties":{"auth_url":{"type":"string","title":"Auth Url"}},"type":"object","required":["auth_url"],"title":"AuthUrlResponse"},"BillingStatusResponse":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"plan_id":{"type":"string","title":"Plan Id"}},"type":"object","required":["status","plan_id"],"title":"BillingStatusResponse"},"BlankReportCreateRequest":{"properties":{"data_sources_ids":{"items":{"type":"string"},"type":"array","title":"Data Sources Ids","description":"UUIDs of the data sources used as context for the report."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the report."},"agent_id":{"type":"string","const":"blank_report","title":"Agent Id"},"params":{"$ref":"#/components/schemas/BlankReportParamsAPI"}},"type":"object","required":["data_sources_ids","agent_id","params"],"title":"BlankReportCreateRequest"},"BlankReportParamsAPI":{"properties":{"language":{"type":"string","title":"Language","description":"Report language (english, italian, german, dutch, french, spanish, portuguese, romanian, chinese, japanese)","default":"english"},"currency":{"type":"string","title":"Currency","description":"Currency code (USD, EUR, JPY, GBP, CNY, AUD, CAD, CHF, etc.)","default":"USD"},"color":{"type":"string","title":"Color","description":"Hex color code (e.g., #2871CC) or empty for AI to choose","default":""}},"type":"object","title":"BlankReportParamsAPI","description":"Parameters for Blank report generation."},"Body_upload_org_logo_v1_organization_settings_logo_post":{"properties":{"logo":{"type":"string","contentMediaType":"application/octet-stream","title":"Logo"}},"type":"object","required":["logo"],"title":"Body_upload_org_logo_v1_organization_settings_logo_post"},"BulkDeleteReportsRequest":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Ids","description":"UUIDs of the reports to delete."}},"type":"object","required":["ids"],"title":"BulkDeleteReportsRequest","example":{"ids":["a747294b-c1cf-4e97-a144-8d1136fef621"]}},"BulkDeleteReportsResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"failed_ids":{"items":{"type":"string"},"type":"array","title":"Failed Ids"}},"type":"object","required":["deleted_count","failed_ids"],"title":"BulkDeleteReportsResponse"},"CheckoutRequest":{"properties":{"price_id":{"type":"string","title":"Price Id"},"return_url":{"type":"string","title":"Return Url"}},"type":"object","required":["price_id","return_url"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["client_secret"],"title":"CheckoutResponse"},"CobaltoMarketingCreateReportRequest":{"properties":{"data_sources_ids":{"items":{"type":"string"},"type":"array","title":"Data Sources Ids","description":"UUIDs of the data sources used as context for the report."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the report."},"agent_id":{"type":"string","const":"cobalto_marketing_report","title":"Agent Id"},"params":{"$ref":"#/components/schemas/CobaltoMarketingReportParamsAPI"}},"type":"object","required":["data_sources_ids","agent_id","params"],"title":"CobaltoMarketingCreateReportRequest"},"CobaltoMarketingReportParamsAPI":{"properties":{"language":{"type":"string","title":"Language","description":"Report language (english, italian, german, dutch, french, spanish, portuguese, romanian, chinese, japanese)","default":"english"},"currency":{"type":"string","title":"Currency","description":"Currency code (USD, EUR, JPY, GBP, CNY, AUD, CAD, CHF, etc.)","default":"USD"},"color":{"type":"string","title":"Color","description":"Hex color code (e.g., #2871CC) or empty for AI to choose","default":""},"advertising_platform":{"type":"string","title":"Advertising Platform","description":"Advertising platform to analyse (e.g. google_ads, meta_ads)"},"comparison_type":{"type":"string","title":"Comparison Type","description":"Type of period comparison (e.g. wow, mom, yoy)"},"ai_insights_in_paragraphs":{"type":"boolean","title":"Ai Insights In Paragraphs","description":"Render AI insights as paragraphs instead of bullet lists","default":true},"ai_final_comment":{"type":"boolean","title":"Ai Final Comment","description":"Include an AI-generated final comment section","default":true},"include_section_intros":{"type":"boolean","title":"Include Section Intros","description":"Include introductory text before each report section","default":true}},"type":"object","required":["advertising_platform","comparison_type"],"title":"CobaltoMarketingReportParamsAPI","description":"Parameters for Cobalto marketing report generation."},"ConnectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"last_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Code"},"last_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Message"}},"type":"object","required":["id","provider","status","created_at"],"title":"ConnectionResponse"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateApiKeyRequest"},"CreateApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_value":{"type":"string","title":"Key Value"}},"type":"object","required":["id","name","key_value"],"title":"CreateApiKeyResponse"},"CreateApiSourceParams":{"properties":{"type":{"type":"string","const":"api","title":"Type","default":"api"},"path":{"type":"string","title":"Path","description":"Endpoint path relative to the origin base URL."},"format":{"type":"string","enum":["json","csv"],"title":"Format","description":"Expected response format."},"query_params":{"additionalProperties":true,"type":"object","title":"Query Params","description":"Query parameters sent to the upstream endpoint."},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Per-endpoint headers (merged with origin-level headers; these win on collision)."}},"type":"object","required":["path","format"],"title":"CreateApiSourceParams","description":"Parameters for creating a new source under an API-type origin.","example":{"format":"json","headers":{},"path":"/78vt-im2v.json","query_params":{"anno":2026,"limit":500},"type":"api"}},"CreateDatasetInfoRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_shared":{"type":"boolean","title":"Is Shared","default":false}},"type":"object","required":["name","description"],"title":"CreateDatasetInfoRequest"},"CreateOrganizationRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateOrganizationRequest"},"CreateOrganizationResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["id","name","slug"],"title":"CreateOrganizationResponse"},"CreateSourceBody":{"properties":{"display_name":{"type":"string","title":"Display Name","description":"Display name for the new data source."},"params":{"$ref":"#/components/schemas/CreateApiSourceParams"}},"type":"object","required":["display_name","params"],"title":"CreateSourceBody","example":{"display_name":"Pagamenti Q1","params":{"format":"json","headers":{},"path":"/78vt-im2v.json","query_params":{"anno":2026,"limit":500},"type":"api"}}},"CreateTemplateRequest":{"properties":{"name":{"type":"string","title":"Name"},"is_shared":{"type":"boolean","title":"Is Shared","default":false},"config":{"additionalProperties":{"type":"string"},"type":"object","title":"Config"}},"type":"object","required":["name","config"],"title":"CreateTemplateRequest"},"CustomCreateReportRequest":{"properties":{"data_sources_ids":{"items":{"type":"string"},"type":"array","title":"Data Sources Ids","description":"UUIDs of the data sources used as context for the report."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the report."},"agent_id":{"type":"string","const":"custom_report","title":"Agent Id","default":"custom_report"},"params":{"$ref":"#/components/schemas/CustomReportParamsAPI"},"improve_prompt":{"type":"boolean","title":"Improve Prompt","description":"If true, the backend may improve the prompt before running the report.","default":false}},"type":"object","required":["data_sources_ids","params"],"title":"CustomCreateReportRequest","examples":[{"agent_id":"custom_report","data_sources_ids":["815a2e34-3cde-4aa3-8879-f1ac6a75204e"],"improve_prompt":true,"params":{"color":"","currency":"EUR","data_provenance":false,"dataset_info":"","language":"italian","prompt":"Analizza i dati dei pagamenti di oggi e produci un report sintetico."}}]},"CustomReportParamsAPI":{"properties":{"language":{"type":"string","title":"Language","description":"Report language (english, italian, german, dutch, french, spanish, portuguese, romanian, chinese, japanese)","default":"english"},"currency":{"type":"string","title":"Currency","description":"Currency code (USD, EUR, JPY, GBP, CNY, AUD, CAD, CHF, etc.)","default":"USD"},"color":{"type":"string","title":"Color","description":"Hex color code (e.g., #2871CC) or empty for AI to choose","default":""},"prompt":{"type":"string","minLength":1,"title":"Prompt","description":"Natural language description of the report to generate","default":""},"dataset_info":{"type":"string","title":"Dataset Info","description":"Additional context about the dataset structure","default":""},"data_provenance":{"type":"boolean","title":"Data Provenance","description":"Include data source citations in the report","default":false}},"type":"object","title":"CustomReportParamsAPI","description":"Parameters for custom report generation."},"DataOrigin":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/DataOriginType"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"display_grouped":{"type":"boolean","title":"Display Grouped"},"data_sources":{"items":{"$ref":"#/components/schemas/DataSource"},"type":"array","title":"Data Sources","default":[]},"created_by":{"type":"string","title":"Created By"}},"type":"object","required":["id","name","type","config","display_grouped","created_by"],"title":"DataOrigin"},"DataOriginType":{"type":"string","enum":["mongodb","file","api","document"],"title":"DataOriginType"},"DataOriginsList":{"properties":{"data_origins":{"items":{"$ref":"#/components/schemas/DataOrigin"},"type":"array","title":"Data Origins"}},"type":"object","required":["data_origins"],"title":"DataOriginsList"},"DataSource":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"collection_name":{"type":"string","title":"Collection Name"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"schema":{"items":{"$ref":"#/components/schemas/DataSourceColumn"},"type":"array","title":"Schema"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["id","name","collection_name","metadata","schema"],"title":"DataSource"},"DataSourceColumn":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","type"],"title":"DataSourceColumn"},"DataSourcesList":{"properties":{"data_sources":{"items":{"$ref":"#/components/schemas/DataSource"},"type":"array","title":"Data Sources"}},"type":"object","required":["data_sources"],"title":"DataSourcesList"},"DatasetInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_shared":{"type":"boolean","title":"Is Shared"},"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["id","name","description","is_shared","user_id"],"title":"DatasetInfo"},"DeleteDataOriginsRequest":{"properties":{"ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Ids","description":"UUIDs of the data origins to delete."}},"type":"object","required":["ids"],"title":"DeleteDataOriginsRequest","example":{"ids":["a747294b-c1cf-4e97-a144-8d1136fef621"]}},"DeleteDataOriginsResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"failed_origins":{"items":{"type":"string"},"type":"array","title":"Failed Origins"}},"type":"object","required":["deleted_count","failed_origins"],"title":"DeleteDataOriginsResponse"},"DeleteDataSourcesRequest":{"properties":{"ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Ids","description":"UUIDs of the data sources to delete."}},"type":"object","required":["ids"],"title":"DeleteDataSourcesRequest","example":{"ids":["815a2e34-3cde-4aa3-8879-f1ac6a75204e"]}},"DeleteDataSourcesResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"failed_sources":{"items":{"type":"string"},"type":"array","title":"Failed Sources"}},"type":"object","required":["deleted_count","failed_sources"],"title":"DeleteDataSourcesResponse"},"DeleteReportChatHistoryResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"DeleteReportChatHistoryResponse"},"EmailReportsResponse":{"properties":{"data_source_ids":{"items":{"type":"string"},"type":"array","title":"Data Source Ids"},"verified_domains":{"items":{"type":"string"},"type":"array","title":"Verified Domains"}},"type":"object","required":["data_source_ids","verified_domains"],"title":"EmailReportsResponse"},"EmbedResponse":{"properties":{"embedded_url":{"type":"string","title":"Embedded Url"}},"type":"object","required":["embedded_url"],"title":"EmbedResponse"},"Endpoint":{"properties":{"display_name":{"type":"string","title":"Display Name","description":"Display name for the data source created from this upstream endpoint."},"path":{"type":"string","title":"Path","description":"Path appended to `base_url` when requesting the upstream endpoint."},"format":{"type":"string","enum":["json","csv"],"title":"Format","description":"Expected response format returned by the upstream endpoint."},"query_params":{"additionalProperties":true,"type":"object","title":"Query Params","description":"Optional query string parameters to send to this specific upstream endpoint. Use these to filter the upstream data before ingestion.","examples":[{"durata_ciclo_min":42,"giorno":"2026-04-01","id_macchina":"M-123"}]},"headers":{"additionalProperties":true,"type":"object","title":"Headers","description":"Optional headers to send only for this specific upstream endpoint. If the same header is also defined at origin level, this endpoint value wins.","examples":[{"Authorization":"Bearer endpoint-token","X-Plant":"Bergamo"}]}},"type":"object","required":["display_name","path","format"],"title":"Endpoint"},"ErroredDataSource":{"properties":{"id":{"type":"string","title":"Id"},"error":{"$ref":"#/components/schemas/APIErrorPayload"}},"type":"object","required":["id","error"],"title":"ErroredDataSource"},"FileInput":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"}},"type":"object","required":["name","url"],"title":"FileInput"},"GenerateAISectionRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"Instruction for the AI-generated section to add within the report context."}},"type":"object","required":["prompt"],"title":"GenerateAISectionRequest","example":{"prompt":"Analizza i pagamenti di oggi e crea una breve sezione con gli insight principali."}},"GenerateAISectionResponse":{"properties":{"blocks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Blocks"}},"type":"object","required":["blocks"],"title":"GenerateAISectionResponse"},"GoogleAdsSyncRequest":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"customer_id":{"type":"string","title":"Customer Id"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"compare_mode":{"type":"boolean","title":"Compare Mode","default":false},"compare_start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compare Start Date"},"compare_end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compare End Date"}},"type":"object","required":["connection_id","customer_id"],"title":"GoogleAdsSyncRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImprovePromptRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"The prompt to improve."},"data_sources_ids":{"items":{"type":"string"},"type":"array","title":"Data Sources Ids","description":"UUIDs of the data sources used as context for improvement."}},"type":"object","required":["prompt","data_sources_ids"],"title":"ImprovePromptRequest","example":{"data_sources_ids":["815a2e34-3cde-4aa3-8879-f1ac6a75204e"],"prompt":"Analizza i pagamenti di oggi."}},"ImprovePromptResponse":{"properties":{"improved_prompt":{"type":"string","title":"Improved Prompt"}},"type":"object","required":["improved_prompt"],"title":"ImprovePromptResponse"},"IngestFromDataAPIRequest":{"properties":{"display_name":{"type":"string","title":"Display Name","description":"Display name for the new data origin."},"base_url":{"type":"string","title":"Base Url","description":"Base URL of the upstream data API."},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Additional headers to send to the upstream API."},"api_key":{"type":"string","title":"Api Key","description":"API key used to access the upstream data API."},"api_key_header":{"type":"string","title":"Api Key Header","description":"Header name used to send the upstream API key.","default":"X-API-Key"},"endpoints":{"items":{"$ref":"#/components/schemas/Endpoint"},"type":"array","minItems":1,"title":"Endpoints","description":"Endpoints to ingest from the upstream API. Supported formats are `json` and `csv`."}},"type":"object","required":["display_name","base_url","api_key","endpoints"],"title":"IngestFromDataAPIRequest","example":{"api_key":"secret","api_key_header":"X-API-Key","base_url":"https://www.dati.lombardia.it/resource","display_name":"Lombardia Open Data","endpoints":[{"display_name":"Pagamenti","format":"json","headers":{"X-Tenant":"cliente-1"},"path":"/78vt-im2v.json","query_params":{"anno":2026,"limit":100}}],"headers":{}}},"IngestFromDataAPIResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"data_sources":{"items":{"$ref":"#/components/schemas/DataSource"},"type":"array","title":"Data Sources"}},"type":"object","required":["success","data_sources"],"title":"IngestFromDataAPIResponse"},"InvitationActionRequest":{"properties":{"accept":{"type":"boolean","title":"Accept"}},"type":"object","required":["accept"],"title":"InvitationActionRequest"},"InvitationResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"organization_name":{"type":"string","title":"Organization Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","organization_id","organization_name","role"],"title":"InvitationResponse"},"InviteUserRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"}},"type":"object","required":["email","role"],"title":"InviteUserRequest"},"ListAgentsResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/Agent"},"type":"array","title":"Agents"}},"type":"object","required":["agents"],"title":"ListAgentsResponse"},"ListReportsResponse":{"properties":{"reports":{"items":{"$ref":"#/components/schemas/ReportListItem"},"type":"array","title":"Reports"}},"type":"object","required":["reports"],"title":"ListReportsResponse"},"LogoUploadResponse":{"properties":{"logo_url":{"type":"string","title":"Logo Url"}},"type":"object","required":["logo_url"],"title":"LogoUploadResponse"},"MetaAdsSyncRequest":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"ad_account_id":{"type":"string","title":"Ad Account Id"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"compare_mode":{"type":"boolean","title":"Compare Mode","default":false},"compare_start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compare Start Date"},"compare_end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compare End Date"}},"type":"object","required":["connection_id","ad_account_id"],"title":"MetaAdsSyncRequest"},"OrgSettingsPatchRequest":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"glossary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glossary"}},"type":"object","title":"OrgSettingsPatchRequest"},"OrgSettingsResponse":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"glossary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glossary"}},"type":"object","required":["language","currency","logo_url","glossary"],"title":"OrgSettingsResponse"},"OrgUserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"invitation_pending":{"type":"boolean","title":"Invitation Pending"}},"type":"object","required":["id","email","role","invitation_pending"],"title":"OrgUserResponse"},"OrganizationBase":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"role":{"type":"string","title":"Role","default":"member"},"is_primary_owner":{"type":"boolean","title":"Is Primary Owner","default":false}},"type":"object","required":["id","name","slug"],"title":"OrganizationBase"},"OrganizationResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"role":{"type":"string","title":"Role"},"is_primary_owner":{"type":"boolean","title":"Is Primary Owner"},"plan_id":{"type":"string","title":"Plan Id"},"billing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Status"}},"type":"object","required":["id","name","slug","role","is_primary_owner","plan_id","billing_status"],"title":"OrganizationResponse"},"PlanResponse":{"properties":{"price_id":{"type":"string","title":"Price Id"},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"features":{"items":{"type":"string"},"type":"array","title":"Features"}},"type":"object","required":["price_id","amount","currency","interval","product_name","features"],"title":"PlanResponse"},"PortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalResponse"},"PreviewDataResponse":{"properties":{"last_page":{"type":"integer","title":"Last Page"},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"}},"type":"object","required":["last_page","data"],"title":"PreviewDataResponse"},"ProcessFilesRequest":{"properties":{"files":{"items":{"anyOf":[{"$ref":"#/components/schemas/FileInput"},{"$ref":"#/components/schemas/S3FileInput"}]},"type":"array","minItems":1,"title":"Files","description":"Files to ingest. The `name` should reflect the real file type, such as `.csv` or `.xlsx`. Use `FileInput` with a `url` for remote files, or `S3FileInput` with a `key` for files already uploaded to the app S3 bucket."}},"type":"object","required":["files"],"title":"ProcessFilesRequest","example":{"files":[{"name":"airtravel.csv","url":"https://people.sc.fsu.edu/~jburkardt/data/csv/airtravel.csv"}]}},"ProcessFilesResponse":{"properties":{"created_data_origins":{"items":{"$ref":"#/components/schemas/DataOrigin"},"type":"array","title":"Created Data Origins"},"unprocessed_files":{"items":{"type":"string"},"type":"array","title":"Unprocessed Files"}},"type":"object","required":["created_data_origins","unprocessed_files"],"title":"ProcessFilesResponse"},"PromptTemplate":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"agent_id":{"type":"string","title":"Agent Id"},"config":{"$ref":"#/components/schemas/PromptTemplateConfig"},"is_shared":{"type":"boolean","title":"Is Shared"},"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["id","name","agent_id","config","is_shared","user_id"],"title":"PromptTemplate"},"PromptTemplateConfig":{"properties":{"prompt":{"type":"string","title":"Prompt"},"color":{"type":"string","title":"Color","default":""},"currency":{"type":"string","title":"Currency","default":""},"language":{"type":"string","title":"Language","default":""}},"type":"object","required":["prompt"],"title":"PromptTemplateConfig"},"RedoReportRequest":{"properties":{"sync_data_sources":{"type":"boolean","title":"Sync Data Sources","default":true}},"type":"object","title":"RedoReportRequest"},"ReportChatHistoryResponse":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ReportChatMessage"},"type":"array","title":"Messages"}},"type":"object","required":["messages"],"title":"ReportChatHistoryResponse"},"ReportChatMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","title":"Content"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["id","role","content","timestamp"],"title":"ReportChatMessage"},"ReportChatRequest":{"properties":{"message":{"type":"string","title":"Message","description":"User message to the report-scoped AI assistant."}},"type":"object","required":["message"],"title":"ReportChatRequest","example":{"message":"Spiegami i punti principali del report e quali insight ritieni più importanti."}},"ReportListItem":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"time":{"type":"string","title":"Time"},"is_public":{"type":"boolean","title":"Is Public"},"status":{"$ref":"#/components/schemas/TaskStatus"}},"type":"object","required":["id","agent_id","title","time","is_public","status"],"title":"ReportListItem"},"ReportShareRequest":{"properties":{"is_public":{"type":"boolean","title":"Is Public"}},"type":"object","required":["is_public"],"title":"ReportShareRequest"},"ReportShareResponse":{"properties":{"is_public":{"type":"boolean","title":"Is Public"},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Url"}},"type":"object","required":["is_public","share_url"],"title":"ReportShareResponse"},"ReportStatus":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"status":{"$ref":"#/components/schemas/TaskStatus"},"last_update":{"type":"integer","title":"Last Update"},"data_source_ids":{"items":{"type":"string"},"type":"array","title":"Data Source Ids"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"result":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Result"},"decision_tree":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Decision Tree"}},"type":"object","required":["id","type","status","last_update","data_source_ids","params"],"title":"ReportStatus"},"ReportTitleRequest":{"properties":{"title":{"type":"string","title":"Title"}},"type":"object","required":["title"],"title":"ReportTitleRequest"},"ResearchCreateReportRequest":{"properties":{"data_sources_ids":{"items":{"type":"string"},"type":"array","title":"Data Sources Ids","description":"UUIDs of the data sources used as context for the report."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the report."},"agent_id":{"type":"string","const":"research_report","title":"Agent Id"},"params":{"$ref":"#/components/schemas/ResearchReportParamsAPI"},"improve_prompt":{"type":"boolean","title":"Improve Prompt","description":"If true, the backend may improve the prompt before running the report.","default":false}},"type":"object","required":["data_sources_ids","agent_id","params"],"title":"ResearchCreateReportRequest"},"ResearchReportParamsAPI":{"properties":{"language":{"type":"string","title":"Language","description":"Report language (english, italian, german, dutch, french, spanish, portuguese, romanian, chinese, japanese)","default":"english"},"currency":{"type":"string","title":"Currency","description":"Currency code (USD, EUR, JPY, GBP, CNY, AUD, CAD, CHF, etc.)","default":"USD"},"color":{"type":"string","title":"Color","description":"Hex color code (e.g., #2871CC) or empty for AI to choose","default":""},"prompt":{"type":"string","title":"Prompt","description":"Natural language description of the research topic"},"data_provenance":{"type":"boolean","title":"Data Provenance","description":"Include data source citations in the report","default":false}},"type":"object","required":["prompt"],"title":"ResearchReportParamsAPI","description":"Parameters for research report generation."},"RoverCreateReportRequest":{"properties":{"data_sources_ids":{"items":{"type":"string"},"type":"array","title":"Data Sources Ids","description":"UUIDs of the data sources used as context for the report."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the report."},"agent_id":{"type":"string","const":"rover_report","title":"Agent Id"},"params":{"$ref":"#/components/schemas/RoverParamsAPI"},"improve_prompt":{"type":"boolean","title":"Improve Prompt","description":"If true, the backend may improve the prompt before running the report.","default":false}},"type":"object","required":["data_sources_ids","agent_id","params"],"title":"RoverCreateReportRequest"},"RoverParamsAPI":{"properties":{"language":{"type":"string","title":"Language","description":"Report language (english, italian, german, dutch, french, spanish, portuguese, romanian, chinese, japanese)","default":"english"},"currency":{"type":"string","title":"Currency","description":"Currency code (USD, EUR, JPY, GBP, CNY, AUD, CAD, CHF, etc.)","default":"USD"},"color":{"type":"string","title":"Color","description":"Hex color code (e.g., #2871CC) or empty for AI to choose","default":""},"data_provenance":{"type":"boolean","title":"Data Provenance","description":"Include data source citations in the report","default":false},"target_sections":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Target Sections","description":"Target number of sections to generate","default":7}},"type":"object","title":"RoverParamsAPI","description":"Parameters for Rover report generation."},"S3FileInput":{"properties":{"name":{"type":"string","title":"Name"},"key":{"type":"string","title":"Key"}},"type":"object","required":["name","key"],"title":"S3FileInput"},"SaveReportRequest":{"properties":{"result":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Result"}},"type":"object","required":["result"],"title":"SaveReportRequest"},"SyncDataSourcePartialResponse":{"properties":{"data_sources":{"items":{"anyOf":[{"$ref":"#/components/schemas/DataSource"},{"$ref":"#/components/schemas/ErroredDataSource"}]},"type":"array","title":"Data Sources"}},"type":"object","required":["data_sources"],"title":"SyncDataSourcePartialResponse"},"SyncDataSourceResponse":{"properties":{"data_sources":{"items":{"$ref":"#/components/schemas/DataSource"},"type":"array","title":"Data Sources"}},"type":"object","required":["data_sources"],"title":"SyncDataSourceResponse"},"SyncResponse":{"properties":{"data_origin_id":{"type":"string","title":"Data Origin Id"},"has_data":{"type":"boolean","title":"Has Data"}},"type":"object","required":["data_origin_id","has_data"],"title":"SyncResponse"},"TaskStatus":{"type":"string","enum":["queued","running","completed","failed"],"title":"TaskStatus"},"UpdateApiSourceParams":{"properties":{"type":{"type":"string","const":"api","title":"Type","default":"api"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"New endpoint path relative to the origin base URL."},"format":{"anyOf":[{"type":"string","enum":["json","csv"]},{"type":"null"}],"title":"Format","description":"New response format."},"query_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query Params","description":"Replacement query parameters."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Replacement per-endpoint headers."}},"type":"object","title":"UpdateApiSourceParams","example":{"path":"/78vt-im2v.json","query_params":{"anno":2026,"limit":1000},"type":"api"}},"UpdateEmailReportsRequest":{"properties":{"data_source_ids":{"items":{"type":"string"},"type":"array","title":"Data Source Ids"}},"type":"object","required":["data_source_ids"],"title":"UpdateEmailReportsRequest"},"UpdateSourceBody":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"New display name."},"params":{"$ref":"#/components/schemas/UpdateApiSourceParams"}},"type":"object","required":["params"],"title":"UpdateSourceBody","example":{"display_name":"2026","params":{"path":"/78vt-im2v.json","query_params":{"anno":2026,"limit":1000},"type":"api"}}},"UpdateSourceTagsRequest":{"properties":{"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["tags"],"title":"UpdateSourceTagsRequest"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"}},"type":"object","required":["id","email"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"_AbortMultipartResponse":{"properties":{},"type":"object","title":"_AbortMultipartResponse"},"_CompleteMultipartRequest":{"properties":{"parts":{"items":{"$ref":"#/components/schemas/_PartCompletion"},"type":"array","title":"Parts"}},"type":"object","required":["parts"],"title":"_CompleteMultipartRequest"},"_CompleteMultipartResponse":{"properties":{"location":{"type":"string","title":"Location"},"key":{"type":"string","title":"Key"},"bucket":{"type":"string","title":"Bucket"}},"type":"object","required":["location","key","bucket"],"title":"_CompleteMultipartResponse"},"_CreateMultipartRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"type":{"type":"string","title":"Type"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"}},"type":"object","required":["filename","type"],"title":"_CreateMultipartRequest"},"_CreateMultipartResponse":{"properties":{"key":{"type":"string","title":"Key"},"uploadId":{"type":"string","title":"Uploadid"},"bucket":{"type":"string","title":"Bucket"}},"type":"object","required":["key","uploadId","bucket"],"title":"_CreateMultipartResponse"},"_PartCompletion":{"properties":{"PartNumber":{"type":"integer","title":"Partnumber"},"ETag":{"type":"string","title":"Etag"}},"type":"object","required":["PartNumber","ETag"],"title":"_PartCompletion"},"_SignedBatchResponse":{"properties":{"presignedUrls":{"additionalProperties":{"type":"string"},"type":"object","title":"Presignedurls"}},"type":"object","required":["presignedUrls"],"title":"_SignedBatchResponse"},"_SignedPartResponse":{"properties":{"url":{"type":"string","title":"Url"},"expires":{"type":"string","format":"date-time","title":"Expires"}},"type":"object","required":["url","expires"],"title":"_SignedPartResponse"},"_UploadParamsResponse":{"properties":{"method":{"type":"string","title":"Method","default":"post"},"url":{"type":"string","title":"Url"},"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields"},"expires":{"type":"integer","title":"Expires"}},"type":"object","required":["url","fields","expires"],"title":"_UploadParamsResponse"},"_UploadPart":{"properties":{"PartNumber":{"type":"integer","title":"Partnumber"},"ETag":{"type":"string","title":"Etag"},"Size":{"type":"integer","title":"Size"}},"type":"object","required":["PartNumber","ETag","Size"],"title":"_UploadPart"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"tags":[{"name":"Reports","description":"Create reports, inspect report status and content, generate AI sections, redo reports, and interact with report-scoped chat."},{"name":"Data Origins","description":"Manage data origins, which are the top-level containers for one or more data sources. Typical examples are file uploads and external data APIs."},{"name":"Data Sources","description":"Manage the actual analyzable datasets derived from origins. Supports listing, previewing, syncing compatible sources, and bulk deletion."}],"servers":[{"url":"/api"}]}