{"openapi":"3.1.0","info":{"title":"Litigation-AI API","description":"Multi-agent litigation intelligence backend. Research assistance, not legal advice.","version":"0.1.0"},"paths":{"/api/v1/health":{"get":{"tags":["health"],"summary":"Liveness and database check (no auth)","operationId":"health_health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Log in (bootstrap admin or database user)","operationId":"auth_login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Clear the session cookie","operationId":"auth_logout","responses":{"204":{"description":"Successful Response"}},"security":[{"BearerAuth":[]}]}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Current user","operationId":"auth_me","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"BearerAuth":[]}]}},"/api/v1/users":{"get":{"tags":["users"],"summary":"List users (admin)","operationId":"users_list_users","security":[{"BearerAuth":[]}],"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":{"$ref":"#/components/schemas/Page_UserAccountOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Create a user (admin)","operationId":"users_create_user","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccountOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}":{"get":{"tags":["users"],"summary":"Get a user (admin)","operationId":"users_get_user","security":[{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccountOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["users"],"summary":"Change role, activation, name or password (admin)","operationId":"users_update_user","security":[{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccountOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters":{"get":{"tags":["matters"],"summary":"List matters I can access","operationId":"matters_list_matters","security":[{"BearerAuth":[]}],"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":{"$ref":"#/components/schemas/Page_MatterOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["matters"],"summary":"Create a matter (creator becomes owner)","operationId":"matters_create_matter","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}":{"get":{"tags":["matters"],"summary":"Get a matter","operationId":"matters_get_matter","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["matters"],"summary":"Update a matter (editor)","operationId":"matters_update_matter","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["matters"],"summary":"Soft-delete a matter (owner)","operationId":"matters_delete_matter","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/members":{"get":{"tags":["members"],"summary":"List matter members","operationId":"members_list_members","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberOut"},"title":"Response Members List Members"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["members"],"summary":"Add or change a member (owner)","operationId":"members_add_member","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter 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"}}}}}}},"/api/v1/matters/{matter_id}/access":{"get":{"tags":["members"],"summary":"My effective role on this matter","operationId":"members_my_access","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyMatterAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/members/{user_id}":{"patch":{"tags":["members"],"summary":"Change a member's role (owner)","operationId":"members_update_member","security":[{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberUpdate"}}}},"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":["members"],"summary":"Remove a member (owner)","operationId":"members_remove_member","security":[{"BearerAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/documents":{"post":{"tags":["documents"],"summary":"Upload a document and start ingestion (409 if the exact same file is already in the matter)","operationId":"documents_upload_document","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_documents_upload_document"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["documents"],"summary":"List documents","operationId":"documents_list_documents","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"polarity","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Polarity"},{"type":"null"}],"title":"Polarity"}},{"name":"doc_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DocType"},{"type":"null"}],"title":"Doc Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DocStatus"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(importance|date)$","default":"importance","title":"Sort"}},{"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":{"$ref":"#/components/schemas/Page_DocumentOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{document_id}":{"get":{"tags":["documents"],"summary":"Get a document","operationId":"documents_get_document","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["documents"],"summary":"Edit title, type, our Bates, production or the producer's Bates","operationId":"documents_update_document","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["documents"],"summary":"Delete a document with its attachments, derived data and stored files (409 while it is processing)","operationId":"documents_delete_document","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{document_id}/text":{"get":{"tags":["documents"],"summary":"Extracted text of a document","operationId":"documents_get_document_text","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTextOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{document_id}/file":{"get":{"tags":["documents"],"summary":"Download (or view inline) the original uploaded file","operationId":"documents_get_document_file","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"disposition","in":"query","required":false,"schema":{"enum":["attachment","inline"],"type":"string","default":"attachment","title":"Disposition"}}],"responses":{"200":{"description":"The original bytes, with the stored MIME type","content":{"*/*":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{document_id}/pages":{"get":{"tags":["documents"],"summary":"Extracted text page by page (non-paginated files are page 1)","operationId":"documents_list_pages","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Return only this page","title":"Page Number"},"description":"Return only this page"},{"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":{"$ref":"#/components/schemas/Page_DocumentPageOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/ingestion-batches":{"post":{"tags":["ingestion batches"],"summary":"Open a batch; upload documents with its id, then close it","operationId":"ingestion batches_create_batch","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["ingestion batches"],"summary":"Batches of a matter, newest first","operationId":"ingestion batches_list_batches","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BatchOut"},"title":"Response Ingestion Batches List Batches"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingestion-batches/{batch_id}":{"get":{"tags":["ingestion batches"],"summary":"Batch progress and report decision","operationId":"ingestion batches_get_batch","security":[{"BearerAuth":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingestion-batches/{batch_id}/close":{"post":{"tags":["ingestion batches"],"summary":"No more documents: when all are processed, ONE strategy update runs for the whole batch","operationId":"ingestion batches_close_batch","security":[{"BearerAuth":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{document_id}/privilege-review":{"post":{"tags":["documents"],"summary":"Clear a document held for privilege review (then it is processed) or mark it privileged (never sent to AI)","operationId":"documents_review_privilege","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivilegeDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivilegeReviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{document_id}/importance":{"put":{"tags":["evidence"],"summary":"Set the importance score (human override; later AI re-analysis will not change it)","operationId":"evidence_set_importance","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportanceOverride"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{document_id}/assessments":{"get":{"tags":["evidence"],"summary":"Full history of a document's importance scores and argument links (AI and human), oldest first","operationId":"evidence_document_history","security":[{"BearerAuth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentOut"},"title":"Response Evidence Document History"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/productions":{"get":{"tags":["productions"],"summary":"List productions (newest first)","operationId":"productions_list_productions","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOut"},"title":"Response Productions List Productions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["productions"],"summary":"Record a production","operationId":"productions_create_production","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/productions/{production_id}":{"patch":{"tags":["productions"],"summary":"Edit a production","operationId":"productions_update_production","security":[{"BearerAuth":[]}],"parameters":[{"name":"production_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Production Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/arguments":{"get":{"tags":["arguments"],"summary":"List arguments","operationId":"arguments_list_arguments","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"side","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Posture"},{"type":"null"}],"title":"Side"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ArgumentKind"},{"type":"null"}],"title":"Kind"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ArgumentStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ArgumentOut"},"title":"Response Arguments List Arguments"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["arguments"],"summary":"Add an argument","operationId":"arguments_create_argument","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArgumentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArgumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/arguments/import":{"post":{"tags":["arguments"],"summary":"Create arguments from the matter's claims (plaintiff) and defenses (defendant); idempotent","operationId":"arguments_import_arguments","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArgumentImportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/arguments/{argument_id}":{"patch":{"tags":["arguments"],"summary":"Edit or withdraw an argument","operationId":"arguments_update_argument","security":[{"BearerAuth":[]}],"parameters":[{"name":"argument_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Argument Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArgumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArgumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/evidence-links":{"get":{"tags":["evidence"],"summary":"Evidence links of a matter (filter by argument, document, relation, side, status)","operationId":"evidence_list_links","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"argument_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Argument Id"}},{"name":"document_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id"}},{"name":"relation","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LinkRelation"},{"type":"null"}],"title":"Relation"}},{"name":"side","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Posture"},{"type":"null"}],"title":"Side"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LinkStatus"},{"type":"null"}],"title":"Status"}},{"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":{"$ref":"#/components/schemas/Page_EvidenceLinkOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["evidence"],"summary":"Link a document to an argument (a lawyer's decision: confirmed, never changed by AI)","operationId":"evidence_create_link","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceLinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceLinkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/evidence-links/{link_id}":{"patch":{"tags":["evidence"],"summary":"Edit, confirm or reject a link (becomes a human decision)","operationId":"evidence_update_link","security":[{"BearerAuth":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceLinkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/evidence-links/{link_id}/history":{"get":{"tags":["evidence"],"summary":"Every AI and human assessment of this document against this argument, oldest first","operationId":"evidence_link_history","security":[{"BearerAuth":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentOut"},"title":"Response Evidence Link History"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/threads":{"get":{"tags":["threads"],"summary":"List threads","operationId":"threads_list_threads","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ThreadOut"},"title":"Response Threads List Threads"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["threads"],"summary":"Create a thread","operationId":"threads_create_thread","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}":{"get":{"tags":["threads"],"summary":"Get a thread","operationId":"threads_get_thread","security":[{"BearerAuth":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["threads"],"summary":"Rename a thread","operationId":"threads_rename_thread","security":[{"BearerAuth":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["threads"],"summary":"Delete a thread","operationId":"threads_delete_thread","security":[{"BearerAuth":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/messages":{"get":{"tags":["threads"],"summary":"List messages","operationId":"threads_list_messages","security":[{"BearerAuth":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageOut"},"title":"Response Threads List Messages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["threads"],"summary":"Send a message; starts a chat run","operationId":"threads_post_message","security":[{"BearerAuth":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunStarted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/messages/{message_id}/save-as-report":{"post":{"tags":["threads"],"summary":"Save an assistant answer as a new report version","operationId":"threads_save_as_report","security":[{"BearerAuth":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/workflows/{workflow}":{"post":{"tags":["workflows"],"summary":"Start a workflow run","operationId":"workflows_start_workflow","security":[{"BearerAuth":[]}],"parameters":[{"name":"workflow","in":"path","required":true,"schema":{"type":"string","title":"Workflow"}},{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStarted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}":{"get":{"tags":["runs"],"summary":"Get a run","operationId":"runs_get_run","security":[{"BearerAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/events":{"get":{"tags":["runs"],"summary":"Server-sent events for a run (replays, then follows)","operationId":"runs_run_events","security":[{"BearerAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last-Event-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/runs":{"get":{"tags":["runs"],"summary":"List runs for a matter","operationId":"runs_list_runs","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"workflow","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow"}},{"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":{"$ref":"#/components/schemas/Page_RunOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/cancel":{"post":{"tags":["runs"],"summary":"Cancel a queued or running run (409 if it already finished)","operationId":"runs_cancel","security":[{"BearerAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/feedback":{"post":{"tags":["runs"],"summary":"Rate an AI answer (thumbs up/down, reasons, comment); one rating per user, re-rating updates it","operationId":"runs_give_feedback","security":[{"BearerAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["runs"],"summary":"All ratings of an AI answer","operationId":"runs_list_feedback","security":[{"BearerAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackOut"},"title":"Response Runs List Feedback"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/posture-view":{"get":{"tags":["strategy"],"summary":"Our vs their arguments and favorable vs adverse documents for one side (defaults to the matter's posture)","operationId":"strategy_get_posture_view","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"posture","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Posture"},{"type":"null"}],"title":"Posture"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostureView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/sources":{"get":{"tags":["provenance"],"summary":"Everything a run retrieved (resolves source handles such as S1, S2)","operationId":"provenance_list_run_sources","security":[{"BearerAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceOut"},"title":"Response Provenance List Run Sources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/authorities":{"get":{"tags":["provenance"],"summary":"Authorities a run cited, with verification status (resolves `authority_ids` in run output)","operationId":"provenance_list_run_authorities","security":[{"BearerAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuthorityOut"},"title":"Response Provenance List Run Authorities"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/authorities":{"get":{"tags":["provenance"],"summary":"All authorities cited in a matter, newest first","operationId":"provenance_list_matter_authorities","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"verification_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/VerificationStatus"},{"type":"null"}],"title":"Verification Status"}},{"name":"weight","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Weight"},{"type":"null"}],"title":"Weight"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Search citation or case name","title":"Q"},"description":"Search citation or case name"},{"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":{"$ref":"#/components/schemas/Page_MatterAuthorityOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/strategy":{"get":{"tags":["reports"],"summary":"Latest strategy report","operationId":"reports_latest_strategy","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/reports":{"get":{"tags":["reports"],"summary":"List report versions","operationId":"reports_list_reports","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportSummary"},"title":"Response Reports List Reports"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}":{"get":{"tags":["reports"],"summary":"Get a report","operationId":"reports_get_report","security":[{"BearerAuth":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/diff":{"get":{"tags":["reports"],"summary":"Section-level diff against another version","operationId":"reports_diff_report","security":[{"BearerAuth":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"against","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"Against"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/pdf":{"get":{"tags":["reports"],"summary":"Download the report as a PDF draft for attorney review","operationId":"reports_report_pdf","security":[{"BearerAuth":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ExportInclude"}},{"type":"null"}],"description":"Opt-in sections. Default: executive summary, the client's best arguments and the verified Table of Authorities only. Repeat the parameter: ?include=risks&include=internal_notes","title":"Include"},"description":"Opt-in sections. Default: executive summary, the client's best arguments and the verified Table of Authorities only. Repeat the parameter: ?include=risks&include=internal_notes"}],"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/docx":{"get":{"tags":["reports"],"summary":"Download the report as a Word draft for attorney review (Table of Authorities with page numbers)","operationId":"reports_report_docx","security":[{"BearerAuth":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ExportInclude"}},{"type":"null"}],"description":"Opt-in sections. Default: executive summary, the client's best arguments and the verified Table of Authorities only. Repeat the parameter: ?include=risks&include=internal_notes","title":"Include"},"description":"Opt-in sections. Default: executive summary, the client's best arguments and the verified Table of Authorities only. Repeat the parameter: ?include=risks&include=internal_notes"}],"responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/matters/{matter_id}/alerts":{"get":{"tags":["alerts"],"summary":"List sentinel alerts","operationId":"alerts_list_alerts","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"unread","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertOut"},"title":"Response Alerts List Alerts"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/{alert_id}":{"patch":{"tags":["alerts"],"summary":"Mark an alert read/unread","operationId":"alerts_update_alert","security":[{"BearerAuth":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/prompts":{"get":{"tags":["prompts"],"summary":"User-facing prompt library","operationId":"prompts_get_prompts","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptLibrary"}}}}},"security":[{"BearerAuth":[]}]}},"/api/v1/consensus/models":{"get":{"tags":["consensus"],"summary":"Models available for multi-LLM consensus (ids match the models actually called)","operationId":"consensus_list_consensus_models","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConsensusModelOut"},"type":"array","title":"Response Consensus List Consensus Models"}}}}},"security":[{"BearerAuth":[]}]}},"/api/v1/verify/citation":{"post":{"tags":["verify"],"summary":"Run the verification ladder on arbitrary text","operationId":"verify_verify_citation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCitationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/api/v1/matters/{matter_id}/audit":{"get":{"tags":["audit"],"summary":"Matter audit log (owner)","operationId":"audit_matter_audit","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Matter Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Action"}},{"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":{"$ref":"#/components/schemas/Page_AuditEventOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit":{"get":{"tags":["audit"],"summary":"Global audit log (admin)","operationId":"audit_global_audit","security":[{"BearerAuth":[]}],"parameters":[{"name":"matter_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matter Id"}},{"name":"actor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Action"}},{"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":{"$ref":"#/components/schemas/Page_AuditEventOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AlertOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"title":{"type":"string","title":"Title"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"decision_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Decision Date"},"issue":{"type":"string","title":"Issue"},"impact":{"type":"string","title":"Impact"},"recommended_action":{"type":"string","title":"Recommended Action"},"read":{"type":"boolean","title":"Read"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","matter_id","run_id","title","source_id","source_url","decision_date","issue","impact","recommended_action","read","created_at"],"title":"AlertOut"},"AlertUpdate":{"properties":{"read":{"type":"boolean","title":"Read"}},"type":"object","required":["read"],"title":"AlertUpdate"},"ArgumentCreate":{"properties":{"side":{"$ref":"#/components/schemas/Posture","description":"Whose argument: plaintiff (movant) or defendant (respondent)"},"kind":{"$ref":"#/components/schemas/ArgumentKind"},"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Description"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"For an element: the claim or defense it belongs to"},"position":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Position","default":0}},"type":"object","required":["side","kind","title"],"title":"ArgumentCreate"},"ArgumentImportOut":{"properties":{"created":{"type":"integer","title":"Created"},"items":{"items":{"$ref":"#/components/schemas/ArgumentOut"},"type":"array","title":"Items"}},"type":"object","required":["created","items"],"title":"ArgumentImportOut"},"ArgumentKind":{"type":"string","enum":["claim","element","defense","argument"],"title":"ArgumentKind"},"ArgumentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"side":{"$ref":"#/components/schemas/Posture"},"kind":{"$ref":"#/components/schemas/ArgumentKind"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/ArgumentStatus"},"position":{"type":"integer","title":"Position"},"origin":{"type":"string","title":"Origin"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","matter_id","side","kind","parent_id","title","description","status","position","origin","created_at","updated_at"],"title":"ArgumentOut"},"ArgumentStanding":{"properties":{"argument_id":{"type":"string","format":"uuid","title":"Argument Id"},"side":{"$ref":"#/components/schemas/Posture"},"kind":{"$ref":"#/components/schemas/ArgumentKind"},"title":{"type":"string","title":"Title"},"strength":{"type":"number","title":"Strength","description":"Supporting minus undermining/impeaching evidence, weighted by importance"},"supporting":{"type":"integer","title":"Supporting"},"undermining":{"type":"integer","title":"Undermining"},"impeaching":{"type":"integer","title":"Impeaching"},"unreviewed_links":{"type":"integer","title":"Unreviewed Links"},"top_evidence":{"items":{"$ref":"#/components/schemas/LinkedEvidence"},"type":"array","title":"Top Evidence"}},"type":"object","required":["argument_id","side","kind","title","strength","supporting","undermining","impeaching","unreviewed_links","top_evidence"],"title":"ArgumentStanding"},"ArgumentStatus":{"type":"string","enum":["active","withdrawn"],"title":"ArgumentStatus"},"ArgumentUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/ArgumentStatus"},{"type":"null"}]},"position":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Position"}},"type":"object","title":"ArgumentUpdate"},"AssessmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"argument_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Argument Id"},"kind":{"type":"string","title":"Kind"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"relation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis"},"pin_cite":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin Cite"},"source":{"type":"string","title":"Source"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"prompt_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Version"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"actor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"},"superseded_by_human":{"type":"boolean","title":"Superseded By Human"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","document_id","argument_id","kind","score","relation","status","basis","pin_cite","source","model","prompt_version","run_id","actor_id","superseded_by_human","created_at"],"title":"AssessmentOut","description":"One entry of the append-only history: what was assessed, by whom (AI model or a person), when."},"AuditEventOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"actor_id":{"type":"string","format":"uuid","title":"Actor Id"},"actor_email":{"type":"string","title":"Actor Email"},"action":{"type":"string","title":"Action"},"matter_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matter Id"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"}},"type":"object","required":["id","created_at","actor_id","actor_email","action","matter_id","target_type","target_id","details","request_id","ip"],"title":"AuditEventOut"},"AuthorityOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"handle":{"type":"string","title":"Handle"},"kind":{"type":"string","title":"Kind"},"citation":{"type":"string","title":"Citation"},"case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Name"},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"decided_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided Date"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote"},"proposition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposition"},"weight":{"$ref":"#/components/schemas/Weight"},"verification_status":{"$ref":"#/components/schemas/VerificationStatus"},"verification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Url"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"label":{"type":"string","enum":["binding","persuasive","conflicting","unverified"],"title":"Label","description":"Client label: binding | persuasive | conflicting | unverified","readOnly":true},"label_reason":{"type":"string","title":"Label Reason","description":"Why this label applies (show it in the tooltip)","readOnly":true},"validity":{"type":"string","const":"not_checked","title":"Validity","description":"Whether later history (overruled, reversed) was checked. Always not_checked until a citator from a licensed legal-data provider is integrated.","readOnly":true}},"type":"object","required":["id","handle","kind","citation","case_name","court","jurisdiction","decided_date","quote","proposition","weight","verification_status","verification_url","source_id","label","label_reason","validity"],"title":"AuthorityOut"},"BatchCreate":{"properties":{"label":{"type":"string","maxLength":300,"minLength":1,"title":"Label","examples":["Defendant's second production"]}},"type":"object","required":["label"],"title":"BatchCreate"},"BatchOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"label":{"type":"string","title":"Label"},"source":{"type":"string","enum":["upload","mailbox"],"title":"Source"},"status":{"type":"string","enum":["open","closed","reported"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reported At"},"report_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Report Run Id","description":"The single strategy run started for this batch, if any"},"report_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Note","description":"Why no report run was started, when none was"},"document_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Document Counts","description":"Documents in the batch by status"},"total_documents":{"type":"integer","title":"Total Documents"}},"type":"object","required":["id","matter_id","label","source","status","created_at","closed_at","reported_at","report_run_id","report_note","document_counts","total_documents"],"title":"BatchOut"},"Body_documents_upload_document":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"doc_type":{"$ref":"#/components/schemas/DocType","default":"other"},"bates":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Bates"},"production_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Production Id"},"produced_bates":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Produced Bates"},"batch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Batch Id","description":"An open ingestion batch of this matter"}},"type":"object","required":["file"],"title":"Body_documents_upload_document"},"ConsensusModelOut":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"provider_name":{"type":"string","title":"Provider Name"},"model":{"type":"string","title":"Model"},"configured":{"type":"boolean","title":"Configured"},"receives_matter_documents":{"type":"boolean","title":"Receives Matter Documents"}},"type":"object","required":["id","provider","provider_name","model","configured","receives_matter_documents"],"title":"ConsensusModelOut","description":"One configured consensus model (for the model picker)."},"DiffOp":{"properties":{"type":{"type":"string","enum":["equal","insert","delete"],"title":"Type"},"text":{"type":"string","title":"Text"}},"type":"object","required":["type","text"],"title":"DiffOp"},"DocStatus":{"type":"string","enum":["uploaded","processing","analyzed","needs_ocr","failed","duplicate","privilege_hold"],"title":"DocStatus"},"DocType":{"type":"string","enum":["complaint","contract","email","opposing_brief","ruling","pleading","other"],"title":"DocType"},"DocumentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"title":{"type":"string","title":"Title"},"doc_type":{"$ref":"#/components/schemas/DocType"},"bates":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bates"},"doc_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Doc Date"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"mime":{"type":"string","title":"Mime"},"size_bytes":{"type":"integer","title":"Size Bytes"},"status":{"$ref":"#/components/schemas/DocStatus"},"importance_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Importance Score"},"polarity":{"anyOf":[{"$ref":"#/components/schemas/Polarity"},{"type":"null"}]},"takeaway":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Takeaway"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"extracted_facts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Extracted Facts"},"linked_issues":{"items":{"type":"string"},"type":"array","title":"Linked Issues"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"production_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Production Id"},"produced_bates":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Produced Bates","description":"Bates stamped by the producing party"},"parent_document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Document Id","description":"Set for email attachments"},"email_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Message Id"},"email_in_reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email In Reply To"},"email_thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Thread Id"},"email_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Subject"},"email_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email From"},"email_to":{"items":{"type":"string"},"type":"array","title":"Email To"},"email_cc":{"items":{"type":"string"},"type":"array","title":"Email Cc"},"email_bcc":{"items":{"type":"string"},"type":"array","title":"Email Bcc"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At","description":"UTC"},"sent_at_original":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At Original","description":"Date header exactly as sent"},"duplicate_of_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Duplicate Of Id","description":"The original this document duplicates"},"privilege_status":{"type":"string","title":"Privilege Status","description":"not_screened | clear | flagged | cleared | privileged","default":"not_screened"},"privilege_reasons":{"items":{"type":"string"},"type":"array","title":"Privilege Reasons"},"privilege_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privilege Note"},"privilege_reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Privilege Reviewed At"},"batch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Batch Id"},"low_confidence_pages":{"items":{"type":"integer"},"type":"array","title":"Low Confidence Pages","description":"OCR pages below OCR_LOW_CONFIDENCE: a person should check them"}},"type":"object","required":["id","matter_id","title","doc_type","bates","doc_date","sender","recipient","mime","size_bytes","status","importance_score","polarity","takeaway","summary","extracted_facts","linked_issues","error","created_at","updated_at"],"title":"DocumentOut"},"DocumentPageOut":{"properties":{"page_number":{"type":"integer","title":"Page Number"},"text":{"type":"string","title":"Text"},"char_count":{"type":"integer","title":"Char Count"},"extraction_method":{"type":"string","title":"Extraction Method","description":"text_layer | ocr | ocr_failed","default":"text_layer"},"ocr_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ocr Confidence","description":"Mean OCR word confidence 0-100 (OCR pages)"}},"type":"object","required":["page_number","text","char_count"],"title":"DocumentPageOut"},"DocumentStanding":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"title":{"type":"string","title":"Title"},"importance_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Importance Score"},"score":{"type":"number","title":"Score","description":"> 0 helps the selected side, < 0 hurts it"},"helps":{"items":{"type":"string"},"type":"array","title":"Helps","description":"Why it helps: 'supports <argument>' / 'undermines <their argument>'"},"hurts":{"items":{"type":"string"},"type":"array","title":"Hurts"}},"type":"object","required":["document_id","title","importance_score","score","helps","hurts"],"title":"DocumentStanding"},"DocumentTextOut":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"status":{"$ref":"#/components/schemas/DocStatus"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","required":["document_id","status","text"],"title":"DocumentTextOut"},"DocumentUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"bates":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Bates","description":"Our Bates number"},"doc_type":{"anyOf":[{"$ref":"#/components/schemas/DocType"},{"type":"null"}]},"production_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Production Id"},"produced_bates":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Produced Bates"}},"type":"object","title":"DocumentUpdate"},"DocumentUploadOut":{"properties":{"document":{"$ref":"#/components/schemas/DocumentOut"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["document","run_id"],"title":"DocumentUploadOut"},"EvidenceLinkCreate":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"argument_id":{"type":"string","format":"uuid","title":"Argument Id"},"relation":{"$ref":"#/components/schemas/LinkRelation"},"basis":{"type":"string","maxLength":8000,"minLength":1,"title":"Basis"},"pin_cite":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Pin Cite"}},"type":"object","required":["document_id","argument_id","relation","basis"],"title":"EvidenceLinkCreate"},"EvidenceLinkOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"document_title":{"type":"string","title":"Document Title"},"argument_id":{"type":"string","format":"uuid","title":"Argument Id"},"argument_title":{"type":"string","title":"Argument Title"},"argument_side":{"$ref":"#/components/schemas/Posture"},"argument_kind":{"$ref":"#/components/schemas/ArgumentKind"},"relation":{"$ref":"#/components/schemas/LinkRelation"},"basis":{"type":"string","title":"Basis"},"pin_cite":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin Cite"},"status":{"$ref":"#/components/schemas/LinkStatus"},"origin":{"type":"string","title":"Origin"},"human_override":{"type":"boolean","title":"Human Override"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","matter_id","document_id","document_title","argument_id","argument_title","argument_side","argument_kind","relation","basis","pin_cite","status","origin","human_override","created_at","updated_at"],"title":"EvidenceLinkOut"},"EvidenceLinkUpdate":{"properties":{"relation":{"anyOf":[{"$ref":"#/components/schemas/LinkRelation"},{"type":"null"}]},"basis":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Basis"},"pin_cite":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Pin Cite"},"status":{"anyOf":[{"$ref":"#/components/schemas/LinkStatus"},{"type":"null"}],"description":"confirmed or rejected (a human decision)"}},"type":"object","title":"EvidenceLinkUpdate"},"ExportInclude":{"type":"string","enum":["risks","opposing_side","internal_notes","changelog","ai_scores"],"title":"ExportInclude"},"FeedbackIn":{"properties":{"rating":{"type":"string","enum":["up","down"],"title":"Rating"},"reasons":{"items":{"$ref":"#/components/schemas/FeedbackReason"},"type":"array","maxItems":7,"title":"Reasons"},"comment":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["rating"],"title":"FeedbackIn"},"FeedbackOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"rating":{"type":"string","enum":["up","down"],"title":"Rating"},"reasons":{"items":{"$ref":"#/components/schemas/FeedbackReason"},"type":"array","title":"Reasons"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","run_id","user_id","user_email","rating","reasons","comment","created_at","updated_at"],"title":"FeedbackOut"},"FeedbackReason":{"type":"string","enum":["helpful","inaccurate","missing_authority","wrong_jurisdiction","unsupported_claim","unclear","too_long"],"title":"FeedbackReason"},"GlobalRole":{"type":"string","enum":["admin","member"],"title":"GlobalRole"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImportanceOverride":{"properties":{"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score"},"rationale":{"type":"string","maxLength":4000,"minLength":1,"title":"Rationale"}},"type":"object","required":["score","rationale"],"title":"ImportanceOverride"},"Jurisdiction":{"type":"string","enum":["ny_state","federal_2d","de_chancery"],"title":"Jurisdiction"},"LinkRelation":{"type":"string","enum":["supports","undermines","impeaches"],"title":"LinkRelation"},"LinkStatus":{"type":"string","enum":["proposed","confirmed","rejected"],"title":"LinkStatus"},"LinkedEvidence":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"document_title":{"type":"string","title":"Document Title"},"relation":{"type":"string","enum":["supports","undermines","impeaches"],"title":"Relation"},"basis":{"type":"string","title":"Basis"},"pin_cite":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin Cite"},"reviewed":{"type":"boolean","title":"Reviewed","description":"False while the link is an unreviewed AI proposal"}},"type":"object","required":["document_id","document_title","relation","basis","pin_cite","reviewed"],"title":"LinkedEvidence"},"LoginRequest":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"password":{"type":"string","maxLength":256,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserOut"},"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["user","access_token"],"title":"LoginResponse"},"MatterAuthorityOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"handle":{"type":"string","title":"Handle"},"kind":{"type":"string","title":"Kind"},"citation":{"type":"string","title":"Citation"},"case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Name"},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"decided_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided Date"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote"},"proposition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposition"},"weight":{"$ref":"#/components/schemas/Weight"},"verification_status":{"$ref":"#/components/schemas/VerificationStatus"},"verification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Url"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"label":{"type":"string","enum":["binding","persuasive","conflicting","unverified"],"title":"Label","description":"Client label: binding | persuasive | conflicting | unverified","readOnly":true},"label_reason":{"type":"string","title":"Label Reason","description":"Why this label applies (show it in the tooltip)","readOnly":true},"validity":{"type":"string","const":"not_checked","title":"Validity","description":"Whether later history (overruled, reversed) was checked. Always not_checked until a citator from a licensed legal-data provider is integrated.","readOnly":true}},"type":"object","required":["id","handle","kind","citation","case_name","court","jurisdiction","decided_date","quote","proposition","weight","verification_status","verification_url","source_id","run_id","created_at","label","label_reason","validity"],"title":"MatterAuthorityOut","description":"An authority plus the run that cited it (matter-wide listings span many runs)."},"MatterCreate":{"properties":{"name":{"type":"string","maxLength":300,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parties":{"items":{"$ref":"#/components/schemas/Party"},"type":"array","title":"Parties"},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"},"jurisdictions":{"items":{"$ref":"#/components/schemas/Jurisdiction"},"type":"array","title":"Jurisdictions"},"posture":{"anyOf":[{"$ref":"#/components/schemas/Posture"},{"type":"null"}]},"judge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge"},"opposing_counsel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opposing Counsel"},"claims":{"items":{"type":"string"},"type":"array","title":"Claims"},"defenses":{"items":{"type":"string"},"type":"array","title":"Defenses"},"is_demo":{"type":"boolean","title":"Is Demo","default":false},"sentinel_enabled":{"type":"boolean","title":"Sentinel Enabled","description":"Daily check for new decisions (never for demo matters)","default":true}},"type":"object","required":["name"],"title":"MatterCreate"},"MatterOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parties":{"items":{"$ref":"#/components/schemas/Party"},"type":"array","title":"Parties"},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"},"jurisdictions":{"items":{"$ref":"#/components/schemas/Jurisdiction"},"type":"array","title":"Jurisdictions"},"posture":{"anyOf":[{"$ref":"#/components/schemas/Posture"},{"type":"null"}]},"judge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge"},"opposing_counsel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opposing Counsel"},"claims":{"items":{"type":"string"},"type":"array","title":"Claims"},"defenses":{"items":{"type":"string"},"type":"array","title":"Defenses"},"is_demo":{"type":"boolean","title":"Is Demo"},"sentinel_enabled":{"type":"boolean","title":"Sentinel Enabled","default":true},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","parties","court","venue","jurisdictions","posture","judge","opposing_counsel","claims","defenses","is_demo","created_at","updated_at"],"title":"MatterOut"},"MatterRole":{"type":"string","enum":["viewer","editor","owner"],"title":"MatterRole"},"MatterUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parties":{"anyOf":[{"items":{"$ref":"#/components/schemas/Party"},"type":"array"},{"type":"null"}],"title":"Parties"},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"},"jurisdictions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Jurisdiction"},"type":"array"},{"type":"null"}],"title":"Jurisdictions"},"posture":{"anyOf":[{"$ref":"#/components/schemas/Posture"},{"type":"null"}]},"judge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge"},"opposing_counsel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opposing Counsel"},"claims":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Claims"},"defenses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Defenses"},"sentinel_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sentinel Enabled"}},"type":"object","title":"MatterUpdate"},"MemberAdd":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"role":{"$ref":"#/components/schemas/MatterRole","default":"viewer"}},"type":"object","required":["email"],"title":"MemberAdd"},"MemberOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"role":{"$ref":"#/components/schemas/MatterRole"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","email","display_name","role","is_active","created_at"],"title":"MemberOut"},"MemberUpdate":{"properties":{"role":{"$ref":"#/components/schemas/MatterRole"}},"type":"object","required":["role"],"title":"MemberUpdate"},"MessageCreate":{"properties":{"content":{"type":"string","maxLength":20000,"minLength":1,"title":"Content"},"consensus":{"type":"boolean","title":"Consensus","default":false},"consensus_models":{"items":{"type":"string"},"type":"array","maxItems":6,"title":"Consensus Models"}},"type":"object","required":["content"],"title":"MessageCreate"},"MessageOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"thread_id":{"type":"string","format":"uuid","title":"Thread Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","thread_id","role","content","payload","run_id","created_at"],"title":"MessageOut"},"MyMatterAccess":{"properties":{"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"role":{"$ref":"#/components/schemas/MatterRole"},"is_admin":{"type":"boolean","title":"Is Admin"}},"type":"object","required":["matter_id","role","is_admin"],"title":"MyMatterAccess","description":"The caller's effective role on a matter (admins are reported as `owner`)."},"Page_AuditEventOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditEventOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[AuditEventOut]"},"Page_DocumentOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[DocumentOut]"},"Page_DocumentPageOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentPageOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[DocumentPageOut]"},"Page_EvidenceLinkOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EvidenceLinkOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[EvidenceLinkOut]"},"Page_MatterAuthorityOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MatterAuthorityOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[MatterAuthorityOut]"},"Page_MatterOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MatterOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[MatterOut]"},"Page_RunOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[RunOut]"},"Page_UserAccountOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserAccountOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Page[UserAccountOut]"},"Party":{"properties":{"name":{"type":"string","title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["name"],"title":"Party"},"Polarity":{"type":"string","enum":["supports","adverse","neutral"],"title":"Polarity"},"Posture":{"type":"string","enum":["plaintiff","defendant"],"title":"Posture"},"PostureView":{"properties":{"posture":{"$ref":"#/components/schemas/Posture"},"our_arguments":{"items":{"$ref":"#/components/schemas/ArgumentStanding"},"type":"array","title":"Our Arguments","description":"The selected side's arguments, strongest first"},"their_arguments":{"items":{"$ref":"#/components/schemas/ArgumentStanding"},"type":"array","title":"Their Arguments","description":"The other side's arguments, most threatening first"},"favorable_documents":{"items":{"$ref":"#/components/schemas/DocumentStanding"},"type":"array","title":"Favorable Documents"},"adverse_documents":{"items":{"$ref":"#/components/schemas/DocumentStanding"},"type":"array","title":"Adverse Documents"},"method_note":{"type":"string","title":"Method Note"}},"type":"object","required":["posture","our_arguments","their_arguments","favorable_documents","adverse_documents","method_note"],"title":"PostureView"},"PrivilegeDecision":{"properties":{"decision":{"type":"string","enum":["clear","privileged"],"title":"Decision","description":"clear: not privileged, process it (sends it to AI services). privileged: never send it."},"note":{"type":"string","maxLength":4000,"minLength":1,"title":"Note","description":"Why (kept with the document and in the audit log)"}},"type":"object","required":["decision","note"],"title":"PrivilegeDecision"},"PrivilegeReviewOut":{"properties":{"document":{"$ref":"#/components/schemas/DocumentOut"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id","description":"The ingest run started after a 'clear' decision"}},"type":"object","required":["document"],"title":"PrivilegeReviewOut"},"ProducingParty":{"type":"string","enum":["us","opposing","third_party"],"title":"ProducingParty"},"ProductionCreate":{"properties":{"name":{"type":"string","maxLength":300,"minLength":1,"title":"Name","examples":["Defendant's first production"]},"producing_party":{"$ref":"#/components/schemas/ProducingParty"},"producing_party_name":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Producing Party Name"},"produced_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Produced On"},"bates_prefix":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Bates Prefix"},"bates_begin":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Bates Begin"},"bates_end":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Bates End"},"notes":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","producing_party"],"title":"ProductionCreate"},"ProductionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"name":{"type":"string","title":"Name"},"producing_party":{"$ref":"#/components/schemas/ProducingParty"},"producing_party_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Producing Party Name"},"produced_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Produced On"},"bates_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bates Prefix"},"bates_begin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bates Begin"},"bates_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bates End"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"document_count":{"type":"integer","title":"Document Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","matter_id","name","producing_party","producing_party_name","produced_on","bates_prefix","bates_begin","bates_end","notes","created_at","updated_at"],"title":"ProductionOut"},"ProductionUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Name"},"producing_party_name":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Producing Party Name"},"produced_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Produced On"},"bates_prefix":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Bates Prefix"},"bates_begin":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Bates Begin"},"bates_end":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Bates End"},"notes":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ProductionUpdate"},"PromptItem":{"properties":{"id":{"type":"string","title":"Id"},"category":{"type":"string","title":"Category"},"title":{"type":"string","title":"Title"},"prompt":{"type":"string","title":"Prompt"},"suggested_workflow":{"type":"string","title":"Suggested Workflow"}},"type":"object","required":["id","category","title","prompt","suggested_workflow"],"title":"PromptItem"},"PromptLibrary":{"properties":{"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"items":{"items":{"$ref":"#/components/schemas/PromptItem"},"type":"array","title":"Items"}},"type":"object","required":["categories","items"],"title":"PromptLibrary"},"ReportDiff":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"against_version":{"type":"integer","title":"Against Version"},"version":{"type":"integer","title":"Version"},"sections":{"items":{"$ref":"#/components/schemas/SectionDiff"},"type":"array","title":"Sections"}},"type":"object","required":["report_id","against_version","version","sections"],"title":"ReportDiff"},"ReportOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"version":{"type":"integer","title":"Version"},"kind":{"type":"string","title":"Kind"},"trigger":{"type":"string","title":"Trigger"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"changelog":{"additionalProperties":true,"type":"object","title":"Changelog"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"simulated":{"type":"boolean","title":"Simulated","default":false}},"type":"object","required":["id","matter_id","version","kind","trigger","source_run_id","content","changelog","created_at"],"title":"ReportOut"},"ReportSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"version":{"type":"integer","title":"Version"},"kind":{"type":"string","title":"Kind"},"trigger":{"type":"string","title":"Trigger"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version","kind","trigger","created_at"],"title":"ReportSummary"},"RunOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"thread_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Thread Id"},"workflow":{"type":"string","title":"Workflow"},"trigger":{"type":"string","title":"Trigger"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"status":{"$ref":"#/components/schemas/RunStatus"},"plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Text"},"step_count":{"type":"integer","title":"Step Count"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"tokens_in":{"type":"integer","title":"Tokens In"},"tokens_out":{"type":"integer","title":"Tokens Out"},"cost_estimate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Estimate"},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output"},"guardrail_report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Guardrail Report"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"attempts":{"type":"integer","title":"Attempts","default":0},"max_attempts":{"type":"integer","title":"Max Attempts","default":1},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","matter_id","thread_id","workflow","trigger","input","status","plan_text","step_count","duration_ms","tokens_in","tokens_out","cost_estimate","output","guardrail_report","error","created_at","started_at","finished_at"],"title":"RunOut"},"RunStarted":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"message":{"anyOf":[{"$ref":"#/components/schemas/MessageOut"},{"type":"null"}]}},"type":"object","required":["run_id"],"title":"RunStarted"},"RunStatus":{"type":"string","enum":["queued","running","succeeded","failed","needs_clarification"],"title":"RunStatus"},"SectionDiff":{"properties":{"section":{"type":"string","title":"Section"},"status":{"type":"string","enum":["unchanged","changed","added","removed"],"title":"Status"},"ops":{"items":{"$ref":"#/components/schemas/DiffOp"},"type":"array","title":"Ops"}},"type":"object","required":["section","status","ops"],"title":"SectionDiff"},"SourceKind":{"type":"string","enum":["case_law","statute","web","matter_document"],"title":"SourceKind"},"SourceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"handle":{"type":"string","title":"Handle"},"kind":{"$ref":"#/components/schemas/SourceKind"},"title":{"type":"string","title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court"},"court_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court Id"},"source_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Date"},"citation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Citation"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id"},"retrieved_at":{"type":"string","format":"date-time","title":"Retrieved At"},"content_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Sha256"}},"type":"object","required":["id","run_id","handle","kind","title","url","court","court_id","source_date","citation","excerpt","document_id","retrieved_at"],"title":"SourceOut","description":"Something a run retrieved. Every citation and finding points at one of these (by `handle`)."},"ThreadCreate":{"properties":{"title":{"type":"string","maxLength":300,"title":"Title","default":"New thread"}},"type":"object","title":"ThreadCreate"},"ThreadOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"matter_id":{"type":"string","format":"uuid","title":"Matter Id"},"title":{"type":"string","title":"Title"},"rolling_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rolling Summary"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","matter_id","title","rolling_summary","created_at","updated_at"],"title":"ThreadOut"},"ThreadUpdate":{"properties":{"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"ThreadUpdate"},"UserAccountOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"role":{"$ref":"#/components/schemas/GlobalRole"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","email","display_name","role","is_active","created_at","updated_at"],"title":"UserAccountOut"},"UserCreate":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"password":{"type":"string","maxLength":256,"title":"Password"},"role":{"$ref":"#/components/schemas/GlobalRole","default":"member"},"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email","password"],"title":"UserCreate"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"kind":{"type":"string","title":"Kind","default":"env"}},"type":"object","required":["id","email","role"],"title":"UserOut","description":"The logged-in caller. `kind` is `env` for the bootstrap admin, `user` for database users."},"UserUpdate":{"properties":{"role":{"anyOf":[{"$ref":"#/components/schemas/GlobalRole"},{"type":"null"}]},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"},"password":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Password"}},"type":"object","title":"UserUpdate"},"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"},"VerificationResult":{"properties":{"citation":{"type":"string","title":"Citation"},"case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Name"},"status":{"$ref":"#/components/schemas/VerificationStatus"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"matched_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Citation"},"matched_case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Name"},"matched_court_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Court Id"},"matched_court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Court"},"matched_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Date"},"candidates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Candidates"},"trace":{"items":{"$ref":"#/components/schemas/VerificationStep"},"type":"array","title":"Trace"},"inconclusive":{"type":"boolean","title":"Inconclusive","default":false},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["citation","status"],"title":"VerificationResult","description":"Result of the verification ladder for one citation."},"VerificationStatus":{"type":"string","enum":["verified","citation_mismatch","ambiguous","not_found"],"title":"VerificationStatus"},"VerificationStep":{"properties":{"step":{"type":"string","title":"Step"},"detail":{"type":"string","title":"Detail"},"outcome":{"type":"string","title":"Outcome"}},"type":"object","required":["step","detail","outcome"],"title":"VerificationStep"},"VerifyCitationRequest":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":3,"title":"Text"},"case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Name"},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Court"}},"type":"object","required":["text"],"title":"VerifyCitationRequest"},"VerifyCitationResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/VerificationResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"VerifyCitationResponse"},"Weight":{"type":"string","enum":["binding","persuasive","adverse","unknown"],"title":"Weight"},"WorkflowStarted":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"WorkflowStarted"}},"securitySchemes":{"BearerAuth":{"type":"http","description":"Paste the `access_token` returned by POST /api/v1/auth/login (without the word Bearer).","scheme":"bearer"}}}}