{"openapi":"3.1.0","info":{"title":"MimesIA API","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Health Get"}}}}}}},"/auth/google/login":{"get":{"tags":["auth"],"summary":"Google Login","description":"Start the flow: remember a state nonce, then hand off to Google.","operationId":"google_login_auth_google_login_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/google/callback":{"get":{"tags":["auth"],"summary":"Google Callback","description":"Finish the flow and land the browser back in the app, signed in.\n\nFailures redirect to the sign-in page with a reason rather than rendering\nan API error page — the user is mid-navigation in a browser, not reading\nJSON.","operationId":"google_callback_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Password Login","description":"Sign in with an email address and password.\n\nSets the same session cookie the Google callback does, so everything\ndownstream is identical regardless of how someone got here.\n\nEvery failure returns the same 401 and the same text. Saying \"no such\naccount\" would make this an endpoint for discovering which addresses are\nregistered, and saying \"wrong password\" would confirm one exists.","operationId":"password_login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/invitation":{"post":{"tags":["auth"],"summary":"Invitation Preview","description":"What an invitation link offers: the address it is for, and until when.\n\nA POST although it only reads, so the token travels in the body and not\nin a URL that request logs keep.","operationId":"invitation_preview_auth_invitation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationToken"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/invitation/accept":{"post":{"tags":["auth"],"summary":"Accept Invitation","description":"Take up an invitation with a password of your own, and sign in.\n\nThis is the only way to open an account with a password. A sign-up form\ntaking any address would let anyone hold an account in someone else's\nname: no message ever proved the address was theirs. The link does — it\nwas sent to that address by an administrator.","operationId":"accept_invitation_auth_invitation_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAccept"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"Who the cookie belongs to. A 401 here is how the app knows to sign in.","operationId":"me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}}},"patch":{"tags":["auth"],"summary":"Update Profile","description":"Change your own display name and/or UI language.\n\nBoth fields are independent: the language switcher sends only `locale`,\nthe profile form sends only `name`.","operationId":"update_profile_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password":{"put":{"tags":["auth"],"summary":"Change Password","description":"Set or replace your own password.\n\nKeeps this browser signed in and revokes every other session. If the reason\nfor changing a password is that someone else knows it, leaving their\nbrowser signed in defeats the point.","operationId":"change_password_auth_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke this browser's session server-side, then clear the cookie.","operationId":"logout_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/auth/sessions":{"get":{"tags":["auth"],"summary":"List Sessions","description":"Every signed-in browser for this account, most recently active first.","operationId":"list_sessions_auth_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SessionOut"},"type":"array","title":"Response List Sessions Auth Sessions Get"}}}}}}},"/auth/sessions/{session_id}":{"delete":{"tags":["auth"],"summary":"Revoke Session","description":"Sign out one device without touching any other.\n\nRevoking the browser making this request works too — the response still\ncompletes, and the next request bearing that cookie just gets a 401 like\nany other revoked session. No special case needed for it.","operationId":"revoke_session_auth_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me/spend":{"get":{"tags":["auth"],"summary":"My Spend","description":"This month's spend against your personal ceiling, if you've set one.","operationId":"my_spend_auth_me_spend_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendStatusOut"}}}}}}},"/auth/me/budget":{"patch":{"tags":["auth"],"summary":"Set My Budget","description":"Set or clear your own monthly ceiling. Always your own call — nobody\nelse can spend on your behalf in your personal namespace to begin with.\n\nThe ceiling is on the account, centrally; what it is measured against is\nthe ledger in the database holding the account's content.","operationId":"set_my_budget_auth_me_budget_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me/data":{"delete":{"tags":["auth"],"summary":"Delete My Data","description":"Permanently delete every artifact and analysis in your personal\nworkspace. Organization content is untouched — this only reaches what you\nown outside any org. Irreversible, and this endpoint doesn't ask twice;\nthe frontend gates it behind a type-to-confirm dialog.","operationId":"delete_my_data_auth_me_data_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataDeletionSummary"}}}}}}},"/auth/config":{"get":{"tags":["auth"],"summary":"Auth Config","description":"Which sign-in methods work, so the UI can offer only those.\n\n`passwordEnabled` is unconditional: password sign-in needs no server-side\nconfiguration, only an account that has a password set.\n\n`minPasswordLength` is here so the sign-up form can state the rule it is\nabout to be judged by. Sent rather than written into the UI, because the\ntwo would drift and the form would promise a length the server refuses.","operationId":"auth_config_auth_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Auth Config Auth Config Get"}}}}}}},"/data-sources":{"get":{"tags":["data-sources"],"summary":"List Data Sources","operationId":"list_data_sources_data_sources_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataSourceOut"},"title":"Response List Data Sources Data Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["data-sources"],"summary":"Upload Data Source","description":"Read an uploaded file into a profile.\n\nA CSV or Excel file is profiled per column and measured. A PDF, Word or\ntext file is a report: it is read into text, a model is asked what\nbreakdowns it states, and every figure that comes back is the document's\nown — see `_upload_document`.\n\nThe bytes are never written anywhere: read, profiled, and out of scope\nwhen the request ends.\n\n`role=\"behavioural\"` marks a file describing what an audience *does*\nrather than who it is. Those get no axis proposal — they are never turned\ninto distributions the user edits — which also saves the model call that\nclassifying columns would otherwise cost.\n\n`join_with` is the demographic file to link this one against, sent in the\nsame request. It has to arrive here rather than being looked up, because\nthe earlier upload kept only its profile — the rows that would answer\n\"which of these customers bought skincare\" no longer exist anywhere. It\nis read, joined, measured and dropped without ever being stored a second\ntime.","operationId":"upload_data_source_data_sources_post","parameters":[{"name":"role","in":"query","required":false,"schema":{"type":"string","default":"demographic","title":"Role"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_data_source_data_sources_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data-sources/merge":{"post":{"tags":["data-sources"],"summary":"Merge Sources","description":"Merge two already-uploaded files, by id.\n\nThe point of taking ids rather than files: the browser no longer has to be\nholding anything. It calls this as soon as *both* uploads have finished,\nwhichever finished second, so the merge no longer depends on dropping the\nfiles in a particular order or on being slow enough for the first upload's\naxis classification to complete.\n\nThat timing dependency was the whole bug. Dropping the signal file a\nmoment too early, or dropping it first, left the demographic `File` absent\nfrom React state, no merge was attempted, and the panel reported the two\nfiles as unlinked — which was true only because nobody had tried.\n\nReads from the staged copies, so it is exactly the same merge the save\npath would do later. Doing it here just means the answer arrives while the\nuser is still looking at the two files.","operationId":"merge_sources_data_sources_merge_post","parameters":[{"name":"demographic_id","in":"query","required":true,"schema":{"type":"string","title":"Demographic Id"}},{"name":"signal_id","in":"query","required":true,"schema":{"type":"string","title":"Signal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Merge Sources Data Sources Merge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data-sources/{source_id}":{"get":{"tags":["data-sources"],"summary":"Get Data Source","operationId":"get_data_source_data_sources__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["data-sources"],"summary":"Delete Data Source","description":"Delete a profile.\n\nPopulations built from it are kept: their distributions are already\ntheirs, and the link going stale is not a reason to destroy somebody's\naudience.","operationId":"delete_data_source_data_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/artifacts":{"get":{"tags":["artifacts"],"summary":"List Artifacts","operationId":"list_artifacts_artifacts_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactOut"},"title":"Response List Artifacts Artifacts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["artifacts"],"summary":"Create Artifact","operationId":"create_artifact_artifacts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/artifacts/{artifact_id}":{"get":{"tags":["artifacts"],"summary":"Get Artifact","operationId":"get_artifact_artifacts__artifact_id__get","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["artifacts"],"summary":"Update Artifact","operationId":"update_artifact_artifacts__artifact_id__patch","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["artifacts"],"summary":"Delete Artifact","description":"Deleting an artifact also drops its analyses — an analysis is meaningless\nwithout the thing it was about.","operationId":"delete_artifact_artifacts__artifact_id__delete","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyses":{"get":{"tags":["analyses"],"summary":"List Analyses","operationId":"list_analyses_analyses_get","parameters":[{"name":"artifact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Id"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnalysisOut"},"title":"Response List Analyses Analyses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["analyses"],"summary":"Create Analysis","description":"Estimate the audience for an artifact across the selected monitors.\n\nRuns the persona agent when an API key is configured, otherwise the seeded\nmock engine — `analysis.engine` records which. A failure with a key present\nis surfaced as a 502 rather than being papered over with mock numbers, and\nan over-large persona grid is a 400 raised before anything is billed.","operationId":"create_analysis_analyses_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyses/estimate":{"post":{"tags":["analyses"],"summary":"Estimate Analysis Cost","description":"Size a run before committing to it. Never billed — no call this makes\nreaches a model, only `plan()`'s cross-product math and arithmetic over\nthe same rates a real run would be charged at.","operationId":"estimate_analysis_cost_analyses_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyses/{analysis_id}":{"get":{"tags":["analyses"],"summary":"Get Analysis","operationId":"get_analysis_analyses__analysis_id__get","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["analyses"],"summary":"Delete Analysis","operationId":"delete_analysis_analyses__analysis_id__delete","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyses/{analysis_id}/plausibility":{"put":{"tags":["analyses"],"summary":"Set Plausibility","description":"Record whether this result looks believable to the person reading it.\n\nA light, continuous signal — captured, stored, and read by nothing. It\ndoes not weight the result, tune a prompt or adjust an estimate, and it\nmust not begin to without a deliberate decision: a judgement that quietly\nstarted steering the model would be a feedback loop nobody designed.\n\n`PUT` rather than `POST` because it is one verdict per analysis per\nreader, replaced on each press — pressing thumbs-down twice is not two\nsignals.","operationId":"set_plausibility_analyses__analysis_id__plausibility_put","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlausibilityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyses/{analysis_id}/share":{"get":{"tags":["analyses"],"summary":"Get Share","description":"The link currently published for this report, or `null`.\n\n`null` with a 200 rather than a 404: \"this report isn't shared\" is a\nsuccessful answer to a fair question, and 404 already means \"no such\nanalysis\" two lines up. One status code carrying both is how a dialog ends\nup showing the wrong empty state.","operationId":"get_share_analyses__analysis_id__share_get","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareOut"},{"type":"null"}],"title":"Response Get Share Analyses  Analysis Id  Share Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["analyses"],"summary":"Create Share","description":"Publish this report at a new link.","operationId":"create_share_analyses__analysis_id__share_post","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["analyses"],"summary":"Update Share","description":"Change who the existing link is for, keeping the link itself.\n\nThe token survives a mode change on purpose: by now the owner has pasted\nthat URL into an email, and rotating it out from under the recipient is\nthe surprising behaviour. Narrowing is the safe direction anyway, and\nrevoking is the explicit way to break what was already sent.","operationId":"update_share_analyses__analysis_id__share_patch","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["analyses"],"summary":"Revoke Share","description":"Withdraw the link. Every copy of it stops working at once.","operationId":"revoke_share_analyses__analysis_id__share_delete","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shared/{token}":{"get":{"tags":["shared"],"summary":"Read Shared Report","operationId":"read_shared_report_shared__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shared/{token}/media/{media_id}":{"get":{"tags":["shared"],"summary":"Read Shared Media","description":"An image the shared report shows, and no other.\n\nThe link opens the report, so it opens the pictures the report draws:\nthe options its questions were asked with. Any other id is a 404 however\nit was learned — holding a link to one report is not a key to anyone's\nuploads.","operationId":"read_shared_media_shared__token__media__media_id__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"variant","in":"query","required":false,"schema":{"enum":["web","thumb"],"type":"string","default":"web","title":"Variant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/media":{"post":{"tags":["media"],"summary":"Upload Media","description":"Keep an image's web copies, and drop the upload.\n\nA sync route on purpose: decoding and re-encoding block, so it runs in\nthe threadpool rather than freezing every other request on the instance.","operationId":"upload_media_media_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_media_media_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/media/{media_id}":{"get":{"tags":["media"],"summary":"Read Media","operationId":"read_media_media__media_id__get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"variant","in":"query","required":false,"schema":{"enum":["web","thumb"],"type":"string","default":"web","title":"Variant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitors":{"get":{"tags":["monitors"],"summary":"List Monitors","description":"Every monitor in this namespace. Empty until somebody defines one.","operationId":"list_monitors_monitors_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCatalogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["monitors"],"summary":"Create Monitor","description":"Define a new attribute to estimate: a label and its possible values.","operationId":"create_monitor_monitors_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitors/{key}":{"patch":{"tags":["monitors"],"summary":"Update Monitor","description":"Edit a monitor's name, group, values, type or role.\n\nExisting analyses are unaffected — they stored their own copy.","operationId":"update_monitor_monitors__key__patch","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitors/groups/{group}":{"delete":{"tags":["monitors"],"summary":"Delete Monitor Group","description":"Delete every monitor in one category at once.\n\nIf the caller can't modify every monitor here (a Contributor, with a\nteammate's monitor in the mix), theirs are skipped rather than failing the\nwhole request; the returned catalog is the actual, honest result either\nway.","operationId":"delete_monitor_group_monitors_groups__group__delete","parameters":[{"name":"group","in":"path","required":true,"schema":{"type":"string","title":"Group"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCatalogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitors/{monitor_id}":{"delete":{"tags":["monitors"],"summary":"Delete Monitor","description":"Delete a monitor. Analyses that scored it keep their results.","operationId":"delete_monitor_monitors__monitor_id__delete","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations":{"get":{"tags":["organizations"],"summary":"List My Organizations","operationId":"list_my_organizations_organizations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationOut"},"type":"array","title":"Response List My Organizations Organizations Get"}}}}}},"post":{"tags":["organizations"],"summary":"Create Organization","operationId":"create_organization_organizations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{org_id}":{"get":{"tags":["organizations"],"summary":"Get Organization","operationId":"get_organization_organizations__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{org_id}/members":{"get":{"tags":["organizations"],"summary":"List Members","operationId":"list_members_organizations__org_id__members_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberOut"},"title":"Response List Members Organizations  Org Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["organizations"],"summary":"Add Member","operationId":"add_member_organizations__org_id__members_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{org_id}/members/{membership_id}":{"patch":{"tags":["organizations"],"summary":"Change Member Role","operationId":"change_member_role_organizations__org_id__members__membership_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["organizations"],"summary":"Remove Member","description":"Remove a member — or leave, when it's your own membership.\n\nLeaving needs no special role; removing someone else does. Both still go\nthrough the last-admin guard in `services/organizations.py`, so the sole\nadmin can't leave any more than they could remove themself another way.","operationId":"remove_member_organizations__org_id__members__membership_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{org_id}/spend":{"get":{"tags":["organizations"],"summary":"Org Spend","description":"This month's spend against the org's ceiling. Any member can see it —\nview access is the floor every role has, same as the content itself.","operationId":"org_spend_organizations__org_id__spend_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{org_id}/budget":{"patch":{"tags":["organizations"],"summary":"Set Org Budget","description":"Set or clear the org's monthly ceiling. Admin only — the same bar as\nmanaging membership, since both are resource-governance decisions.","operationId":"set_org_budget_organizations__org_id__budget_patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/populations":{"get":{"tags":["populations"],"summary":"List Populations","operationId":"list_populations_populations_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PopulationOut"},"title":"Response List Populations Populations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["populations"],"summary":"Create Population","operationId":"create_population_populations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PopulationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PopulationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/populations/{population_id}":{"get":{"tags":["populations"],"summary":"Get Population","operationId":"get_population_populations__population_id__get","parameters":[{"name":"population_id","in":"path","required":true,"schema":{"type":"string","title":"Population Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PopulationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["populations"],"summary":"Update Population","operationId":"update_population_populations__population_id__patch","parameters":[{"name":"population_id","in":"path","required":true,"schema":{"type":"string","title":"Population Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PopulationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PopulationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["populations"],"summary":"Delete Population","operationId":"delete_population_populations__population_id__delete","parameters":[{"name":"population_id","in":"path","required":true,"schema":{"type":"string","title":"Population Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/populations/{population_id}/claims":{"get":{"tags":["populations"],"summary":"List Population Claims","description":"Everything known about this population's groups, strongest first.\n\nRead from the table rather than from `signal_join`, which is what the\nInsights tab used to do. That copy only ever held the merge's own\ncandidates, so a population whose evidence came from a report had a\nknowledge base and an empty screen.\n\nBoth provenances, in one list, because the question a reader is asking —\nhow much to trust what is known about these people — is the same for\nboth. `provenance` is on every row, and a reported one carries its\ndocument and the sentence it was read from, so the two can be told apart\nwithout being separated.\n\nEverything is returned, not just what clears `MIN_SCORE`. The grounding\npath filters; a screen should be able to show a weak finding *as weak*\nrather than hide it, which is the same reasoning as\n`insights.MIN_SCORE = 10`.","operationId":"list_population_claims_populations__population_id__claims_get","parameters":[{"name":"population_id","in":"path","required":true,"schema":{"type":"string","title":"Population Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PopulationClaimOut"},"title":"Response List Population Claims Populations  Population Id  Claims Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signal-chat/conversations":{"get":{"tags":["signal-chat"],"summary":"List Conversations","description":"Your own threads, most recently active first.","operationId":"list_conversations_signal_chat_conversations_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationOut"},"title":"Response List Conversations Signal Chat Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signal-chat/conversations/{conversation_id}":{"get":{"tags":["signal-chat"],"summary":"Get Conversation","description":"One thread with its transcript, for reopening it.","operationId":"get_conversation_signal_chat_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["signal-chat"],"summary":"Rename Conversation","description":"Rename a thread.\n\nTitles are derived from the opening message, which is usually the best\nsummary of what a chat was for and sometimes is not — a thread that\nwandered, or one that opened with a greeting. This lets someone say what\nit was actually about.\n\n`updated_at` is deliberately left alone: the history list sorts by it, and\nrenaming a thread is not activity in it. Bumping it would shuffle a chat\nfrom last month to the top for having been relabelled.","operationId":"rename_conversation_signal_chat_conversations__conversation_id__patch","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["signal-chat"],"summary":"Delete Conversation","description":"Delete a thread and its messages.\n\nArtifacts and analyses the chat created are left alone — they're real work\nthat outlived the conversation, and deleting a chat log should not\nsilently destroy an analysis someone paid for.","operationId":"delete_conversation_signal_chat_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signal-chat":{"post":{"tags":["signal-chat"],"summary":"Chat","description":"Continue a thread by one assistant turn, starting one if needed.\n\nCan create an Artifact and — only after the user confirms a quoted cost —\nrun a real, billed analysis. Both go through the same service functions\nthe form-based routes use, so ownership, the persona cap and the monthly\nbudget all apply identically here.","operationId":"chat_signal_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatReply"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"get":{"tags":["users"],"summary":"List Accounts","description":"Every account on this deployment, oldest first.","operationId":"list_accounts_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AccountOut"},"type":"array","title":"Response List Accounts Users Get"}}}}}}},"/users/{user_id}":{"patch":{"tags":["users"],"summary":"Update Account","description":"Make an account an administrator, or stop it being one.\n\nThe last administrator cannot be demoted, by themselves or anyone: with\nnone left, nobody could invite anyone or make a new one without the\ndatabase.","operationId":"update_account_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/invitations":{"get":{"tags":["users"],"summary":"List Invitations","description":"Invitations not yet taken up, expired ones included so an\nadministrator can see whose link ran out. Newest first.","operationId":"list_invitations_users_invitations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvitationOut"},"type":"array","title":"Response List Invitations Users Invitations Get"}}}}}},"post":{"tags":["users"],"summary":"Create Invitation","description":"Invite an address. The link comes back once, in this response, for\nthe administrator to send; asking again replaces it.","operationId":"create_invitation_users_invitations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationSent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/invitations/{invitation_id}":{"delete":{"tags":["users"],"summary":"Delete Invitation","description":"Cancel an open invitation, or withdraw the access an accepted one\ngave. See `invitations.withdraw`.","operationId":"delete_invitation_users_invitations__invitation_id__delete","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"picture":{"type":"string","title":"Picture"},"isAdmin":{"type":"boolean","title":"Isadmin"},"hasPassword":{"type":"boolean","title":"Haspassword"},"googleLinked":{"type":"boolean","title":"Googlelinked"},"access":{"type":"string","enum":["allowlist","invitation","none"],"title":"Access"},"invitationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitationid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"lastLoginAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastloginat"}},"type":"object","required":["id","email","name","picture","isAdmin","hasPassword","googleLinked","access","invitationId","createdAt","lastLoginAt"],"title":"AccountOut","description":"One account, as administrators see it."},"AccountUpdate":{"properties":{"isAdmin":{"type":"boolean","title":"Isadmin"}},"type":"object","required":["isAdmin"],"title":"AccountUpdate"},"AnalysisCreate":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"monitorKeys":{"items":{"type":"string"},"type":"array","title":"Monitorkeys"}},"type":"object","required":["artifactId"],"title":"AnalysisCreate"},"AnalysisOut":{"properties":{"id":{"type":"string","title":"Id"},"artifactId":{"type":"string","title":"Artifactid"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"},"status":{"type":"string","enum":["baseline","enriched"],"title":"Status"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"enrichedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enrichedat"},"monitorKeys":{"items":{"type":"string"},"type":"array","title":"Monitorkeys"},"engine":{"type":"string","title":"Engine"},"baseline":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Baseline"},"personas":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Personas"},"rates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rates"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"research":{"additionalProperties":true,"type":"object","title":"Research"},"usage":{"additionalProperties":true,"type":"object","title":"Usage"},"panel":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Panel"},"segments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Segments"},"populationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Populationid"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"followUps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Followups"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"},"reasons":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reasons"},"plausibility":{"anyOf":[{"type":"string","enum":["plausible","implausible"]},{"type":"null"}],"title":"Plausibility"},"plausibilityNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plausibilitynote"}},"type":"object","required":["id","artifactId","status","createdAt","monitorKeys","baseline"],"title":"AnalysisOut"},"ArtifactCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":4000,"title":"Description","default":""},"details":{"additionalProperties":true,"type":"object","title":"Details"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","required":["name"],"title":"ArtifactCreate"},"ArtifactOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","required":["id","name","description","details","createdAt"],"title":"ArtifactOut"},"ArtifactUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","title":"ArtifactUpdate","description":"A partial edit. `details` is merged into what is stored, not replaced,\nso a field is removed by sending it with an empty value rather than by\nleaving it out."},"AxisFromData":{"properties":{"column":{"type":"string","title":"Column","default":""},"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"shares":{"additionalProperties":{"type":"number"},"type":"object","title":"Shares"}},"type":"object","required":["key","label","shares"],"title":"AxisFromData","description":"One accepted axis, as the client sends it back after review.\n\nThe shares travel with it rather than being recomputed server-side: the\nuser may have edited them, and re-deriving would silently discard those\nedits — the same failure that once had the model overwriting a saved\nartifact with stale values."},"AxisProposalOut":{"properties":{"column":{"type":"string","title":"Column"},"include":{"type":"boolean","title":"Include"},"label":{"type":"string","title":"Label"},"key":{"type":"string","title":"Key"},"reason":{"type":"string","title":"Reason"},"shares":{"additionalProperties":{"type":"number"},"type":"object","title":"Shares"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["column","include","label","key","reason"],"title":"AxisProposalOut","description":"One column of a file, and what it would become as a population axis.\n\nEvery column comes back, included or not. A column silently missing from\nthe list reads as the file being wrong; one marked excluded with a reason\nreads as a decision the user can reverse."},"Body_upload_data_source_data_sources_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"join_with":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Join With"}},"type":"object","required":["file"],"title":"Body_upload_data_source_data_sources_post"},"Body_upload_media_media_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","required":["file"],"title":"Body_upload_media_media_post"},"BudgetUpdate":{"properties":{"budgetUsd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Budgetusd"}},"type":"object","title":"BudgetUpdate","description":"Set or clear a monthly ceiling. `null` means uncapped."},"ChatContext":{"properties":{"artifact":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Artifact"},"population":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Population"}},"type":"object","title":"ChatContext","description":"What this thread is currently testing, and on whom.\n\nResolved server-side from the conversation's own links rather than read\nback out of the transcript. The transcript records what *was* true when\neach message was written; these are what is true now, and a panel that\ninferred them from messages would show an artifact the user has since\nedited — the same failure that once had the model summarising stale\nvalues."},"ChatMessageOut":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","title":"Content"},"artifactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifactid"},"analysisId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysisid"},"toolsUsed":{"items":{"type":"string"},"type":"array","title":"Toolsused"},"card":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Card"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"images":{"items":{"type":"string"},"type":"array","title":"Images"}},"type":"object","required":["id","role","content","createdAt"],"title":"ChatMessageOut","description":"One stored turn.\n\nOnly `user` and `assistant` exist: the system prompt is server-side (a\nclient that could set it could rewrite the agent's instructions), and tool\ntraffic is an implementation detail of producing one reply."},"ChatReply":{"properties":{"conversationId":{"type":"string","title":"Conversationid"},"title":{"type":"string","title":"Title"},"reply":{"type":"string","title":"Reply"},"artifactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifactid"},"analysisId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysisid"},"toolsUsed":{"items":{"type":"string"},"type":"array","title":"Toolsused"},"card":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Card"},"context":{"$ref":"#/components/schemas/ChatContext"}},"type":"object","required":["conversationId","title","reply"],"title":"ChatReply"},"ChatRequest":{"properties":{"message":{"type":"string","maxLength":8000,"title":"Message","default":""},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"},"attachment":{"anyOf":[{"$ref":"#/components/schemas/QuestionAttachment"},{"type":"null"}]},"selections":{"items":{"$ref":"#/components/schemas/SelectionAttachment"},"type":"array","maxItems":4,"title":"Selections"},"images":{"items":{"type":"string","maxLength":36,"minLength":1},"type":"array","title":"Images"}},"type":"object","title":"ChatRequest","description":"One new message.\n\nThe transcript is no longer sent — it's stored, and the server reads it\nback. Omitting `conversation_id` starts a new thread."},"ConversationDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessageOut"},"type":"array","title":"Messages"},"context":{"$ref":"#/components/schemas/ChatContext"}},"type":"object","required":["id","title","createdAt","updatedAt"],"title":"ConversationDetailOut","description":"One thread with its full transcript, for reopening it."},"ConversationOut":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","required":["id","title","createdAt","updatedAt"],"title":"ConversationOut","description":"A thread as the history list needs it — no messages."},"ConversationUpdate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"ConversationUpdate","description":"Renaming a thread.\n\nTitle only. A conversation's artifact and population are set by what\nhappens inside it, not by editing a row — letting them be patched here\nwould let a chat claim to be about something it never discussed."},"CostEstimateOut":{"properties":{"personaCount":{"type":"integer","title":"Personacount"},"callCount":{"type":"integer","title":"Callcount"},"estimatedUsd":{"type":"number","title":"Estimatedusd"}},"type":"object","required":["personaCount","callCount","estimatedUsd"],"title":"CostEstimateOut"},"CostEstimateRequest":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"monitorKeys":{"items":{"type":"string"},"type":"array","title":"Monitorkeys"}},"type":"object","required":["artifactId"],"title":"CostEstimateRequest","description":"The same selection `AnalysisCreate` takes."},"DataDeletionSummary":{"properties":{"artifactsDeleted":{"type":"integer","title":"Artifactsdeleted"},"analysesDeleted":{"type":"integer","title":"Analysesdeleted"}},"type":"object","required":["artifactsDeleted","analysesDeleted"],"title":"DataDeletionSummary","description":"What a bulk-delete actually removed — shown once, since none of it is\nretrievable afterwards to double-check against."},"DataSourceOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"origin":{"type":"string","title":"Origin"},"connector":{"type":"string","title":"Connector"},"rowCount":{"type":"integer","title":"Rowcount"},"profile":{"additionalProperties":true,"type":"object","title":"Profile"},"axes":{"items":{"$ref":"#/components/schemas/AxisProposalOut"},"type":"array","title":"Axes"},"signalJoin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signaljoin"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","name","origin","connector","rowCount","createdAt"],"title":"DataSourceOut","description":"A file or CRM extract, as its distributions.\n\n`profile` is everything kept from the source — per-column value counts.\nNo rows are stored or returned, here or anywhere."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvitationAccept":{"properties":{"token":{"type":"string","maxLength":200,"minLength":1,"title":"Token"},"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"name":{"type":"string","maxLength":200,"title":"Name","default":""}},"type":"object","required":["token","password"],"title":"InvitationAccept","description":"Taking up an invitation with a password of your own.\n\nNo email: the account gets the address the invitation was sent to, and\nnothing typed here can change which one that is."},"InvitationCreate":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"InvitationCreate"},"InvitationOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"invitedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitedby"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiresat"},"expired":{"type":"boolean","title":"Expired"}},"type":"object","required":["id","email","invitedBy","createdAt","expiresAt","expired"],"title":"InvitationOut","description":"An invitation not yet taken up, as administrators see it.\n\nNever the token: it is shown once, when the invitation is made."},"InvitationPreview":{"properties":{"email":{"type":"string","title":"Email"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiresat"}},"type":"object","required":["email","expiresAt"],"title":"InvitationPreview","description":"What an invitation link offers, shown before it is taken up."},"InvitationSent":{"properties":{"invitation":{"$ref":"#/components/schemas/InvitationOut"},"link":{"type":"string","title":"Link"}},"type":"object","required":["invitation","link"],"title":"InvitationSent","description":"A new invitation and the link to send, which is not shown again."},"InvitationToken":{"properties":{"token":{"type":"string","maxLength":200,"minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"InvitationToken","description":"The token from an invitation link, for `POST /auth/invitation`.\n\nSent in the body rather than the path so it stays out of request logs."},"MediaOut":{"properties":{"id":{"type":"string","title":"Id"},"contentType":{"type":"string","title":"Contenttype"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"bytes":{"type":"integer","title":"Bytes"},"thumbWidth":{"type":"integer","title":"Thumbwidth"},"thumbHeight":{"type":"integer","title":"Thumbheight"},"thumbBytes":{"type":"integer","title":"Thumbbytes"},"originalBytes":{"type":"integer","title":"Originalbytes"}},"type":"object","required":["id","contentType","width","height","bytes","thumbWidth","thumbHeight","thumbBytes","originalBytes"],"title":"MediaOut","description":"An uploaded image, as the copies that were kept of it."},"MemberAdd":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"role":{"type":"string","enum":["read","contributor","write","admin"],"title":"Role","default":"read"}},"type":"object","required":["email"],"title":"MemberAdd"},"MemberOut":{"properties":{"membershipId":{"type":"string","title":"Membershipid"},"userId":{"type":"string","title":"Userid"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"picture":{"type":"string","title":"Picture"},"role":{"type":"string","enum":["read","contributor","write","admin"],"title":"Role"},"joinedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Joinedat"}},"type":"object","required":["membershipId","userId","email","name","picture","role","joinedAt"],"title":"MemberOut"},"MemberRoleChange":{"properties":{"role":{"type":"string","enum":["read","contributor","write","admin"],"title":"Role"}},"type":"object","required":["role"],"title":"MemberRoleChange"},"MonitorCatalogOut":{"properties":{"groups":{"items":{"type":"string"},"type":"array","title":"Groups"},"monitors":{"items":{"$ref":"#/components/schemas/MonitorOut"},"type":"array","title":"Monitors"}},"type":"object","required":["groups","monitors"],"title":"MonitorCatalogOut"},"MonitorCreate":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"options":{"items":{"type":"string"},"type":"array","maxItems":40,"minItems":2,"title":"Options"},"group":{"type":"string","maxLength":60,"title":"Group","default":""},"type":{"type":"string","enum":["single","multi","binary","geo"],"title":"Type","default":"single"},"role":{"anyOf":[{"type":"string","enum":["describes","asks"]},{"type":"null"}],"title":"Role"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","required":["label","options"],"title":"MonitorCreate"},"MonitorOut":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"group":{"type":"string","title":"Group"},"type":{"type":"string","title":"Type"},"role":{"type":"string","enum":["describes","asks"],"title":"Role"},"options":{"items":{"type":"string"},"type":"array","title":"Options"},"optionImages":{"additionalProperties":{"type":"string"},"type":"object","title":"Optionimages"},"questionImages":{"items":{"type":"string"},"type":"array","title":"Questionimages"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","required":["key","label","group","type","role","options"],"title":"MonitorOut"},"MonitorUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Label"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":40,"minItems":2},{"type":"null"}],"title":"Options"},"group":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Group"},"type":{"anyOf":[{"type":"string","enum":["single","multi","binary","geo"]},{"type":"null"}],"title":"Type"},"role":{"anyOf":[{"type":"string","enum":["describes","asks"]},{"type":"null"}],"title":"Role"}},"type":"object","title":"MonitorUpdate","description":"Every field optional — a PATCH may touch one attribute at a time."},"OrganizationCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"OrganizationCreate"},"OrganizationOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"myRole":{"type":"string","enum":["read","contributor","write","admin"],"title":"Myrole"}},"type":"object","required":["id","name","createdAt","myRole"],"title":"OrganizationOut"},"PasswordChange":{"properties":{"currentPassword":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Currentpassword"},"newPassword":{"type":"string","maxLength":1024,"minLength":1,"title":"Newpassword"}},"type":"object","required":["newPassword"],"title":"PasswordChange","description":"Set or replace your own password.\n\n`current_password` is optional because an account that has only used Google\ndoesn't have one to give. The route requires it whenever a password exists."},"PasswordLogin":{"properties":{"email":{"type":"string","maxLength":320,"minLength":1,"title":"Email"},"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"PasswordLogin","description":"Credentials for `POST /auth/login`.\n\nNo format validation beyond length. Rejecting a malformed address with a\ndifferent error than a wrong password would tell an attacker which\naddresses are worth trying, and a password *minimum* here would only\npublish the policy — that check belongs where passwords are set."},"PlausibilityUpdate":{"properties":{"verdict":{"anyOf":[{"type":"string","enum":["plausible","implausible"]},{"type":"null"}],"title":"Verdict"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","title":"PlausibilityUpdate","description":"One reader's judgement of a result.\n\n`verdict` may be cleared back to `None` — someone who clicked by mistake\nneeds a way out that isn't the opposite verdict, and a signal you cannot\nretract is a signal nobody trusts."},"PopulationClaimOut":{"properties":{"id":{"type":"string","title":"Id"},"provenance":{"type":"string","title":"Provenance"},"groupColumn":{"type":"string","title":"Groupcolumn"},"groupValue":{"type":"string","title":"Groupvalue"},"signalColumn":{"type":"string","title":"Signalcolumn"},"signalValue":{"type":"string","title":"Signalvalue"},"share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Share"},"baseline":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baseline"},"groupSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Groupsize"},"score":{"type":"integer","title":"Score"},"band":{"type":"string","title":"Band"},"text":{"type":"string","title":"Text"},"sourceRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceref"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote"}},"type":"object","required":["id","provenance","groupColumn","groupValue","signalColumn","signalValue","score","band","text"],"title":"PopulationClaimOut","description":"One thing known about a group inside a population.\n\nDeliberately one shape for both provenances. A reader comparing what the\ncustomer's own rows showed against what their report asserted is asking\none question — how much to trust each — and two shapes would make the\ncomparison something they had to assemble themselves.\n\nWhat differs is which fields are filled. A measured claim has a baseline,\na lift and a group size; a reported one may have none of those and\ncarries the document and the sentence it was read from instead."},"PopulationCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"kind":{"type":"string","enum":["simulated","inferred"],"title":"Kind","default":"simulated"},"dataSourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasourceid"},"behaviourSourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Behavioursourceid"},"axes":{"items":{"$ref":"#/components/schemas/AxisFromData"},"type":"array","title":"Axes"},"panelSize":{"type":"integer","title":"Panelsize","default":50},"distributions":{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object","title":"Distributions"},"simulatedKeys":{"items":{"type":"string"},"type":"array","title":"Simulatedkeys"},"signalJoin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signaljoin"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","required":["name"],"title":"PopulationCreate"},"PopulationOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","enum":["simulated","inferred"],"title":"Kind"},"dataSourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasourceid"},"dataSourceName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasourcename"},"dataSourceKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasourcekind"},"behaviourSourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Behavioursourceid"},"behaviourSourceName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Behavioursourcename"},"behaviourSourceKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Behavioursourcekind"},"behaviourRowCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Behaviourrowcount"},"behaviourPageCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Behaviourpagecount"},"distributions":{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object","title":"Distributions"},"simulatedKeys":{"items":{"type":"string"},"type":"array","title":"Simulatedkeys"},"signalJoin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signaljoin"},"reportJoin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reportjoin"},"claimCount":{"type":"integer","title":"Claimcount","default":0},"panelSize":{"type":"integer","title":"Panelsize","default":50},"isIndicativePanel":{"type":"boolean","title":"Isindicativepanel","default":false},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","name","kind","distributions","simulatedKeys","createdAt","updatedAt"],"title":"PopulationOut"},"PopulationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"kind":{"anyOf":[{"type":"string","enum":["simulated","inferred"]},{"type":"null"}],"title":"Kind"},"dataSourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasourceid"},"behaviourSourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Behavioursourceid"},"panelSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Panelsize"},"distributions":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Distributions"},"simulatedKeys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Simulatedkeys"},"signalJoin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signaljoin"}},"type":"object","title":"PopulationUpdate","description":"Every field optional — a PATCH may touch one at a time."},"ProfileUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"locale":{"anyOf":[{"type":"string","maxLength":8,"minLength":2},{"type":"null"}],"title":"Locale"}},"type":"object","title":"ProfileUpdate","description":"Changes to your own profile: display name and UI language.\n\nEmail is absent on purpose: it is the key Google sign-in links on, so\nletting it be edited freely would let someone point their account at an\naddress they don't control and wait for its owner to sign in.\n\nBoth fields are optional so the language switcher can save a locale\nwithout echoing back a name it never showed the user."},"QuestionAttachment":{"properties":{"type":{"type":"string","const":"qa_question","title":"Type","default":"qa_question"},"mode":{"type":"string","enum":["single","multi"],"title":"Mode"},"question":{"type":"string","maxLength":500,"minLength":1,"title":"Question"},"options":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":40,"minItems":2,"title":"Options"},"optionImages":{"additionalProperties":{"type":"string","maxLength":36,"minLength":1},"type":"object","title":"Optionimages"}},"type":"object","required":["mode","question","options"],"title":"QuestionAttachment","description":"A question built in the composer and sent into the chat.\n\nTyped rather than a free-form blob: this is client-supplied and gets\nstored and re-rendered, so the shape is validated once here instead of\nbeing trusted everywhere it's read."},"SelectionAttachment":{"properties":{"type":{"type":"string","enum":["use_artifact","use_population"],"title":"Type"},"id":{"type":"string","maxLength":36,"minLength":1,"title":"Id"}},"type":"object","required":["type","id"],"title":"SelectionAttachment","description":"Something the user picked from the `+` menu rather than described.\n\nDeliberately carries only a kind and an id: what it *is* gets looked up\nserver-side, so a client can't relabel someone else's artifact by sending\na name alongside it."},"SessionOut":{"properties":{"id":{"type":"string","title":"Id"},"userAgent":{"type":"string","title":"Useragent"},"ipAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipaddress"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastusedat"},"isCurrent":{"type":"boolean","title":"Iscurrent"}},"type":"object","required":["id","userAgent","ipAddress","createdAt","lastUsedAt","isCurrent"],"title":"SessionOut","description":"One signed-in browser. Device parsing happens client-side from\n`user_agent` — a formatting improvement there never needs a migration."},"ShareInput":{"properties":{"mode":{"type":"string","enum":["link","emails"],"title":"Mode","default":"link"},"emails":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Emails"}},"type":"object","title":"ShareInput","description":"What the owner chooses when publishing, or changing, a link."},"ShareOut":{"properties":{"mode":{"type":"string","enum":["link","emails"],"title":"Mode"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails"},"url":{"type":"string","title":"Url"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["mode","emails","url","createdAt"],"title":"ShareOut","description":"A share as its owner sees it. Never sent to a reader."},"SharedAnalysisOut":{"properties":{"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"engine":{"type":"string","title":"Engine"},"baseline":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Baseline"},"personas":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Personas"},"rates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rates"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"research":{"additionalProperties":true,"type":"object","title":"Research"},"segments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Segments"},"followUps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Followups"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"}},"type":"object","required":["createdAt"],"title":"SharedAnalysisOut","description":"The report, with everything a reader has no business seeing removed.\n\nFlat and independent rather than a subclass of `AnalysisOut` with\nexclusions, and that is the whole point of it. A subclass would inherit\nevery field added to the parent later, so publishing more would become the\ndefault and silence the decision. Here, widening what a stranger can read\ntakes an edit to this class — which is a thing a reviewer can see.\n\nThe rule for that edit: this carries exactly what the shared page draws,\nand nothing held \"in case it's useful\".\n\nLeft out on purpose:\n\n* `usage` — token counts and dollars. The owner's costs, not the reader's\n  business. That includes the `usage` each follow-up carries.\n* `plausibility`, `plausibility_note` — the owner's own doubts about their\n  own numbers. Hiding the voting buttons while still serving the note\n  would be theatre.\n* `id`, `artifact_id`, `org_id`, `population_id`, `conversation_id` —\n  internal handles. `conversation_id` deep-links a private chat.\n* `panel`, `reasons` — per-respondent rows the shared page never renders.\n* `monitor_keys` — custom keys are slugified from the owner's own\n  taxonomy labels, so the key leaks the label."},"SharedArtifactOut":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","description"],"title":"SharedArtifactOut","description":"The artifact, as much of it as a reader needs and no more.\n\n`details` is absent, and now genuinely so. It used to carry a handful of\nkeys whitelisted per kind, so the shared page could draw its header line\nfrom them while the rest of the brief stayed behind.\n\nThat whitelist could not survive artifacts. Field names are the author's\nown words, so no server-side rule can know that \"Margin\" or \"Legal\nexposure\" must not reach a stranger holding a link — and a guess about\nprivacy is the worst kind of guess. A reader gets the name and the\ndescription, both of which the author wrote knowing the report would be\nshared.\n\nWidening this takes an edit here, which is a thing a reviewer can see."},"SharedReportOut":{"properties":{"artifact":{"$ref":"#/components/schemas/SharedArtifactOut"},"analysis":{"$ref":"#/components/schemas/SharedAnalysisOut"},"sharedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sharedat"}},"type":"object","required":["artifact","analysis","sharedAt"],"title":"SharedReportOut","description":"Everything behind a share link."},"SpendStatusOut":{"properties":{"spentUsd":{"type":"number","title":"Spentusd"},"budgetUsd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budgetusd"},"remainingUsd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Remainingusd"},"overBudget":{"type":"boolean","title":"Overbudget"},"fractionUsed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fractionused"}},"type":"object","required":["spentUsd","budgetUsd","remainingUsd","overBudget","fractionUsed"],"title":"SpendStatusOut","description":"One namespace's spend for the current calendar month."},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"picture":{"type":"string","title":"Picture"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"hasPassword":{"type":"boolean","title":"Haspassword","default":false},"googleLinked":{"type":"boolean","title":"Googlelinked","default":false},"locale":{"type":"string","title":"Locale","default":"en"},"isAdmin":{"type":"boolean","title":"Isadmin","default":false}},"type":"object","required":["id","email","name","picture","createdAt"],"title":"UserOut","description":"The signed-in account, as the UI needs it.\n\nDeliberately thin: no Google `sub`, no password hash, no session details.\nThe frontend needs a name to greet, a face to show, and enough to know\nwhich account controls to offer — nothing it renders should be worth\nprotecting."},"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"}}}}