{"openapi":"3.1.0","info":{"title":"SPSS InsightGenius API","description":"**SPSS InsightGenius API** — REST API for processing SPSS (.sav) files.\n\nPowered by QuantipyMRX for market research analysis: crosstabs with significance testing, auto-detection of question types, NPS, Top/Bottom Box, nets, and AI-powered Reporting Ticket parsing via Claude Haiku.\n\n## Authentication\nAll endpoints require `Authorization: Bearer sk_live_...` or `sk_test_...`\n\n## Rate Limits\n| Plan | Requests/min | Max file size |\n|------|-------------|---------------|\n| Free (sk_test_) | 10 | 5 MB |\n| Pro | 60 | 50 MB |\n| Business | 200 | 200 MB |\n","version":"1.0.0"},"paths":{"/v1/health":{"get":{"tags":["System"],"summary":"Health","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/usage":{"get":{"tags":["System","System"],"summary":"Usage stats (since last deploy)","description":"Returns per-key usage counters since last deploy.\nRequires authentication. Each key only sees its own stats.","operationId":"usage_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/metadata":{"post":{"tags":["Metadata"],"summary":"Extract SPSS file metadata","description":"Returns variable names, labels, types, value labels, and auto-detected question types. No analysis is performed. Optionally accepts label_overrides JSON to substitute broken/missing value labels.","operationId":"metadata_v1_metadata_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_metadata_v1_metadata_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/frequency":{"post":{"tags":["Analysis"],"summary":"Frequency table","description":"Calculate frequency distribution for a single variable, optionally weighted.","operationId":"frequency_v1_frequency_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_frequency_v1_frequency_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/crosstab":{"post":{"tags":["Analysis"],"summary":"Crosstab with significance","description":"Cross-tabulation with column proportion z-test significance letters (A/B/C notation).","operationId":"crosstab_v1_crosstab_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_crosstab_v1_crosstab_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/convert":{"post":{"tags":["Conversion"],"summary":"Convert SPSS to other formats","description":"Convert .sav file to xlsx, csv, dta (Stata), or parquet format.","operationId":"convert_v1_convert_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_convert_v1_convert_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/parse-ticket":{"post":{"tags":["Deprecated"],"summary":"DEPRECATED — use /v1/agent/parse-ticket","operationId":"parse_ticket_deprecated_v1_parse_ticket_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_ticket_deprecated_v1_parse_ticket_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/v1/process":{"post":{"tags":["Processing"],"summary":"Full processing pipeline","description":"Upload a .sav file with optional Reporting Ticket or manual operations spec. Returns metadata + all analysis results.","operationId":"process_v1_process_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_v1_process_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tabulate":{"post":{"tags":["Processing"],"summary":"Full tabulation → Excel","description":"Upload a .sav file, specify a banner variable (demographic) and stub variables (questions to analyze), and receive a professional Excel workbook with:\n\n- One sheet per stub variable\n- Crosstab with column percentages\n- Significance letters (A/B/C notation)\n- Column bases (N)\n- Optional nets (Top 2 Box, Bottom 2 Box, etc.)\n- Summary sheet with column legend and stub index\n\n**Example spec:**\n```json\n{\n  \"banner\": \"Q_4\",\n  \"stubs\": [\"Q_2\", \"Q_3\", \"Q_5\"],\n  \"significance_level\": 0.95,\n  \"weight\": \"WEIGHT1\",\n  \"nets\": {\"Q_2\": {\"Top 2 Box\": [5, 6], \"Bottom 2 Box\": [1, 2]}},\n  \"title\": \"Customer Satisfaction Study 2026\"\n}\n```\n\nSet `stubs` to `[\"_all_\"]` to auto-select all variables with value labels.","operationId":"tabulate_v1_tabulate_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_tabulate_v1_tabulate_post"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/preparation/inspect":{"post":{"tags":["Processing"],"summary":"Read bounded aggregate evidence for study preparation","operationId":"inspect_preparation_v1_preparation_inspect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_inspect_preparation_v1_preparation_inspect_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/preparation/preview":{"post":{"tags":["Processing"],"summary":"Validate a preparation against a SAV without changing it","operationId":"preview_preparation_v1_preparation_preview_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_preparation_v1_preparation_preview_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/correlation":{"post":{"tags":["Analysis"],"summary":"Correlation matrix","description":"Calculate correlation matrix between 2+ numeric variables with p-values and significance flags.","operationId":"correlation_v1_correlation_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_correlation_v1_correlation_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/anova":{"post":{"tags":["Analysis"],"summary":"One-way ANOVA","description":"Test if means of a numeric variable differ across groups, with optional Tukey HSD post-hoc comparisons.","operationId":"anova_v1_anova_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_anova_v1_anova_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gap-analysis":{"post":{"tags":["Analysis"],"summary":"Importance-Performance gap analysis","description":"Analyze gaps between paired importance and performance variables. Returns gaps, priorities, and quadrant assignments.","operationId":"gap_analysis_endpoint_v1_gap_analysis_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_gap_analysis_endpoint_v1_gap_analysis_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/satisfaction-summary":{"post":{"tags":["Analysis"],"summary":"Satisfaction summary","description":"Compact summary of T2B%, B2B%, Mean, and distribution for multiple scale variables in one call.","operationId":"satisfaction_summary_endpoint_v1_satisfaction_summary_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_satisfaction_summary_endpoint_v1_satisfaction_summary_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auto-analyze":{"post":{"tags":["Processing"],"summary":"Zero-config auto analysis","description":"Upload a .sav file and get a complete Excel workbook with auto-detected banners, stubs, nets, MRS groups, and significance testing. No configuration needed.","operationId":"auto_analyze_v1_auto_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_auto_analyze_v1_auto_analyze_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/upload":{"post":{"tags":["Files"],"summary":"Upload file for MCP session","description":"Upload a .sav, .csv, .tsv, or .xlsx file via multipart/form-data. Returns a `file_id` valid for 30 minutes that can be used with any MCP tool or API endpoint. Designed for Claude.ai integration where base64 encoding exceeds token limits.","operationId":"upload_file_v1_files_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_v1_files_upload_post"}}},"required":true},"responses":{"200":{"description":"File uploaded, session created","content":{"application/json":{"schema":{}}}},"401":{"description":"Invalid or missing API key"},"413":{"description":"File exceeds plan size limit"},"415":{"description":"Unsupported file format"},"422":{"description":"File is corrupted or unreadable"}}}},"/v1/weight/preview":{"post":{"tags":["Weighting"],"summary":"Preview variable distribution for weighting","description":"Show current distribution of a variable — use this to decide target percentages.\n\nReturns counts and percentages per value, with labels from SPSS metadata.","operationId":"weight_preview_v1_weight_preview_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_weight_preview_v1_weight_preview_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/weight/compute":{"post":{"tags":["Weighting"],"summary":"Compute RIM weight from target distributions","description":"Compute a RIM weight (iterative proportional fitting).\n\nTargets is a JSON array:\n```json\n[\n  {\"variable\": \"CLA_EDAD\", \"targets\": {\"1\": 33.3, \"2\": 33.3, \"3\": 33.4}},\n  {\"variable\": \"F1\", \"targets\": {\"1\": 50.0, \"2\": 50.0}}\n]\n```\n\nEach variable's targets must sum to ~100%.\nReturns weight statistics, convergence info, and before/after distributions.","operationId":"weight_compute_v1_weight_compute_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_weight_compute_v1_weight_compute_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat":{"post":{"tags":["Deprecated"],"summary":"DEPRECATED — use /v1/agent/chat","description":"All accepts so old callers don't 422; we ignore params and return 410.","operationId":"chat_deprecated_v1_chat_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_chat_deprecated_v1_chat_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/v1/chat/classify":{"post":{"tags":["Chat"],"summary":"Conversational classification override","description":"Natural-language override for semantic types.\n\nIntents supported: list, override, batch, reset, help. Overrides persist\nin Redis for 30 minutes (aligned with file session).","operationId":"chat_classify_v1_chat_classify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatClassifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/export/powerbi":{"post":{"tags":["Export"],"summary":"Export SPSS data as a PowerBI-ready ZIP package","description":"Returns a ZIP containing data CSV, metadata CSVs, per-semantic-type DAX measures (binary / ordinal / interval / NPS), and a README with import instructions. Drives measure generation off the Phase 1 semantic classifier; any Phase 3 chat overrides on the same `file_id` are honored.","operationId":"export_powerbi_v1_export_powerbi_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_export_powerbi_v1_export_powerbi_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat-stream":{"post":{"tags":["Deprecated"],"summary":"DEPRECATED — use /v1/agent/chat","description":"All accepts so old callers don't 422; we ignore params and return 410.","operationId":"chat_stream_deprecated_v1_chat_stream_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_chat_stream_deprecated_v1_chat_stream_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/v1/wave-compare":{"post":{"tags":["Analysis"],"summary":"Compare two waves of the same study","description":"Upload two .sav files from the same study (different time periods) and get deltas with significance testing.","operationId":"wave_compare_v1_wave_compare_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_wave_compare_v1_wave_compare_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys":{"get":{"tags":["Keys"],"summary":"List your API keys","description":"List all API keys for the authenticated user. Raw keys are NOT returned.","operationId":"list_keys_v1_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Keys"],"summary":"Create a new API key","description":"Create a new API key for the authenticated user.\n\nReturns the raw key ONCE — it cannot be retrieved later.\nThe key is stored as a SHA256 hash in Supabase.","operationId":"create_key_v1_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}":{"delete":{"tags":["Keys"],"summary":"Revoke an API key","description":"Revoke (deactivate) an API key. The key will no longer work.","operationId":"revoke_key_v1_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys":{"get":{"tags":["API Keys (platform)"],"summary":"List Keys","operationId":"list_keys_v1_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["API Keys (platform)"],"summary":"Create Key","operationId":"create_key_v1_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{key_id}/deactivate":{"patch":{"tags":["API Keys (platform)"],"summary":"Deactivate Key","operationId":"deactivate_key_v1_api_keys__key_id__deactivate_patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{key_id}":{"delete":{"tags":["API Keys (platform)"],"summary":"Delete Key","operationId":"delete_key_v1_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/smart-spec":{"post":{"tags":["Deprecated"],"summary":"DEPRECATED — use /v1/agent/smart-spec","description":"All accepts so old callers don't 422; we ignore params and return 410.","operationId":"smart_spec_deprecated_v1_smart_spec_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_smart_spec_deprecated_v1_smart_spec_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/v1/library/upload":{"post":{"tags":["Library"],"summary":"Upload file to persistent library","description":"Upload a file to the persistent library. Returns library_id + file_id (Redis session).","operationId":"library_upload_v1_library_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_library_upload_v1_library_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/files":{"get":{"tags":["Library"],"summary":"List all files in library","description":"List all files for the authenticated user. Returns empty list if library is not configured.","operationId":"library_list_v1_library_files_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/{library_id}":{"get":{"tags":["Library"],"summary":"Get file metadata","description":"Get metadata for a specific library file. Only accessible by the file owner.","operationId":"library_get_v1_library__library_id__get","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Library"],"summary":"Update file metadata","operationId":"library_update_v1_library__library_id__patch","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_library_update_v1_library__library_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Library"],"summary":"Delete file from library","operationId":"library_delete_v1_library__library_id__delete","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/{library_id}/variables":{"get":{"tags":["Library"],"summary":"Get file variables","operationId":"library_variables_v1_library__library_id__variables_get","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/{library_id}/load":{"post":{"tags":["Library"],"summary":"Load library file into active session","operationId":"library_load_v1_library__library_id__load_post","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/search/files":{"get":{"tags":["Library"],"summary":"Search across library","description":"Search files and variables by keyword. Only searches authenticated user's files.","operationId":"library_search_v1_library_search_files_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"tags":["Jobs"],"summary":"Get async job status","operationId":"get_job_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List Projects Endpoint","description":"List all projects for the authenticated user.","operationId":"list_projects_endpoint_v1_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Projects"],"summary":"Create Project Endpoint","description":"Create a new project.","operationId":"create_project_endpoint_v1_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project Endpoint","description":"Get project details with files and metadata.","operationId":"get_project_endpoint_v1_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Update Project Endpoint","description":"Update project fields.","operationId":"update_project_endpoint_v1_projects__project_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project Endpoint","description":"Delete a project and all related data.","operationId":"delete_project_endpoint_v1_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/files/upload":{"post":{"tags":["Projects"],"summary":"Upload File Endpoint","description":"Upload a data file to a project.\n\nSPSS (.sav) only — CSV/Excel are rejected with 415 (see the\ndetected_type guard below): they have no metadata-extraction path, so\naccepting them would leave the project stuck in PROCESSING forever.\nAutomatically extracts metadata from SPSS files.","operationId":"upload_file_endpoint_v1_projects__project_id__files_upload_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override file type detection","title":"File Type"},"description":"Override file type detection"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_endpoint_v1_projects__project_id__files_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/files":{"get":{"tags":["Projects"],"summary":"List Files Endpoint","description":"List files in a project.","operationId":"list_files_endpoint_v1_projects__project_id__files_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/files/{file_id}":{"delete":{"tags":["Projects"],"summary":"Delete File Endpoint","description":"Delete a file from a project.","operationId":"delete_file_endpoint_v1_projects__project_id__files__file_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/reprocess":{"post":{"tags":["Projects"],"summary":"Reprocess Project","description":"Reset a project stuck in `error` so the user can retry the upload.\n\nThe SPA calls this from the error-recovery banner and then navigates to\nthe upload page — no re-ingestion happens here.","operationId":"reprocess_project_v1_projects__project_id__reprocess_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/conversations":{"post":{"tags":["Conversations"],"summary":"Create Conversation","description":"Create a new conversation in a project.","operationId":"create_conversation_v1_projects__project_id__conversations_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate","default":{"title":"New conversation"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Conversations"],"summary":"List Conversations","description":"List conversations in a project.","operationId":"list_conversations_v1_projects__project_id__conversations_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}":{"get":{"tags":["Conversations"],"summary":"Get Conversation","description":"Get a conversation with all messages.","operationId":"get_conversation_v1_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Conversations"],"summary":"Delete Conversation","description":"Delete a conversation.","operationId":"delete_conversation_v1_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/messages/{message_id}/export/excel":{"post":{"tags":["Conversations"],"summary":"Export Message Excel","description":"Export an assistant message's analyses as .xlsx (chat toolbar button).","operationId":"export_message_excel_v1_conversations_messages__message_id__export_excel_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/query":{"post":{"tags":["Conversations"],"summary":"Query Conversation","description":"Execute a natural language query against the project's data.\n\nPipeline:\n1. Load conversation + project\n2. Check cache\n3. Interpret question (Claude → analysis plan)\n4. Execute analyses (quantipy_engine)\n5. Build response (NL + charts)\n6. Persist messages\n7. Return QueryResponse","operationId":"query_conversation_v1_conversations__conversation_id__query_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/suggestions":{"get":{"tags":["Conversations"],"summary":"Get Suggestions","description":"Get context-aware analysis suggestions for the conversation's project.","operationId":"get_suggestions_v1_conversations__conversation_id__suggestions_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","description":"Language: en or es","default":"en","title":"Lang"},"description":"Language: en or es"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/rules":{"post":{"tags":["Data Prep"],"summary":"Create Rule","operationId":"create_rule_v1_projects__project_id__data_prep_rules_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPrepRuleCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Data Prep"],"summary":"List Rules","operationId":"list_rules_v1_projects__project_id__data_prep_rules_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/summary":{"get":{"tags":["Data Prep"],"summary":"Data Prep Summary","operationId":"data_prep_summary_v1_projects__project_id__data_prep_summary_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/variable-profiles":{"get":{"tags":["Data Prep"],"summary":"Variable Profiles","operationId":"variable_profiles_v1_projects__project_id__data_prep_variable_profiles_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/qc-report":{"get":{"tags":["Data Prep"],"summary":"Qc Report","operationId":"qc_report_v1_projects__project_id__data_prep_qc_report_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/suggestions":{"get":{"tags":["Data Prep"],"summary":"Prep Suggestions","operationId":"prep_suggestions_v1_projects__project_id__data_prep_suggestions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"study_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Study Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/export-excel":{"get":{"tags":["Data Prep"],"summary":"Export Data Excel","description":"Download the (raw or prepared) data table as .xlsx.\n\nlabel_format: value | label | both — mirrors the Browse table's dropdown.","operationId":"export_data_excel_v1_projects__project_id__data_prep_export_excel_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"prepared","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Prepared"}},{"name":"label_format","in":"query","required":false,"schema":{"type":"string","default":"value","title":"Label Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/data-rows":{"get":{"tags":["Data Prep"],"summary":"Data Rows","description":"Paginated data rows + column metadata for the Browse / Data Explorer.\n\n`prepared=false` (default) returns the raw uploaded data — the Explorer's\njob is to show what was uploaded. `prepared=true` returns the data with the\nproject's active Data Prep rules applied, and `is_prepared` + `prep_warnings`\nreflect reality.","operationId":"data_rows_v1_projects__project_id__data_prep_data_rows_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"prepared","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Prepared"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/column-distribution/{column_name}":{"get":{"tags":["Data Prep"],"summary":"Column Distribution","description":"Value distribution (count + %) for a single column, with value labels.","operationId":"column_distribution_v1_projects__project_id__data_prep_column_distribution__column_name__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"column_name","in":"path","required":true,"schema":{"type":"string","title":"Column Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/apply-suggestions":{"post":{"tags":["Data Prep"],"summary":"Apply Suggestions","description":"Create data-prep rules from selected suggestion ids. Suggestions are\ndeterministic, so we regenerate them and match by id.","operationId":"apply_suggestions_v1_projects__project_id__data_prep_apply_suggestions_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/apply-template":{"post":{"tags":["Data Prep"],"summary":"Apply Template","description":"Apply a built-in template: generate net rules from the project's ordinal\nscales and persist them as data-prep rules.","operationId":"apply_template_v1_projects__project_id__data_prep_apply_template_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/import-tabspec":{"post":{"tags":["Data Prep"],"summary":"Import Tabspec","description":"Parse an uploaded .xlsx of rule rows into reviewable rule previews.","operationId":"import_tabspec_v1_projects__project_id__data_prep_import_tabspec_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_tabspec_v1_projects__project_id__data_prep_import_tabspec_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/apply-tabspec":{"post":{"tags":["Data Prep"],"summary":"Apply Tabspec","description":"Persist the reviewed rules from a parsed TabSpec as data-prep rules.","operationId":"apply_tabspec_v1_projects__project_id__data_prep_apply_tabspec_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/rules/{rule_id}":{"put":{"tags":["Data Prep"],"summary":"Update Rule","operationId":"update_rule_v1_projects__project_id__data_prep_rules__rule_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPrepRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Data Prep"],"summary":"Delete Rule","operationId":"delete_rule_v1_projects__project_id__data_prep_rules__rule_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/reorder":{"put":{"tags":["Data Prep"],"summary":"Reorder Rules","operationId":"reorder_rules_v1_projects__project_id__data_prep_reorder_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/preview":{"post":{"tags":["Data Prep"],"summary":"Preview Rule Endpoint","description":"Preview the impact of a rule without saving it.","operationId":"preview_rule_endpoint_v1_projects__project_id__data_prep_preview_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/ai-interpret":{"post":{"tags":["Data Prep"],"summary":"Ai Interpret","description":"NL → data-prep rule proposal (the Data Prep AI input box).","operationId":"ai_interpret_v1_projects__project_id__data_prep_ai_interpret_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIInterpretRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/data-prep/templates":{"get":{"tags":["Data Prep"],"summary":"List Data Prep Templates","description":"List built-in data-prep templates (project-agnostic catalog).","operationId":"list_data_prep_templates_v1_data_prep_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/projects/{project_id}/variable-groups":{"post":{"tags":["Variable Groups"],"summary":"Create Group","operationId":"create_group_v1_projects__project_id__variable_groups_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableGroupCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Variable Groups"],"summary":"List Groups","operationId":"list_groups_v1_projects__project_id__variable_groups_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/variable-groups/{group_id}":{"put":{"tags":["Variable Groups"],"summary":"Update Group","operationId":"update_group_v1_projects__project_id__variable_groups__group_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Variable Groups"],"summary":"Delete Group","operationId":"delete_group_v1_projects__project_id__variable_groups__group_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/variable-groups/auto-detect":{"post":{"tags":["Variable Groups"],"summary":"Auto Detect Groups","description":"Auto-detect variable groups (MRS, grids) using QuantipyMRX.","operationId":"auto_detect_groups_v1_projects__project_id__variable_groups_auto_detect_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/waves":{"post":{"tags":["Waves"],"summary":"Create Wave","operationId":"create_wave_v1_projects__project_id__waves_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaveCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Waves"],"summary":"List Waves","operationId":"list_waves_v1_projects__project_id__waves_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/waves/{wave_id}":{"put":{"tags":["Waves"],"summary":"Update Wave","operationId":"update_wave_v1_projects__project_id__waves__wave_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"wave_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Wave Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaveUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Waves"],"summary":"Delete Wave","operationId":"delete_wave_v1_projects__project_id__waves__wave_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"wave_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Wave Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/waves/compare":{"post":{"tags":["Waves"],"summary":"Compare Waves","description":"Compare a metric across waves — delegates to existing wave_comparison service.","operationId":"compare_waves_v1_projects__project_id__waves_compare_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaveCompareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/explore/variables":{"get":{"tags":["Explore"],"summary":"List Variables","description":"List available variables for the variable picker.","operationId":"list_variables_v1_projects__project_id__explore_variables_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/explore/run":{"post":{"tags":["Explore"],"summary":"Run Analysis","description":"Run a single analysis (no AI — direct execution via quantipy_engine).","operationId":"run_analysis_v1_projects__project_id__explore_run_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExploreRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/explore/export":{"post":{"tags":["Explore"],"summary":"Export Analysis","description":"Run one analysis and stream it as .xlsx (the Explore panel's Export button).","operationId":"export_analysis_v1_projects__project_id__explore_export_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExploreRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/explore/bookmarks":{"post":{"tags":["Explore"],"summary":"Create Bookmark","operationId":"create_bookmark_v1_projects__project_id__explore_bookmarks_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Explore"],"summary":"List Bookmarks","operationId":"list_bookmarks_v1_projects__project_id__explore_bookmarks_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/explore/bookmarks/{bookmark_id}":{"delete":{"tags":["Explore"],"summary":"Delete Bookmark","operationId":"delete_bookmark_v1_projects__project_id__explore_bookmarks__bookmark_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/segments":{"post":{"tags":["Segments"],"summary":"Create Segment","operationId":"create_segment_v1_projects__project_id__segments_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Segments"],"summary":"List Segments","operationId":"list_segments_v1_projects__project_id__segments_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/segments/{segment_id}":{"put":{"tags":["Segments"],"summary":"Update Segment","operationId":"update_segment_v1_projects__project_id__segments__segment_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Segments"],"summary":"Delete Segment","operationId":"delete_segment_v1_projects__project_id__segments__segment_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Segment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/segments/preview":{"post":{"tags":["Segments"],"summary":"Preview Segment","description":"Preview how many rows match the segment conditions.","operationId":"preview_segment_v1_projects__project_id__segments_preview_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/metadata/overrides":{"get":{"tags":["Metadata"],"summary":"Get Overrides","description":"Full variable list with overrides applied — the SPA metadata panel contract.\n\nResponse: {variables: [{name, auto_label, label, is_overridden, type,\nauto_value_labels, value_labels, has_value_label_overrides, missing_values}],\ntotal, overridden_count} (useVariableMetadata.ts expects exactly this shape).","operationId":"get_overrides_v1_projects__project_id__metadata_overrides_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Metadata"],"summary":"Update Overrides","description":"Bulk update metadata overrides. Fully replaces the stored override dict.\n\nPayload shape:\n    {\n      \"variables\": {\n        \"income\":       {\"semantic_type\": \"nominal\"},\n        \"q5_recommend\": {\"label\": \"...\", \"semantic_type\": \"ordinal\"}\n      }\n    }\n\nInvalid `semantic_type` values are rejected with HTTP 422.","operationId":"update_overrides_v1_projects__project_id__metadata_overrides_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataOverridesPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/metadata/overrides/{var_name}":{"put":{"tags":["Metadata"],"summary":"Update Single Override","description":"Merge one variable's override without clobbering the rest (SPA rename/labels).","operationId":"update_single_override_v1_projects__project_id__metadata_overrides__var_name__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"var_name","in":"path","required":true,"schema":{"type":"string","title":"Var Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableOverride"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/metadata/import-codebook":{"post":{"tags":["Metadata"],"summary":"Import Codebook","description":"Bulk-import variable labels/value labels from an .xlsx/.csv codebook.","operationId":"import_codebook_v1_projects__project_id__metadata_import_codebook_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_codebook_v1_projects__project_id__metadata_import_codebook_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/metadata/dossier":{"get":{"tags":["Metadata"],"summary":"Get Dossier","description":"The semantic dossier for this project's dataset.\n\nOne entry per FAMILY, not per variable — that distinction is the point.\nConsumed by the SPA metadata panel and, from F3, by /export instead of\nits own `detectScaleVars()`.\n\nRead-only. Writing overrides already has a home in PUT /overrides;\nwiring the dossier into it is F3 work. `overrides` here are read from\n`user_metadata_overrides[\"families\"]` — a separate namespace from the\nper-variable overrides `PUT /overrides` writes to\n`user_metadata_overrides` directly, keyed by family key (or, for a\nsingleton family, by the variable name it holds — see `build_dossier`).","operationId":"get_dossier_v1_projects__project_id__metadata_dossier_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/tables/preview":{"post":{"tags":["Generate Tables"],"summary":"Preview Tables","description":"Dry-run: show plan without generating Excel.","operationId":"preview_tables_v1_projects__project_id__tables_preview_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTablesConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/tables/generate":{"post":{"tags":["Generate Tables"],"summary":"Generate Tables","description":"Execute tabulation and return structured JSON results.","operationId":"generate_tables_v1_projects__project_id__tables_generate_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTablesConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/tables/export":{"post":{"tags":["Generate Tables"],"summary":"Export Tables","description":"Execute tabulation and return Excel file.","operationId":"export_tables_v1_projects__project_id__tables_export_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTablesConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/tables/templates":{"post":{"tags":["Generate Tables"],"summary":"Create Template","operationId":"create_template_v1_projects__project_id__tables_templates_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableTemplateCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Generate Tables"],"summary":"List Templates","operationId":"list_templates_v1_projects__project_id__tables_templates_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/tables/templates/{template_id}":{"delete":{"tags":["Generate Tables"],"summary":"Delete Template","operationId":"delete_template_v1_projects__project_id__tables_templates__template_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/auto-analyze":{"post":{"tags":["Processing"],"summary":"Zero-config auto analysis for an existing project","description":"Runs the same auto-detect banner/stub/nets/MRS pipeline as /v1/auto-analyze, but on an already-uploaded project's data (with active Data Prep rules and weight applied). Returns a complete Excel workbook.","operationId":"project_auto_analyze_v1_projects__project_id__auto_analyze_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/exports":{"post":{"tags":["Exports"],"summary":"Create Export","description":"Create a new export job.","operationId":"create_export_v1_projects__project_id__exports_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Exports"],"summary":"List Exports","operationId":"list_exports_v1_projects__project_id__exports_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/exports/{export_id}":{"delete":{"tags":["Exports"],"summary":"Delete Export","description":"Delete an export record (the SPA's trash button on /exports).","operationId":"delete_export_v1_projects__project_id__exports__export_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/exports/banners":{"get":{"tags":["Exports"],"summary":"Get Banner Variables","description":"Get variables suitable as banners (categorical, 2-10 categories).","operationId":"get_banner_variables_v1_projects__project_id__exports_banners_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/exports/stubs":{"get":{"tags":["Exports"],"summary":"Get Analysis Variables","description":"Get all variables available as analysis stubs.","operationId":"get_analysis_variables_v1_projects__project_id__exports_stubs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/exports/banner-variables":{"get":{"tags":["Exports"],"summary":"Get Banner Variables Wizard","description":"Categorical variables (2-10 categories) suitable as banner columns.\n\nShape: {\"variables\": [{name, label, n_values, suggested}]}.","operationId":"get_banner_variables_wizard_v1_projects__project_id__exports_banner_variables_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/exports/analysis-variables":{"get":{"tags":["Exports"],"summary":"Get Analysis Variables Wizard","description":"All variables available as analysis rows (stubs).\n\nShape: {\"variables\": [{name, label, n_values, variable_type}]} where\nvariable_type ∈ single|multiple|scale|open.","operationId":"get_analysis_variables_wizard_v1_projects__project_id__exports_analysis_variables_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/reports/report-prompt":{"post":{"tags":["Reports"],"summary":"Report Prompt","description":"Assemble a copy-paste markdown prompt (study context + data + findings) for\nGamma / ChatGPT / Claude. Deterministic — no LLM, no analysis run here.","operationId":"report_prompt_v1_projects__project_id__reports_report_prompt_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPromptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/reports":{"post":{"tags":["Reports"],"summary":"Create Report","description":"Generate a multi-analysis report with AI narrative.","operationId":"create_report_v1_projects__project_id__reports_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Reports"],"summary":"List Reports","operationId":"list_reports_v1_projects__project_id__reports_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/reports/{report_id}":{"get":{"tags":["Reports"],"summary":"Get Report","operationId":"get_report_v1_projects__project_id__reports__report_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/custom-banners":{"get":{"tags":["Custom Banners"],"summary":"List saved derived banners for a project","operationId":"list_custom_banners_v1_projects__project_id__custom_banners_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Custom Banners"],"summary":"Save a derived banner","operationId":"create_custom_banner_v1_projects__project_id__custom_banners_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBannerCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/custom-banners/{banner_id}":{"delete":{"tags":["Custom Banners"],"summary":"Delete a saved derived banner","operationId":"delete_custom_banner_v1_projects__project_id__custom_banners__banner_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"banner_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Banner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analysis/projects/{project_id}/summary":{"get":{"tags":["Executive Summary"],"summary":"Get Summary","description":"Return the executive summary.\n\nSince the summary is fast and deterministic (built from metadata, no LLM),\nwe generate it on the fly when the project has data — so the page renders a\npopulated summary immediately instead of an empty 'generate' state. If no\ndata has been uploaded yet, content=null (200) so the UI shows its CTA.","operationId":"get_summary_v1_analysis_projects__project_id__summary_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Executive Summary"],"summary":"Generate Summary","description":"Generate a fast deterministic executive summary from dataset metadata.","operationId":"generate_summary_v1_analysis_projects__project_id__summary_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/data-prep/qc-questionnaire-review":{"post":{"tags":["Data Prep"],"summary":"Qc Questionnaire Review","operationId":"qc_questionnaire_review_v1_projects__project_id__data_prep_qc_questionnaire_review_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs":{"post":{"tags":["Programming Check"],"summary":"Create Run","operationId":"create_run_v1_projects__project_id__programming_check_runs_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateRunRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Programming Check"],"summary":"List Runs","operationId":"list_runs_v1_projects__project_id__programming_check_runs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs/{run_id}":{"get":{"tags":["Programming Check"],"summary":"Get Run","operationId":"get_run_v1_projects__project_id__programming_check_runs__run_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/readiness":{"get":{"tags":["Programming Check"],"summary":"Readiness","description":"Can this project be validated at all? Cheap: reads only columns already loaded.\n\nSpec 4.1 asks for a disabled button when there is no questionnaire or no data.\nWithout this the page only learns it after a click comes back 400.","operationId":"readiness_v1_projects__project_id__programming_check_readiness_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/corrections":{"get":{"tags":["Programming Check"],"summary":"List Corrections","operationId":"list_corrections_v1_projects__project_id__programming_check_corrections_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs/{run_id}/questions/{question_id}/correction":{"post":{"tags":["Programming Check"],"summary":"Correct And Reevaluate","operationId":"correct_and_reevaluate_v1_projects__project_id__programming_check_runs__run_id__questions__question_id__correction_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs/{run_id}/questions/{question_id}":{"patch":{"tags":["Programming Check"],"summary":"Patch Question","operationId":"patch_question_v1_projects__project_id__programming_check_runs__run_id__questions__question_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchQuestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs/{run_id}/findings/{finding_id}":{"patch":{"tags":["Programming Check"],"summary":"Patch Finding","operationId":"patch_finding_v1_projects__project_id__programming_check_runs__run_id__findings__finding_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"finding_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Finding Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchFindingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs/{run_id}/human-review":{"post":{"tags":["Programming Check"],"summary":"Upload Human Review","operationId":"upload_human_review_v1_projects__project_id__programming_check_runs__run_id__human_review_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_human_review_v1_projects__project_id__programming_check_runs__run_id__human_review_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Programming Check"],"summary":"Get Human Review","operationId":"get_human_review_v1_projects__project_id__programming_check_runs__run_id__human_review_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs/{run_id}/human-review/{match_id}":{"patch":{"tags":["Programming Check"],"summary":"Decide Match","operationId":"decide_match_v1_projects__project_id__programming_check_runs__run_id__human_review__match_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"match_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Match Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/programming-check/runs/{run_id}/export.xlsx":{"get":{"tags":["Programming Check"],"summary":"Export Xlsx","operationId":"export_xlsx_v1_projects__project_id__programming_check_runs__run_id__export_xlsx_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams":{"get":{"tags":["Teams"],"summary":"List Teams","operationId":"list_teams_v1_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Teams"],"summary":"Create Team","operationId":"create_team_v1_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}":{"get":{"tags":["Teams"],"summary":"Get Team","operationId":"get_team_v1_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Teams"],"summary":"Update Team","operationId":"update_team_v1_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Teams"],"summary":"Delete Team","operationId":"delete_team_v1_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/members":{"post":{"tags":["Teams"],"summary":"Add Member","operationId":"add_member_v1_teams__team_id__members_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/members/{user_id}":{"delete":{"tags":["Teams"],"summary":"Remove Member","operationId":"remove_member_v1_teams__team_id__members__user_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/dashboards":{"post":{"tags":["Dashboards"],"summary":"Create Dashboard","operationId":"create_dashboard_v1_projects__project_id__dashboards_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Dashboards"],"summary":"List Dashboards","operationId":"list_dashboards_v1_projects__project_id__dashboards_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/dashboards/{dashboard_id}":{"get":{"tags":["Dashboards"],"summary":"Get Dashboard","operationId":"get_dashboard_v1_projects__project_id__dashboards__dashboard_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Dashboards"],"summary":"Update Dashboard","operationId":"update_dashboard_v1_projects__project_id__dashboards__dashboard_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Dashboards"],"summary":"Delete Dashboard","operationId":"delete_dashboard_v1_projects__project_id__dashboards__dashboard_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/dashboards/{dashboard_id}/publish":{"post":{"tags":["Dashboards"],"summary":"Publish Dashboard","operationId":"publish_dashboard_v1_projects__project_id__dashboards__dashboard_id__publish_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardPublish","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/dashboards/{dashboard_id}/widgets":{"post":{"tags":["Dashboards"],"summary":"Add Widget","operationId":"add_widget_v1_projects__project_id__dashboards__dashboard_id__widgets_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/share":{"post":{"tags":["Share"],"summary":"Create Share Link","operationId":"create_share_link_v1_projects__project_id__share_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Share"],"summary":"List Share Links","operationId":"list_share_links_v1_projects__project_id__share_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/share/{link_id}":{"delete":{"tags":["Share"],"summary":"Delete Share Link","operationId":"delete_share_link_v1_projects__project_id__share__link_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/dashboards/{share_token}":{"get":{"tags":["Public"],"summary":"Get Public Dashboard","description":"View a published dashboard via share token (no auth required).\n\nEnforces the optional password/expiry set at publish time (audit 2026-07 F3):\npreviously these were ignored entirely for dashboards, so a password-protected\nor expired share token worked forever. FE (PublicDashboardView) handles the\n401 (password) / 410 (expired) codes.","operationId":"get_public_dashboard_v1_public_dashboards__share_token__get","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/me":{"get":{"tags":["Users"],"summary":"Get Profile","operationId":"get_profile_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["Users"],"summary":"Update Profile","operationId":"update_profile_v1_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/me/preferences":{"get":{"tags":["Users"],"summary":"Get Preferences","operationId":"get_preferences_v1_users_me_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["Users"],"summary":"Update Preferences","operationId":"update_preferences_v1_users_me_preferences_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/help-chat":{"post":{"tags":["Help"],"summary":"Ask Help","operationId":"ask_help_v1_help_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpQuestion"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/merge/validate":{"post":{"tags":["Merge"],"summary":"Validate Merge","description":"Validate merge compatibility between two projects.","operationId":"validate_merge_v1_projects__project_id__merge_validate_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/merge":{"post":{"tags":["Merge"],"summary":"Execute Merge","description":"Execute dataset merge. Creates modified dataset in the target project.","operationId":"execute_merge_v1_projects__project_id__merge_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeExecuteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/clustering/auto-k":{"post":{"tags":["Clustering"],"summary":"Auto Detect K","description":"Find optimal k using elbow method.","operationId":"auto_detect_k_v1_projects__project_id__clustering_auto_k_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoKRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/clustering/run":{"post":{"tags":["Clustering"],"summary":"Run Clustering","description":"Run k-means or hierarchical clustering.","operationId":"run_clustering_v1_projects__project_id__clustering_run_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/chat":{"post":{"tags":["Agent"],"summary":"Streaming chat via Claude Agent SDK + MCP (replaces /v1/chat-stream)","description":"Open an Agent SDK session and stream the response.\n\nThe agent connects to our own MCP server over loopback SSE, executes tools\nto compute answers, and streams results back to the browser as SSE events.\nEvery tool call is logged to agent_tool_calls (Supabase).\n\nfile_id resolution priority:\n  1. Explicit file_id in the form (used by /try light demo + stateless API).\n  2. project_id → primary file (used by the full app at /app where the\n     user is logged in and we know which project they're working on).","operationId":"agent_chat_v1_agent_chat_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_agent_chat_v1_agent_chat_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/smart-spec":{"post":{"tags":["Agent"],"summary":"Generate a TabulateSpec from .sav + questionnaire + ticket via the agent","description":"Upload an SPSS file (or pass file_id) plus optional questionnaire (.docx/.pdf) and/or reporting ticket (.docx). The agent reads everything, validates variables against the real metadata, and produces a TabulateSpec JSON ready to feed to /v1/tabulate. Every variable in the output is verified to exist in the dataset.","operationId":"agent_smart_spec_v1_agent_smart_spec_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_agent_smart_spec_v1_agent_smart_spec_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/parse-ticket":{"post":{"tags":["Agent"],"summary":"Parse a Reporting Ticket (.docx) into a TabulateSpec-compatible plan via the agent","operationId":"agent_parse_ticket_v1_agent_parse_ticket_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_agent_parse_ticket_v1_agent_parse_ticket_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/report":{"post":{"tags":["Agent"],"summary":"Multi-analysis executive report via the agent","description":"Generate a deterministic executive report from an SPSS file. The agent plans 6-8 analyses, executes them via the MCP server, and writes a narrative citing the real numbers. Every figure is traceable via agent_tool_calls.","operationId":"agent_report_v1_agent_report_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_agent_report_v1_agent_report_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/detect-structure":{"post":{"tags":["Agent"],"summary":"Propose study structure (MRS groups, grids, derived banners, scale T2B/B2B) from a .sav + questionnaire via the Agent SDK","description":"Upload a questionnaire (.docx or .pdf) plus a .sav (or pass file_id). The agent reads the questionnaire, cross-references it with the SPSS metadata, and proposes a structure for the analyst to review and apply. Every variable in the proposal is verified to exist in the dataset. Idempotent — running twice on the same inputs produces similar (not necessarily identical) suggestions.","operationId":"agent_detect_structure_v1_agent_detect_structure_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_agent_detect_structure_v1_agent_detect_structure_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/detect-structure/{job_id}":{"get":{"tags":["Agent"],"summary":"Poll the status/result of an async detect-structure job","description":"Returns {status} while pending/running and {status, ...proposal} when done. status ∈ pending|running|done|failed. The proposal (mrs_groups, grid_groups, derived_banners, scales, unmapped, summary) is in `result` when status=done.","operationId":"agent_detect_structure_status_v1_agent_detect_structure__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/demo/sample":{"get":{"tags":["Demo"],"summary":"Get a pre-loaded sample file_id for the /try demo","description":"Ensure the demo fixture is in Redis and return its file_id + metadata.","operationId":"get_demo_sample_v1_demo_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/agent-metrics":{"get":{"tags":["Admin"],"summary":"Aggregate operational metrics for the Agent SDK","description":"Returns aggregate counts and averages over the agent audit tables. Use this to monitor cost, error rate, and conversations that look like they're looping (high tool count per turn).","operationId":"agent_metrics_v1_admin_agent_metrics_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":720,"minimum":1,"description":"Window in hours (1-720)","default":24,"title":"Hours"},"description":"Window in hours (1-720)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agent Metrics V1 Admin Agent Metrics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIInterpretRequest":{"properties":{"message":{"type":"string","title":"Message"},"language":{"type":"string","title":"Language","default":"es"},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"available_variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Variables"}},"type":"object","required":["message"],"title":"AIInterpretRequest"},"AutoKRequest":{"properties":{"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"max_k":{"type":"integer","title":"Max K","default":10}},"type":"object","required":["variables"],"title":"AutoKRequest"},"BannerCondition":{"properties":{"variable":{"type":"string","minLength":1,"title":"Variable"},"operator":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","in","not_in"],"title":"Operator"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"items":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"type":"array"}],"title":"Value"}},"type":"object","required":["variable","operator","value"],"title":"BannerCondition"},"Body_agent_chat_v1_agent_chat_post":{"properties":{"user_message":{"type":"string","title":"User Message","description":"User's question"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"Redis file session ID (optional if project_id provided)"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"If provided, resolves file_id from the project's primary file"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"study_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Study Brief","description":"Optional JSON with study context (for demo)"}},"type":"object","required":["user_message"],"title":"Body_agent_chat_v1_agent_chat_post"},"Body_agent_detect_structure_v1_agent_detect_structure_post":{"properties":{"questionnaire":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Questionnaire","description":"Questionnaire .docx or .pdf (optional if the project already has one stored)"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"SPSS .sav (omit if passing file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"Existing Redis session ID for the .sav"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"If provided, resolves file_id from the project's primary file (used by /app)"}},"type":"object","title":"Body_agent_detect_structure_v1_agent_detect_structure_post"},"Body_agent_parse_ticket_v1_agent_parse_ticket_post":{"properties":{"ticket":{"type":"string","contentMediaType":"application/octet-stream","title":"Ticket","description":"Reporting Ticket .docx"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Optional .sav for variable matching"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"}},"type":"object","required":["ticket"],"title":"Body_agent_parse_ticket_v1_agent_parse_ticket_post"},"Body_agent_report_v1_agent_report_post":{"properties":{"file_id":{"type":"string","title":"File Id","description":"Redis file session ID (upload first via /v1/files/upload)"},"depth":{"type":"string","title":"Depth","description":"compact | standard | detailed","default":"standard"},"language":{"type":"string","title":"Language","description":"Report language (es, en, ...)","default":"es"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Optional project ID for study brief context"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["file_id"],"title":"Body_agent_report_v1_agent_report_post"},"Body_agent_smart_spec_v1_agent_smart_spec_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"questionnaire":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Questionnaire"},"ticket":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Ticket"}},"type":"object","title":"Body_agent_smart_spec_v1_agent_smart_spec_post"},"Body_anova_v1_anova_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"spec":{"type":"string","title":"Spec","description":"JSON: {\"dependent\": \"Q1\", \"factor\": \"age_group\", \"post_hoc\": true}"}},"type":"object","required":["spec"],"title":"Body_anova_v1_anova_post"},"Body_auto_analyze_v1_auto_analyze_post":{"properties":{"background_book":{"type":"boolean","title":"Background Book","description":"Paid background export budget","default":false},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"ticket":{"type":"string","contentMediaType":"application/octet-stream","title":"Ticket","description":"Reporting Ticket .docx — AI parses it to override auto-detection"},"options":{"type":"string","title":"Options","description":"Optional JSON: {\"max_banners\": 3, \"output_mode\": \"multi_sheet\", \"significance_level\": 0.95}","default":"{}"},"response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Format","description":"\"xlsx\" (default): the workbook as a binary stream. \"bundle\": JSON with the workbook in base64, the stats, and the assumptions the engine made for THIS run."}},"type":"object","title":"Body_auto_analyze_v1_auto_analyze_post"},"Body_chat_deprecated_v1_chat_post":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"ticket":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Ticket"},"history":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History"},"prep_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep Context"}},"type":"object","title":"Body_chat_deprecated_v1_chat_post"},"Body_chat_stream_deprecated_v1_chat_stream_post":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"ticket":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Ticket"},"history":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History"},"prep_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep Context"}},"type":"object","title":"Body_chat_stream_deprecated_v1_chat_stream_post"},"Body_convert_v1_convert_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"target_format":{"type":"string","title":"Target Format","description":"Target format: xlsx, csv, dta, parquet"},"apply_labels":{"type":"boolean","title":"Apply Labels","description":"Replace codes with value labels in output","default":true},"include_metadata_sheet":{"type":"boolean","title":"Include Metadata Sheet","description":"Include variable labels sheet (Excel only)","default":true}},"type":"object","required":["target_format"],"title":"Body_convert_v1_convert_post"},"Body_correlation_v1_correlation_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"spec":{"type":"string","title":"Spec","description":"JSON: {\"variables\": [\"Q1\",\"Q2\",\"Q3\"], \"method\": \"pearson\"}"}},"type":"object","required":["spec"],"title":"Body_correlation_v1_correlation_post"},"Body_crosstab_v1_crosstab_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"spec":{"type":"string","title":"Spec","description":"JSON object: {\"row\": \"Q1\", \"col\": \"S2\", \"weight\": null, \"significance_level\": 0.95}"}},"type":"object","required":["spec"],"title":"Body_crosstab_v1_crosstab_post"},"Body_export_powerbi_v1_export_powerbi_post":{"properties":{"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/files/upload"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"SPSS .sav (or use file_id)"},"package_name":{"type":"string","title":"Package Name","description":"Prefix used inside the ZIP and for downloads","default":"survey"},"table_name":{"type":"string","title":"Table Name","description":"PowerBI table name referenced by DAX measures","default":"Survey"},"format":{"type":"string","title":"Format","description":"'package' (default) returns the Phase 4 ZIP with CSV + DAX files. 'template' attempts to generate a Power BI .pbit with a pre-built data model (requires a dashboardizable file — see /v1/export/powerbi/can-template for the gate).","default":"package"}},"type":"object","title":"Body_export_powerbi_v1_export_powerbi_post"},"Body_frequency_v1_frequency_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"variable":{"type":"string","title":"Variable","description":"Variable name to analyze"},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight","description":"Weight variable name"}},"type":"object","required":["variable"],"title":"Body_frequency_v1_frequency_post"},"Body_gap_analysis_endpoint_v1_gap_analysis_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"spec":{"type":"string","title":"Spec","description":"JSON: {\"importance_vars\": [\"Q1_imp\",\"Q2_imp\"], \"performance_vars\": [\"Q1_perf\",\"Q2_perf\"]}"}},"type":"object","required":["spec"],"title":"Body_gap_analysis_endpoint_v1_gap_analysis_post"},"Body_import_codebook_v1_projects__project_id__metadata_import_codebook_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_codebook_v1_projects__project_id__metadata_import_codebook_post"},"Body_import_tabspec_v1_projects__project_id__data_prep_import_tabspec_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_tabspec_v1_projects__project_id__data_prep_import_tabspec_post"},"Body_inspect_preparation_v1_preparation_inspect_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"inspection":{"type":"string","title":"Inspection","default":"{}"},"all_pages":{"type":"boolean","title":"All Pages","default":false}},"type":"object","title":"Body_inspect_preparation_v1_preparation_inspect_post"},"Body_library_update_v1_library__library_id__patch":{"properties":{"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"tags":{"type":"string","title":"Tags"}},"type":"object","title":"Body_library_update_v1_library__library_id__patch"},"Body_library_upload_v1_library_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"description":{"type":"string","title":"Description","default":""},"tags":{"type":"string","title":"Tags","default":""}},"type":"object","required":["file"],"title":"Body_library_upload_v1_library_upload_post"},"Body_metadata_v1_metadata_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"label_overrides":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Overrides","description":"Optional JSON: {\"P5D\": {\"1\": \"Pantene\", \"2\": \"Sedal\"}}"},"include_families":{"type":"boolean","title":"Include Families","description":"Incluye el tipo de familia (dossier semántico) por columna — I334","default":false},"preparation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preparation","description":"Source-bound preparation used by the tabulation engine"}},"type":"object","title":"Body_metadata_v1_metadata_post"},"Body_parse_ticket_deprecated_v1_parse_ticket_post":{"properties":{"ticket":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Ticket"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"}},"type":"object","title":"Body_parse_ticket_deprecated_v1_parse_ticket_post"},"Body_preview_preparation_v1_preparation_preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"preparation":{"type":"string","title":"Preparation"}},"type":"object","required":["preparation"],"title":"Body_preview_preparation_v1_preparation_preview_post"},"Body_process_v1_process_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"operations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operations","description":"JSON array of operation specs"},"ticket":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Ticket","description":"Reporting Ticket .docx (optional)"},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight","description":"Default weight variable"}},"type":"object","title":"Body_process_v1_process_post"},"Body_satisfaction_summary_endpoint_v1_satisfaction_summary_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"spec":{"type":"string","title":"Spec","description":"JSON: {\"variables\": [\"sat_speed\",\"sat_price\"], \"scale\": \"1-5\"}"}},"type":"object","required":["spec"],"title":"Body_satisfaction_summary_endpoint_v1_satisfaction_summary_post"},"Body_smart_spec_deprecated_v1_smart_spec_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"questionnaire":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Questionnaire"},"ticket":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Ticket"}},"type":"object","title":"Body_smart_spec_deprecated_v1_smart_spec_post"},"Body_tabulate_v1_tabulate_post":{"properties":{"background_book":{"type":"boolean","title":"Background Book","description":"Paid background export budget; not for interactive queries","default":false},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":".sav file to tabulate (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"preparation_source":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Preparation Source","description":"Original SAV that the preparation was reviewed against, when file is an enriched SAV"},"spec":{"type":"string","title":"Spec","description":"JSON tabulation specification"},"ticket":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Ticket","description":"Optional .docx Reporting Ticket — Haiku parses it into a tab plan"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"URL to POST job result when processing completes. If provided, returns 202 with job_id instead of blocking."},"response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Format","description":"\"xlsx\" (default): the workbook as a binary stream. \"bundle\": JSON with the workbook in base64, the stats, and the assumptions the engine made for THIS run (families, scale source, box nets, what happened to each column). Sync only."}},"type":"object","required":["spec"],"title":"Body_tabulate_v1_tabulate_post"},"Body_upload_file_endpoint_v1_projects__project_id__files_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_endpoint_v1_projects__project_id__files_upload_post"},"Body_upload_file_v1_files_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Data file (.sav, .csv, .tsv, .xlsx, .xls)"}},"type":"object","required":["file"],"title":"Body_upload_file_v1_files_upload_post"},"Body_upload_human_review_v1_projects__project_id__programming_check_runs__run_id__human_review_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_human_review_v1_projects__project_id__programming_check_runs__run_id__human_review_post"},"Body_wave_compare_v1_wave_compare_post":{"properties":{"file1":{"type":"string","contentMediaType":"application/octet-stream","title":"File1","description":"Wave 1 (baseline) .sav file"},"file1_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File1 Id","description":"Wave 1 file session ID"},"file2":{"type":"string","contentMediaType":"application/octet-stream","title":"File2","description":"Wave 2 (current) .sav file"},"file2_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File2 Id","description":"Wave 2 file session ID"},"variables":{"type":"string","title":"Variables","description":"JSON array of variable names to compare. Empty = auto-detect shared variables.","default":""},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight","description":"Weight variable name (must exist in both files)"},"significance_level":{"type":"number","title":"Significance Level","description":"Confidence level for significance testing","default":0.95}},"type":"object","title":"Body_wave_compare_v1_wave_compare_post"},"Body_weight_compute_v1_weight_compute_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"targets":{"type":"string","title":"Targets"},"max_iterations":{"type":"integer","title":"Max Iterations","default":50},"max_weight":{"type":"number","title":"Max Weight","default":5.0}},"type":"object","required":["targets"],"title":"Body_weight_compute_v1_weight_compute_post"},"Body_weight_preview_v1_weight_preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"SPSS .sav file (or use file_id)"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"File session ID from /v1/library/upload"},"variable":{"type":"string","title":"Variable"}},"type":"object","required":["variable"],"title":"Body_weight_preview_v1_weight_preview_post"},"BookmarkCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}}},"type":"object","required":["name"],"title":"BookmarkCreate"},"ChatClassifyRequest":{"properties":{"file_id":{"type":"string","maxLength":200,"minLength":1,"title":"File Id"},"message":{"type":"string","maxLength":1000,"minLength":1,"title":"Message"}},"type":"object","required":["file_id","message"],"title":"ChatClassifyRequest"},"ClusterRequest":{"properties":{"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"method":{"type":"string","title":"Method","default":"kmeans"},"n_clusters":{"type":"integer","title":"N Clusters","default":3},"linkage":{"type":"string","title":"Linkage","default":"ward"}},"type":"object","required":["variables"],"title":"ClusterRequest"},"ConversationCreate":{"properties":{"title":{"type":"string","title":"Title","default":"New conversation"}},"type":"object","title":"ConversationCreate"},"CorrectionRequest":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"CorrectionRequest"},"CreateKeyRequest":{"properties":{"name":{"type":"string","title":"Name","default":"Default"}},"type":"object","title":"CreateKeyRequest"},"CreateRunRequest":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","title":"CreateRunRequest"},"CustomBannerCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"conditions":{"items":{"$ref":"#/components/schemas/BannerCondition"},"type":"array","title":"Conditions"},"source":{"type":"string","enum":["ai","manual"],"title":"Source","default":"manual"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["name"],"title":"CustomBannerCreate"},"DashboardCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"widgets":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Widgets","default":[]}},"type":"object","required":["name"],"title":"DashboardCreate"},"DashboardPublish":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"expires_in_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Hours"}},"type":"object","title":"DashboardPublish","description":"Optional protection for the public share token (audit 2026-07 F3)."},"DashboardUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"widgets":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Widgets"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters"}},"type":"object","title":"DashboardUpdate"},"DataPrepRuleCreate":{"properties":{"rule_type":{"type":"string","pattern":"^(cleaning|weight|net|recode|computed)$","title":"Rule Type"},"name":{"type":"string","title":"Name","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["rule_type"],"title":"DataPrepRuleCreate"},"DataPrepRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"DataPrepRuleUpdate"},"ExploreRunRequest":{"properties":{"variable":{"type":"string","title":"Variable"},"analysis_type":{"type":"string","title":"Analysis Type","default":"frequency"},"cross_variable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Variable"},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight"},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"},"filters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Filters"},"significance_level":{"type":"number","title":"Significance Level","default":0.95},"net_codes":{"anyOf":[{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Net Codes"}},"type":"object","required":["variable"],"title":"ExploreRunRequest"},"ExportCreate":{"properties":{"export_type":{"type":"string","title":"Export Type","default":"excel"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}}},"type":"object","title":"ExportCreate"},"GenerateTablesConfig":{"properties":{"banners":{"items":{"type":"string"},"type":"array","title":"Banners","description":"Banner (column) variables"},"stubs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}],"title":"Stubs","description":"Stub (row) variables or '_all_'","default":"_all_"},"significance_level":{"type":"number","title":"Significance Level","default":0.95},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight"},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"},"include_means":{"type":"boolean","title":"Include Means","default":false},"include_nets":{"type":"boolean","title":"Include Nets","default":false},"nets":{"anyOf":[{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Nets"},"mrs_groups":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Mrs Groups"},"grid_groups":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Grid Groups"},"custom_groups":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Custom Groups"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"single_sheet":{"type":"boolean","title":"Single Sheet","default":false}},"type":"object","title":"GenerateTablesConfig","description":"Configuration for the Generate Tables wizard."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HelpMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"HelpMessage"},"HelpQuestion":{"properties":{"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/HelpMessage"},"type":"array"},{"type":"null"}],"title":"History"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","title":"HelpQuestion"},"MemberAdd":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"viewer"}},"type":"object","required":["email"],"title":"MemberAdd"},"MergeExecuteRequest":{"properties":{"source_project_id":{"type":"string","format":"uuid","title":"Source Project Id"},"merge_type":{"type":"string","title":"Merge Type","default":"append"},"join_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Join Key"}},"type":"object","required":["source_project_id"],"title":"MergeExecuteRequest"},"MergeValidateRequest":{"properties":{"source_project_id":{"type":"string","format":"uuid","title":"Source Project Id"},"merge_type":{"type":"string","title":"Merge Type","default":"append"}},"type":"object","required":["source_project_id"],"title":"MergeValidateRequest"},"MetadataOverridesPayload":{"properties":{"variables":{"additionalProperties":{"$ref":"#/components/schemas/VariableOverride"},"type":"object","title":"Variables"}},"type":"object","title":"MetadataOverridesPayload","description":"Request body for PUT /v1/projects/{id}/metadata/overrides."},"PatchFindingRequest":{"properties":{"review_status":{"type":"string","enum":["pendiente","error_real","falso_positivo","funciona_segun_cliente"],"title":"Review Status"}},"type":"object","required":["review_status"],"title":"PatchFindingRequest"},"PatchMatchRequest":{"properties":{"decision":{"type":"string","enum":["sin_decidir","tenia_razon_herramienta","tenia_razon_humano","ambos_mal"],"title":"Decision"},"save_as_correction":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Save As Correction"}},"type":"object","required":["decision"],"title":"PatchMatchRequest"},"PatchQuestionRequest":{"properties":{"what_to_change":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"What To Change"},"review_status":{"anyOf":[{"type":"string","enum":["pendiente","error_real","falso_positivo","funciona_segun_cliente"]},{"type":"null"}],"title":"Review Status"}},"type":"object","title":"PatchQuestionRequest"},"PlatformKeyCreate":{"properties":{"name":{"type":"string","title":"Name","default":"Default"},"permissions":{"type":"string","enum":["read","write","admin"],"title":"Permissions","default":"write"}},"type":"object","title":"PlatformKeyCreate"},"PreviewRequest":{"properties":{"rule_type":{"type":"string","title":"Rule Type"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["rule_type","config"],"title":"PreviewRequest"},"ProjectCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"study_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Study Objective"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"target_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Audience"},"brands":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Brands"},"methodology":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Methodology"},"study_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Study Date"},"is_tracking":{"type":"boolean","title":"Is Tracking","default":false},"report_language":{"type":"string","title":"Report Language","default":"en"},"low_base_threshold":{"type":"integer","title":"Low Base Threshold","default":20}},"type":"object","required":["name"],"title":"ProjectCreate"},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"study_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Study Objective"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"target_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Audience"},"brands":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Brands"},"methodology":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Methodology"},"study_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Study Date"},"is_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tracking"},"report_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Language"},"low_base_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Low Base Threshold"}},"type":"object","title":"ProjectUpdate"},"QueryRequest":{"properties":{"question":{"type":"string","maxLength":5000,"minLength":1,"title":"Question"},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Segment Id"},"filters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Filters"},"confidence_level":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Level"}},"type":"object","required":["question"],"title":"QueryRequest"},"ReorderRequest":{"properties":{"rule_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Rule Ids"}},"type":"object","required":["rule_ids"],"title":"ReorderRequest"},"ReportCreate":{"properties":{"title":{"type":"string","title":"Title","default":"Report"},"depth":{"type":"string","title":"Depth","default":"standard"}},"type":"object","title":"ReportCreate"},"ReportPromptRequest":{"properties":{"conversation_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Conversation Ids"},"depth":{"type":"string","title":"Depth","default":"standard"},"language":{"type":"string","title":"Language","default":"es"}},"type":"object","title":"ReportPromptRequest","description":"Request to assemble a copy-paste markdown prompt for Gamma/ChatGPT/Claude."},"SegmentCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"conditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conditions","default":[]}},"type":"object","required":["name"],"title":"SegmentCreate"},"SegmentPreviewRequest":{"properties":{"conditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conditions"}},"type":"object","required":["conditions"],"title":"SegmentPreviewRequest"},"SegmentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"conditions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Conditions"}},"type":"object","title":"SegmentUpdate"},"ShareLinkCreate":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"expires_in_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Hours"}},"type":"object","title":"ShareLinkCreate"},"TableTemplateCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}}},"type":"object","required":["name"],"title":"TableTemplateCreate"},"TeamCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"TeamCreate"},"TeamUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TeamUpdate"},"UserPreferencesUpdate":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"confidence_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Level"},"default_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Prompt"}},"type":"object","title":"UserPreferencesUpdate"},"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"},"VariableGroupCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"group_type":{"type":"string","title":"Group Type","default":"mrs"},"variables":{"items":{"type":"string"},"type":"array","title":"Variables","default":[]}},"type":"object","required":["name"],"title":"VariableGroupCreate"},"VariableGroupUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"group_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Type"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables"}},"type":"object","title":"VariableGroupUpdate"},"VariableOverride":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Label"},"value_labels":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Value Labels"},"semantic_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semantic Type"}},"type":"object","title":"VariableOverride","description":"Per-variable override. All fields optional — only the set keys are applied."},"WaveCompareRequest":{"properties":{"variable":{"type":"string","title":"Variable"},"metric":{"type":"string","title":"Metric","default":"frequency"},"wave_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Wave Ids"}},"type":"object","required":["variable"],"title":"WaveCompareRequest"},"WaveCreate":{"properties":{"wave_name":{"type":"string","maxLength":255,"minLength":1,"title":"Wave Name"},"wave_order":{"type":"integer","title":"Wave Order","default":0},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"}},"type":"object","required":["wave_name"],"title":"WaveCreate"},"WaveUpdate":{"properties":{"wave_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wave Name"},"wave_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wave Order"}},"type":"object","title":"WaveUpdate"},"WidgetAdd":{"properties":{"widget_type":{"type":"string","title":"Widget Type"},"position":{"additionalProperties":true,"type":"object","title":"Position","default":{}},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}}},"type":"object","required":["widget_type"],"title":"WidgetAdd"}}},"tags":[{"name":"System","description":"Health check and system info"},{"name":"Metadata","description":"Extract variable metadata from SPSS files"},{"name":"Analysis","description":"Frequency, crosstab, NPS, and other analyses"},{"name":"Processing","description":"Full pipeline: upload + analyze + return results"},{"name":"Conversion","description":"Convert SPSS files to other formats"},{"name":"AI Features","description":"Haiku-powered ticket parsing and smart labeling"}]}