openapi: 3.2.0 info: title: 'CallidusAI Legal Research: V3 API' description: Callidus AI backend API version: 0.1.0 tags: - name: 'Legal Research: V3 API' paths: /legal_research/v3/drafting-studio/prompts: get: tags: - 'Legal Research: V3 API' summary: List Prompt Overrides description: Return prompt catalog merged with active DB overrides. operationId: list_prompt_overrides_legal_research_v3_drafting_studio_prompts_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PromptOverridesListResponse' /legal_research/v3/drafting-studio/prompts/{prompt_key}: put: tags: - 'Legal Research: V3 API' summary: Upsert Prompt Override description: Upsert a global Drafting Studio prompt override and invalidate cache. operationId: upsert_prompt_override_legal_research_v3_drafting_studio_prompts__prompt_key__put parameters: - name: prompt_key in: path required: true schema: type: string title: Prompt Key requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpsertPromptOverrideRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UpsertPromptOverrideResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - 'Legal Research: V3 API' summary: Delete Prompt Override description: Delete a prompt override so runtime falls back to the code default. operationId: delete_prompt_override_legal_research_v3_drafting_studio_prompts__prompt_key__delete parameters: - name: prompt_key in: path required: true schema: type: string title: Prompt Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClearPromptOverrideResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/: get: tags: - 'Legal Research: V3 API' summary: List User Researches description: List all researches for the current user. operationId: list_user_researches_legal_research_v3__get parameters: - name: limit in: query required: false schema: type: integer default: 50 title: Limit responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/LegalResearchV3Record' title: Response List User Researches Legal Research V3 Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - 'Legal Research: V3 API' summary: Create Research description: Create a new research with intake metadata. operationId: create_research_legal_research_v3__post requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateResearchRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreateResearchResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/seed: post: tags: - 'Legal Research: V3 API' summary: Seed Research description: Create a research pre-populated from the matter portal. operationId: seed_research_legal_research_v3_seed_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SeedResearchRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreateResearchResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}: get: tags: - 'Legal Research: V3 API' summary: Get Research Metadata description: 'READ: Get research metadata and assembled entities.' operationId: get_research_metadata_legal_research_v3__research_id__get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResearchStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Set Research Metadata description: 'COMMIT: Replace base research data.' operationId: set_research_metadata_legal_research_v3__research_id__put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ResearchIntakeRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - 'Legal Research: V3 API' summary: Update Research Metadata description: 'COMMIT: Partially update base research data.' operationId: update_research_metadata_legal_research_v3__research_id__patch parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateResearchRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/StepStatus' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - 'Legal Research: V3 API' summary: Delete Research Endpoint description: Delete a research and all its related data. operationId: delete_research_endpoint_legal_research_v3__research_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/full-research-progress: get: tags: - 'Legal Research: V3 API' summary: Get Full Research Progress description: 'READ: poll the full-research workflow''s live progress feed for this research. Returns all phase events published so far, a done flag, and the six committed-state milestones that drive the progress bar. Empty feed (workflow not running / never ran) → empty events, done=False. The progress bar polls this every 2s while `isAutoRunning` is true.' operationId: get_full_research_progress_legal_research_v3__research_id__full_research_progress_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResearchProgressSnapshot' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/deepen-progress: get: tags: - 'Legal Research: V3 API' summary: Get Deepen Progress description: 'READ: poll the deepen agent''s OWN live progress feed for this research. Same shape as ``/full-research-progress`` (phase events + done flag) but a separate feed, so a deepen run surfaces here without lighting up the main fill progress bar. Empty feed (no deepen run active / never ran) → empty events, done=False. The FE polls this while a deepen action is running.' operationId: get_deepen_progress_legal_research_v3__research_id__deepen_progress_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResearchProgressSnapshot' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/overview_bundle: get: tags: - 'Legal Research: V3 API' summary: Get Overview Bundle description: Aggregate every per-COA and per-question read slice for one research. operationId: get_overview_bundle_legal_research_v3__research_id__overview_bundle_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OverviewBundleResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/quick_answer/start: post: tags: - 'Legal Research: V3 API' summary: Start Quick Answer description: 'Start the quick answer Temporal workflow (Phase 1: parties, briefing, lightning in parallel). Returns 202 Accepted. FE polls step GET endpoints for progressive rendering.' operationId: start_quick_answer_legal_research_v3__research_id__quick_answer_start_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/full_research/start: post: tags: - 'Legal Research: V3 API' summary: Start Full Research description: 'Start the full research Temporal workflow. Returns 202 Accepted. FE polls step GET endpoints for progressive rendering.' operationId: start_full_research_legal_research_v3__research_id__full_research_start_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/FullResearchStartRequest' - type: 'null' title: Body responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/ensure_fill: post: tags: - 'Legal Research: V3 API' summary: Ensure Fill description: 'Idempotent V3→V4 migration trigger, called when a research is opened in the V4 UI (ENG-18919). Four outcomes, so a user returning to an old V3 task in the new UI is never stuck: - Already-agentic (native V4 or previously migrated) → no-op; the normal V4 flow owns it. - Finished legacy V3 (full analysis complete, ``is_v3_finished``) → migrate to agentic WITHOUT running the fill (mark_research_agentic): the task lands as a normal V4 task with every action unlocked, its already-complete content untouched (no run, no charge). - Unfinished legacy V3 → migrate to agentic and auto-run the fill exactly once (the flag flip makes every later open take the already-agentic branch), charging as for a normal full-research run. - V4 disabled in this env → render as-is (no migrate). Safe to call on every open: each branch is cheap and the migration is single-shot.' operationId: ensure_fill_legal_research_v3__research_id__ensure_fill_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EnsureFillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/followup: get: tags: - 'Legal Research: V3 API' summary: Get Followup State description: 'READ: Get followup questions state.' operationId: get_followup_state_legal_research_v3__research_id__followup_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FollowupStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Followup description: 'COMMIT: Save followup questions with user answers.' operationId: commit_followup_legal_research_v3__research_id__followup_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitFollowupRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/followup/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Followup Suggestion description: 'GENERATE: Create followup questions and stage them.' operationId: generate_followup_suggestion_legal_research_v3__research_id__followup_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/followup/generate-additional: post: tags: - 'Legal Research: V3 API' summary: Generate Additional Followup description: 'Generate 2 additional followup questions without replacing existing ones. Returns the full question list (existing + new) so the frontend can update its local draft in one shot.' operationId: generate_additional_followup_legal_research_v3__research_id__followup_generate_additional_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CommitFollowupRequest' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/followup/draft: put: tags: - 'Legal Research: V3 API' summary: Save Followup Draft description: 'DRAFT: persist in-progress followup answers to the staged field. Autosave writes here, not to the committed ``followup`` field, so a followup the user has opened (or typed into) but not resolved stays GENERATED. That keeps abandonment distinguishable from an explicit Skip/Continue — which commit via ``PUT /followup`` — so the return-visit router can send the user back to the follow-up step instead of stranding them downstream (ENG-17652).' operationId: save_followup_draft_legal_research_v3__research_id__followup_draft_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitFollowupRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/summary: get: tags: - 'Legal Research: V3 API' summary: Get Summary State description: 'READ: Get the current summary state.' operationId: get_summary_state_legal_research_v3__research_id__summary_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SummaryStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Summary description: 'COMMIT: Save the summary.' operationId: commit_summary_legal_research_v3__research_id__summary_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitSummaryRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/summary/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Summary Step description: 'GENERATE: Create a summary from the current research state.' operationId: generate_summary_step_legal_research_v3__research_id__summary_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/summary/refresh: post: tags: - 'Legal Research: V3 API' summary: Refresh Summary description: Regenerate + commit summary with the latest research context. operationId: refresh_summary_legal_research_v3__research_id__summary_refresh_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/parties: get: tags: - 'Legal Research: V3 API' summary: Get Parties State description: 'READ: Return staged/committed parties in a symmetric shape.' operationId: get_parties_state_legal_research_v3__research_id__parties_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PartiesStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Parties Selection description: 'COMMIT: Store parties, preserving per-party IDs from the request.' operationId: commit_parties_selection_legal_research_v3__research_id__parties_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitPartiesRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/parties/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Parties Suggestion description: 'GENERATE: Identify parties and stage.' operationId: generate_parties_suggestion_legal_research_v3__research_id__parties_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/party_alignment: get: tags: - 'Legal Research: V3 API' summary: Get Party Alignment State description: 'READ: return the stored record, resolving (and persisting) it the first time it''s read. Shared with ENG-17495 WS3''s doc-generation call sites — see ``resources/party_alignment.py::get_or_resolve_party_alignment``''s own docstring.' operationId: get_party_alignment_state_legal_research_v3__research_id__party_alignment_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PartyAlignment' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Update Party Alignment description: 'COMMIT: apply user edits. Edited fields become provenance=user — sticky against every future resolution (see resources/party_alignment.py::merge_party_alignment).' operationId: update_party_alignment_legal_research_v3__research_id__party_alignment_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdatePartyAlignmentRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PartyAlignment' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/party_alignment/resolve: post: tags: - 'Legal Research: V3 API' summary: Resolve Party Alignment Endpoint description: Re-run deterministic resolution and merge into the stored record (user edits untouched). operationId: resolve_party_alignment_endpoint_legal_research_v3__research_id__party_alignment_resolve_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PartyAlignment' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/briefing: get: tags: - 'Legal Research: V3 API' summary: Get Briefing State description: 'READ: Get briefing state.' operationId: get_briefing_state_legal_research_v3__research_id__briefing_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BriefingStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Briefing description: 'COMMIT: Save title and briefing.' operationId: commit_briefing_legal_research_v3__research_id__briefing_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitBriefingRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/briefing/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Briefing Suggestion description: 'GENERATE: Create title + briefing and stage them.' operationId: generate_briefing_suggestion_legal_research_v3__research_id__briefing_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/facts-evidence: get: tags: - 'Legal Research: V3 API' summary: Get Facts And Evidence description: 'READ: the matter''s Statement of Facts + exhibits for this research.' operationId: get_facts_and_evidence_legal_research_v3__research_id__facts_evidence_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FactsEvidenceResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/statement_of_facts/{variant}: get: tags: - 'Legal Research: V3 API' summary: Get Statement Of Facts description: 'READ: one variant''s committed (selection) + staged (suggestion) paragraphs.' operationId: get_statement_of_facts_legal_research_v3__research_id__statement_of_facts__variant__get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: variant in: path required: true schema: enum: - short - extensive type: string title: Variant responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SoFStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Statement Of Facts description: 'COMMIT: persist attorney edits to one variant''s paragraphs, and demote the rest. Paragraphs have no downstream cascade, so this is the causes-of-action commit without the workflow triggers: validate, demote deselected paragraphs of this variant, write edited content, commit.' operationId: commit_statement_of_facts_legal_research_v3__research_id__statement_of_facts__variant__put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: variant in: path required: true schema: enum: - short - extensive type: string title: Variant requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitSoFRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/statement_of_facts/generate: post: tags: - 'Legal Research: V3 API' summary: Rewrite Statement Of Facts description: 'REWRITE: regenerate the selected variant, leaving every attorney-edited paragraph untouched. Uniform per variant, and one LLM call either way — the flat ``CREDIT_COSTS`` charge is honest because every Rewrite now costs the same thing. Short is re-condensed from committed Extensive (so rewriting Short also picks up edits made to Extensive); Extensive is a rewrite of its own committed prose. Extensive deliberately does NOT re-import the matter''s Timeline & Facts task. The import is seeding only: by the time this button exists the agent has authored or extended those paragraphs and the attorney may have corrected them, and re-importing would throw all of that away. That also removes the old "no linked timeline" 409 — nothing about this path needs a timeline.' operationId: rewrite_statement_of_facts_legal_research_v3__research_id__statement_of_facts_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GenerateSoFRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/statement_of_facts/{variant}/paragraph: post: tags: - 'Legal Research: V3 API' summary: Add Paragraph description: 'ADD: attorney writes a paragraph directly (no LLM), appended to the end of the document.' operationId: add_paragraph_legal_research_v3__research_id__statement_of_facts__variant__paragraph_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: variant in: path required: true schema: enum: - short - extensive type: string title: Variant requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddParagraphRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/statement_of_facts/{variant}/paragraph/{paragraph_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Paragraph description: 'DELETE: hard-remove one paragraph from one variant. Intentionally hard-deletes even a durable TIMELINE-imported paragraph — an explicit attorney delete is destructive by design, matching ``delete_coa``. The durable-preserve rule protects imports from regeneration and agent-prune (the PUT/demote paths), not from a deliberate delete.' operationId: delete_paragraph_legal_research_v3__research_id__statement_of_facts__variant__paragraph__paragraph_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: variant in: path required: true schema: enum: - short - extensive type: string title: Variant - name: paragraph_id in: path required: true schema: type: string format: uuid title: Paragraph Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/sof_exhibits/citable_documents: get: tags: - 'Legal Research: V3 API' summary: List Citable Documents description: 'READ: the documents that may be attached to a paragraph as evidence. Exactly the set POST ``/sof_exhibits`` accepts, from the same helper the fill agent''s citing paths use (``resources/citable_documents.py``) — an attach the server would reject must be unofferable, or the picker offers the attorney a button that fails.' operationId: list_citable_documents_legal_research_v3__research_id__sof_exhibits_citable_documents_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CitableDocumentsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/sof_exhibits: post: tags: - 'Legal Research: V3 API' summary: Register Sof Exhibit description: 'ADD: put a document in this research''s exhibit registry and return the letter it was given. No credit dependency, matching the paragraph-mutation routes above: this is a metadata write, not a generation. Returning the exhibit is what keeps letters server-owned. They are allocated by ``db/exhibits.py::next_exhibit_label`` and never re-lettered, so a client that guessed its own label would eventually point two documents at one letter in the attorney''s own notes. Idempotent by source rather than by call — ``register_exhibit`` reuses the letter a document+page already holds — so the client needs no dedup of its own either.' operationId: register_sof_exhibit_legal_research_v3__research_id__sof_exhibits_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RegisterExhibitRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResearchExhibit' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/cause_of_action: get: tags: - 'Legal Research: V3 API' summary: Get Coa State description: 'READ: Get cause of action state for the entire research.' operationId: get_coa_state_legal_research_v3__research_id__cause_of_action_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/COAStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Coa Selection description: 'COMMIT: Upsert selected Causes of Action (research-wide) and mark committed.' operationId: commit_coa_selection_legal_research_v3__research_id__cause_of_action_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitCOARequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/cause_of_action/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Coa Suggestion description: 'GENERATE: Identify causes of action directly from the fact pattern and stage them. The LLM analyzes across all relevant areas of law in a single call, producing unique claims each tagged with their primary area of law. No pre-committed AoLs needed.' operationId: generate_coa_suggestion_legal_research_v3__research_id__cause_of_action_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/cause_of_action/add: post: tags: - 'Legal Research: V3 API' summary: Add Coa description: 'ADD: User provides a COA name, directly committed. AoL + sub-AoLs classified automatically.' operationId: add_coa_legal_research_v3__research_id__cause_of_action_add_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddCOARequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/cause_of_action/{coa_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Coa description: 'DELETE: Remove a single committed COA and clean up orphaned children.' operationId: delete_coa_legal_research_v3__research_id__cause_of_action__coa_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/legal_authority: get: tags: - 'Legal Research: V3 API' summary: Get Authority State description: 'READ: Resolve authority keys for a CoA.' operationId: get_authority_state_legal_research_v3__research_id__coa__coa_id__legal_authority_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AuthorityStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Authority Selection description: 'COMMIT: Upsert authorities and link them to CoA.' operationId: commit_authority_selection_legal_research_v3__research_id__coa__coa_id__legal_authority_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitAuthorityRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/legal_authority/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Authority Suggestion description: 'GENERATE: Identify authorities and stage each. All items are staged with `applicability` preserved from the LLM classification. The frontend reads applicability from the GET response and auto-commits above-threshold items. On regeneration, existing committed authorities are unlinked and all new items staged.' operationId: generate_authority_suggestion_legal_research_v3__research_id__coa__coa_id__legal_authority_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/legal_authority/deep_search: post: tags: - 'Legal Research: V3 API' summary: Deep Search Authorities description: 'DEEP SEARCH: Additive deep research — directly commits net-new authorities.' operationId: deep_search_authorities_legal_research_v3__research_id__coa__coa_id__legal_authority_deep_search_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/legal_authority/add: post: tags: - 'Legal Research: V3 API' summary: Add Authority description: 'ADD: User provides authority name, AI generates details, directly committed.' operationId: add_authority_legal_research_v3__research_id__coa__coa_id__legal_authority_add_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddAuthorityRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/legal_authority/{authority_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Authority description: 'DELETE: Unlink an authority from a COA and clean up if orphaned.' operationId: delete_authority_legal_research_v3__research_id__coa__coa_id__legal_authority__authority_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: authority_id in: path required: true schema: type: string format: uuid title: Authority Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/legal_authority/search_openlaws: post: tags: - 'Legal Research: V3 API' summary: Search Openlaws description: 'SEARCH: Query OpenLaws for legal authorities matching the given query and jurisdiction.' operationId: search_openlaws_legal_research_v3__research_id__legal_authority_search_openlaws_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OpenLawsSearchRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OpenLawsSearchResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/legal_authority/{authority_id}/verify: post: tags: - 'Legal Research: V3 API' summary: Verify Authority Endpoint description: 'VERIFY: Check that an authority is current and applicable. Runs an OpenLaws currency check and an LLM applicability check in sequence, then persists the full verification result to the authority row.' operationId: verify_authority_endpoint_legal_research_v3__research_id__coa__coa_id__legal_authority__authority_id__verify_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: authority_id in: path required: true schema: type: string format: uuid title: Authority Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AuthorityVerificationResult' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/legal_authority/{authority_id}/summary: post: tags: - 'Legal Research: V3 API' summary: Regenerate Authority Summary description: 'SUMMARY: Generate or regenerate the relative summary for a committed authority.' operationId: regenerate_authority_summary_legal_research_v3__research_id__coa__coa_id__legal_authority__authority_id__summary_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: authority_id in: path required: true schema: type: string format: uuid title: Authority Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LegalAuthority' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/key_question: get: tags: - 'Legal Research: V3 API' summary: Get Key Question State description: 'READ: Resolve question keys into objects.' operationId: get_key_question_state_legal_research_v3__research_id__coa__coa_id__key_question_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/KeyQuestionStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Key Question description: 'COMMIT: Upsert questions and link to CoA.' operationId: commit_key_question_legal_research_v3__research_id__coa__coa_id__key_question_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitKeyQuestionRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/key_question/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Key Question Suggestion description: 'GENERATE: Create key questions for CoA. All items are staged with `applicability` preserved from the LLM classification. On regeneration, existing committed questions are unlinked and all new items staged.' operationId: generate_key_question_suggestion_legal_research_v3__research_id__coa__coa_id__key_question_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/key_question/add: post: tags: - 'Legal Research: V3 API' summary: Add Key Question description: 'ADD: User provides a question, directly committed and linked to COA.' operationId: add_key_question_legal_research_v3__research_id__coa__coa_id__key_question_add_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddKeyQuestionRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/key_question/{question_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Key Question description: 'DELETE: Unlink a question from a COA and clean up if orphaned.' operationId: delete_key_question_legal_research_v3__research_id__coa__coa_id__key_question__question_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/agent-status: get: tags: - 'Legal Research: V3 API' summary: Get Agent Status description: 'READ: poll the case-search agent''s live status feed for this research. Returns the rolling window of recent status lines + a `done` flag. Empty feed (agent not running / never ran) → empty messages, done=False. The Cases-page status box polls this every 1-2s while the agent works.' operationId: get_agent_status_legal_research_v3__research_id__agent_status_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentStatusSnapshot' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/cases/agent: post: tags: - 'Legal Research: V3 API' summary: Discover Cases Agent description: 'Start a matter-wide first-pass case-search agent run (manual / wizard mode). The FE fires this whenever the cases step is committed; this endpoint owns the dedup so the FE doesn''t have to. Returns 202 immediately and the Cases-page status box polls `GET /{research_id}/agent-status`. Dedup order: 1. `case_search_agent_considered_at` set → no-op (auto-flow or prior agent run already settled the matter). This is the durable ran-once guard. 2. The fixed workflow id guards in-flight duplicates only (an id colliding with a RUNNING workflow always fails). `ALLOW_DUPLICATE` — NOT `FAILED_ONLY` — so a *closed* prior run never blocks: when `considered_at` is cleared (research reset, suite re-seeding), a re-trigger must actually run again.' operationId: discover_cases_agent_legal_research_v3__research_id__cases_agent_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/cases: get: tags: - 'Legal Research: V3 API' summary: Get Cases State description: 'READ: Resolve case keys into objects for a CoA.' operationId: get_cases_state_legal_research_v3__research_id__coa__coa_id__cases_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CasesStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Cases Selection description: 'COMMIT: Upsert cases and link to CoA.' operationId: commit_cases_selection_legal_research_v3__research_id__coa__coa_id__cases_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitCasesRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/cases/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Cases Suggestion description: 'GENERATE: Start a Temporal workflow to find cases for this COA.' operationId: generate_cases_suggestion_legal_research_v3__research_id__coa__coa_id__cases_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/cases/add: post: tags: - 'Legal Research: V3 API' summary: Add Cases description: 'ADD: Directly commit cases by db_caselaw ID (bypasses staging).' operationId: add_cases_legal_research_v3__research_id__coa__coa_id__cases_add_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddCasesRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/cases/{case_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Case description: 'DELETE: Unlink a case from a COA and clean up if orphaned.' operationId: delete_case_legal_research_v3__research_id__coa__coa_id__cases__case_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: case_id in: path required: true schema: type: string format: uuid title: Case Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/cases/{case_id}/dicta/{dicta_index}: delete: tags: - 'Legal Research: V3 API' summary: Delete Dictum description: 'DELETE: Remove a single dictum from a case by index.' operationId: delete_dictum_legal_research_v3__research_id__coa__coa_id__cases__case_id__dicta__dicta_index__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: case_id in: path required: true schema: type: string format: uuid title: Case Id - name: dicta_index in: path required: true schema: type: integer title: Dicta Index responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/affirmative_defense: get: tags: - 'Legal Research: V3 API' summary: Get Ad State description: 'READ: Get affirmative defense state for a COA.' operationId: get_ad_state_legal_research_v3__research_id__coa__coa_id__affirmative_defense_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ADStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Ad Selection description: 'COMMIT: Upsert selected Affirmative Defenses and mark committed.' operationId: commit_ad_selection_legal_research_v3__research_id__coa__coa_id__affirmative_defense_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitADRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/affirmative_defense/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Ad Suggestion description: 'GENERATE: Run AI and stage with UUID. All items are staged with `applicability` preserved from the LLM classification. The frontend reads applicability from the GET response and auto-commits above-threshold items.' operationId: generate_ad_suggestion_legal_research_v3__research_id__coa__coa_id__affirmative_defense_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/affirmative_defense/add: post: tags: - 'Legal Research: V3 API' summary: Add Ad description: 'ADD SPECIFIC: User picks a defense name, AI generates the overview, directly commits.' operationId: add_ad_legal_research_v3__research_id__coa__coa_id__affirmative_defense_add_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddADRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/affirmative_defense/{ad_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Ad description: 'DELETE: Remove a single committed AD.' operationId: delete_ad_legal_research_v3__research_id__coa__coa_id__affirmative_defense__ad_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/ad/{ad_id}/legal_authority: get: tags: - 'Legal Research: V3 API' summary: Get Ad Authority State description: 'READ: Resolve authority keys for an Affirmative Defense.' operationId: get_ad_authority_state_legal_research_v3__research_id__coa__coa_id__ad__ad_id__legal_authority_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdAuthorityStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Ad Authority Selection description: 'COMMIT: Upsert authorities and link them to the AD.' operationId: commit_ad_authority_selection_legal_research_v3__research_id__coa__coa_id__ad__ad_id__legal_authority_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitAdAuthorityRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/ad/{ad_id}/legal_authority/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Ad Authority Suggestion description: 'GENERATE: Generate authorities for this AD and stage them. All items are staged with `applicability` preserved from the LLM classification. On regeneration, existing committed authorities are unlinked and all new items staged.' operationId: generate_ad_authority_suggestion_legal_research_v3__research_id__coa__coa_id__ad__ad_id__legal_authority_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/ad/{ad_id}/legal_authority/add: post: tags: - 'Legal Research: V3 API' summary: Add Ad Authority description: 'ADD: User provides authority name, AI generates details, directly committed to the AD.' operationId: add_ad_authority_legal_research_v3__research_id__coa__coa_id__ad__ad_id__legal_authority_add_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddAdAuthorityRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/ad/{ad_id}/legal_authority/{authority_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Ad Authority description: 'DELETE: Unlink an authority from an AD and clean up if orphaned.' operationId: delete_ad_authority_legal_research_v3__research_id__coa__coa_id__ad__ad_id__legal_authority__authority_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id - name: authority_id in: path required: true schema: type: string format: uuid title: Authority Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/ad/{ad_id}/legal_authority/{authority_id}/verify: post: tags: - 'Legal Research: V3 API' summary: Verify Ad Authority Endpoint description: 'VERIFY: Check that an AD authority is current and applicable.' operationId: verify_ad_authority_endpoint_legal_research_v3__research_id__coa__coa_id__ad__ad_id__legal_authority__authority_id__verify_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id - name: authority_id in: path required: true schema: type: string format: uuid title: Authority Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AuthorityVerificationResult' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/ad/{ad_id}/legal_authority/{authority_id}/summary: post: tags: - 'Legal Research: V3 API' summary: Regenerate Ad Authority Summary description: 'SUMMARY: Generate or regenerate the relative summary for a committed AD authority.' operationId: regenerate_ad_authority_summary_legal_research_v3__research_id__coa__coa_id__ad__ad_id__legal_authority__authority_id__summary_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id - name: authority_id in: path required: true schema: type: string format: uuid title: Authority Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LegalAuthority' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/subquestion: get: tags: - 'Legal Research: V3 API' summary: Get Subquestion State description: 'READ: Resolve subquestion keys into objects.' operationId: get_subquestion_state_legal_research_v3__research_id__coa__coa_id__question__question_id__subquestion_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SubQuestionStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Subquestion description: 'COMMIT: Upsert subquestions and link to Question.' operationId: commit_subquestion_legal_research_v3__research_id__coa__coa_id__question__question_id__subquestion_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitSubQuestionRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/subquestion/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Subquestion Suggestion description: 'GENERATE: Break down key question into subquestions.' operationId: generate_subquestion_suggestion_legal_research_v3__research_id__coa__coa_id__question__question_id__subquestion_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/subquestion/add: post: tags: - 'Legal Research: V3 API' summary: Add Subquestion description: 'ADD: User provides a subquestion text, directly committed.' operationId: add_subquestion_legal_research_v3__research_id__coa__coa_id__question__question_id__subquestion_add_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddSubQuestionRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/subquestion/{subquestion_id}: delete: tags: - 'Legal Research: V3 API' summary: Delete Subquestion description: 'DELETE: Unlink a subquestion and clean up if orphaned.' operationId: delete_subquestion_legal_research_v3__research_id__coa__coa_id__question__question_id__subquestion__subquestion_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id - name: subquestion_id in: path required: true schema: type: string format: uuid title: Subquestion Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/mapping/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Coa Mapping description: 'GENERATE: Run LLM and immediately commit holding-question mappings. No staging — results go directly to research_question_cases so that GET /cases reflects the updated question_mappings on next fetch.' operationId: generate_coa_mapping_legal_research_v3__research_id__coa__coa_id__mapping_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GenerateMappingRequest' responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/mapping: put: tags: - 'Legal Research: V3 API' summary: Sync Coa Mapping description: 'SYNC: Atomically replace all holding-question mappings for a COA. The payload is a flat list of (question_id, case_id, holding_id) tuples covering the entire COA. This lets the frontend apply any combination of per-holding, per-question, or per-case edits in one atomic call.' operationId: sync_coa_mapping_legal_research_v3__research_id__coa__coa_id__mapping_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SyncMappingRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/improve-coverage: post: tags: - 'Legal Research: V3 API' summary: Improve Coverage description: 'Kick off the improve-coverage agent across all CoAs (fire-and-forget). Starts `ImproveCoverageWorkflow`: per-CoA agents target red/orange criteria, commit new cases, then coverage is re-assessed. Returns 202 immediately; the frontend polls `GET /{research_id}/agent-status` for live progress.' operationId: improve_coverage_legal_research_v3__research_id__improve_coverage_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/caselaw-coverage: get: tags: - 'Legal Research: V3 API' summary: Get Caselaw Coverage description: 'READ: poll the question''s coverage-assessment run. Lazily clears the wf id on completion.' operationId: get_caselaw_coverage_legal_research_v3__research_id__coa__coa_id__question__question_id__caselaw_coverage_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CaselawCoverageResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - 'Legal Research: V3 API' summary: Generate Caselaw Coverage description: 'GENERATE: (re)run caselaw-coverage assessment for one question. No credit charge — it runs automatically (the FE fires it on not_started, and autopilot assesses the same way during FullResearch).' operationId: generate_caselaw_coverage_legal_research_v3__research_id__coa__coa_id__question__question_id__caselaw_coverage_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/analysis: get: tags: - 'Legal Research: V3 API' summary: Get Analysis State description: 'READ: Get analysis for a question (key or sub).' operationId: get_analysis_state_legal_research_v3__research_id__coa__coa_id__question__question_id__analysis_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AnalysisStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Analysis description: 'COMMIT: Save analysis on a question (key or sub).' operationId: commit_analysis_legal_research_v3__research_id__coa__coa_id__question__question_id__analysis_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommitAnalysisRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/analysis/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Analysis Suggestion description: 'GENERATE: Synthesize analysis from registry data.' operationId: generate_analysis_suggestion_legal_research_v3__research_id__coa__coa_id__question__question_id__analysis_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '201': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/retrieval: get: tags: - 'Legal Research: V3 API' summary: Get Retrieval description: Lazy-syncs the Temporal result to DB on first completion. operationId: get_retrieval_legal_research_v3__research_id__coa__coa_id__question__question_id__retrieval_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/RetrievalStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Commit Retrieval description: 'COMMIT: Insert retrieved cases into the COA pool and map their holdings to the question. Reads retrieval_staged from the question object. Existing COA cases are skipped so user-mappings are never overwritten.' operationId: commit_retrieval_legal_research_v3__research_id__coa__coa_id__question__question_id__retrieval_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/coa/{coa_id}/question/{question_id}/retrieval/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Retrieval description: Start (or restart) retrieval for a single question. Clears any previous staged result. operationId: generate_retrieval_legal_research_v3__research_id__coa__coa_id__question__question_id__retrieval_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: coa_id in: path required: true schema: type: string format: uuid title: Coa Id - name: question_id in: path required: true schema: type: string format: uuid title: Question Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/cascade-reset: post: tags: - 'Legal Research: V3 API' summary: Cascade Reset description: 'Delete all content downstream of *from_step* so the user can re-generate. For seeded researches, a global reset also re-commits seed skeletons and re-starts the enrichment workflow.' operationId: cascade_reset_legal_research_v3__research_id__cascade_reset_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CascadeResetRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CascadeResetResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/deepen/{step}: post: tags: - 'Legal Research: V3 API' summary: Start Deepen Step description: 'Start one deepen action (additive-only agent run or child-workflow invoke). Returns 202 Accepted; the FE keys its running state off ``auto_wf_id`` + the ``/deepen-progress`` feed (the deepen agent''s OWN feed, separate from the main fill''s ``/full-research-progress`` feed). ``coa_id`` scopes authorities and cases runs to one committed cause of action; improve-coverage self-scopes to its red/orange criteria research-wide and rejects ``coa_id``.' operationId: start_deepen_step_legal_research_v3__research_id__deepen__step__post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: step in: path required: true schema: $ref: '#/components/schemas/DeepenStep' - name: coa_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Coa Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/reconcile: post: tags: - 'Legal Research: V3 API' summary: Start Reconcile description: 'Start a reconcile run over the target causes of action. Returns 202 Accepted; the FE keys its running state off ``auto_wf_id`` (prefixed ``reconcile-``) and refetches the updated research when it clears. V4-only (409 for non-agentic research, like the deepen actions). 400 when nothing needs updating.' operationId: start_reconcile_legal_research_v3__research_id__reconcile_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/ReconcileRequest' - type: 'null' title: Body responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/brief/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Brief description: Start (or restart) brief generation. Regenerating replaces the previous. operationId: generate_brief_legal_research_v3_documents__research_id__brief_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BriefGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/brief: get: tags: - 'Legal Research: V3 API' summary: Get Brief Status description: Return brief status; lazily syncs Temporal result into DB on first completed poll. operationId: get_brief_status_legal_research_v3_documents__research_id__brief_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BriefStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/complaint/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Complaint description: Start (or restart) complaint generation. Regenerating replaces the previous. operationId: generate_complaint_legal_research_v3_documents__research_id__complaint_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ComplaintGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/complaint: get: tags: - 'Legal Research: V3 API' summary: Get Complaint Status description: Return complaint status; lazily syncs Temporal result into DB on first completed poll. operationId: get_complaint_status_legal_research_v3_documents__research_id__complaint_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ComplaintStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/memo/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Memo description: Start (or restart) memo generation. Regenerating replaces the previous. operationId: generate_memo_legal_research_v3_documents__research_id__memo_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MemoGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/memo: get: tags: - 'Legal Research: V3 API' summary: Get Memo Status description: Return memo status; lazily syncs Temporal result into DB on first completed poll. operationId: get_memo_status_legal_research_v3_documents__research_id__memo_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MemoStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/motion/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Motion description: Start (or restart) motion generation. Regenerating replaces the previous. operationId: generate_motion_legal_research_v3__research_id__motion_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MotionGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/motion: get: tags: - 'Legal Research: V3 API' summary: Get Motion Status description: Return motion status; lazily syncs Temporal result into DB on first completed poll. operationId: get_motion_status_legal_research_v3__research_id__motion_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MotionStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/overview_pdf/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Overview Pdf description: Start (or restart) overview PDF generation. Regenerating replaces the previous. operationId: generate_overview_pdf_legal_research_v3_documents__research_id__overview_pdf_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/overview_pdf: get: tags: - 'Legal Research: V3 API' summary: Get Overview Pdf Status description: Return overview PDF status; lazily syncs Temporal result into DB on first completed poll. operationId: get_overview_pdf_status_legal_research_v3_documents__research_id__overview_pdf_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OverviewPDFStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/msj: get: tags: - 'Legal Research: V3 API' summary: Get Msj Status description: Return MSJ status; lazily syncs Temporal result into DB on first completed poll. operationId: get_msj_status_legal_research_v3_documents__research_id__msj_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MSJStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/mtd: get: tags: - 'Legal Research: V3 API' summary: Get Mtd Status description: Return MTD status; lazily syncs Temporal result into DB on first completed poll. operationId: get_mtd_status_legal_research_v3_documents__research_id__mtd_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MTDStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/demand_letter_document/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Demand Letter One Click description: Start (or restart) demand letter one-click generation. Regenerating replaces the previous. operationId: generate_demand_letter_one_click_legal_research_v3__research_id__demand_letter_document_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DemandLetterGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/demand_letter_document: get: tags: - 'Legal Research: V3 API' summary: Get Demand Letter Status description: Return demand letter status; lazily syncs Temporal result into DB on first completed poll. operationId: get_demand_letter_status_legal_research_v3__research_id__demand_letter_document_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DemandLetterStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/motion_in_limine/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Motion In Limine description: Start (or restart) Motion in Limine generation. Regenerating replaces the previous. operationId: generate_motion_in_limine_legal_research_v3_documents__research_id__motion_in_limine_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MILGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/motion_in_limine: get: tags: - 'Legal Research: V3 API' summary: Get Motion In Limine Status description: Return Motion in Limine status; lazily syncs Temporal result into DB on first completed poll. operationId: get_motion_in_limine_status_legal_research_v3_documents__research_id__motion_in_limine_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MILDocumentInfo' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/motion_to_strike/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Motion To Strike description: Start (or restart) Motion to Strike generation. Regenerating replaces the previous. operationId: generate_motion_to_strike_legal_research_v3_documents__research_id__motion_to_strike_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MTSGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/motion_to_strike: get: tags: - 'Legal Research: V3 API' summary: Get Motion To Strike Status description: Return Motion to Strike status; lazily syncs Temporal result into DB on first completed poll. operationId: get_motion_to_strike_status_legal_research_v3_documents__research_id__motion_to_strike_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MTSDocumentInfo' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/pi_motion/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Pi Motion description: Start (or restart) PI motion generation. Regenerating replaces the previous. operationId: generate_pi_motion_legal_research_v3_documents__research_id__pi_motion_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PiMotionGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/pi_motion: get: tags: - 'Legal Research: V3 API' summary: Get Pi Motion Status description: Return PI motion status; lazily syncs Temporal result into DB on first completed poll. operationId: get_pi_motion_status_legal_research_v3_documents__research_id__pi_motion_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PiMotionStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/appellate_brief/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Appellate Brief description: Start (or restart) appellate brief generation. Regenerating replaces the previous. operationId: generate_appellate_brief_legal_research_v3_documents__research_id__appellate_brief_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AppellateBriefGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/appellate_brief: get: tags: - 'Legal Research: V3 API' summary: Get Appellate Brief Status description: Return appellate brief status; lazily syncs Temporal result into DB on first completed poll. operationId: get_appellate_brief_status_legal_research_v3_documents__research_id__appellate_brief_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AppellateBriefStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/mtd_filing/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Mtd Filing description: 'Start (or restart) motion-to-dismiss filing generation (one document: notice of motion + memorandum). Regenerating replaces the previous.' operationId: generate_mtd_filing_legal_research_v3_documents__research_id__mtd_filing_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MtdFilingGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/mtd_filing: get: tags: - 'Legal Research: V3 API' summary: Get Mtd Filing Status description: Return motion-to-dismiss filing status; lazily syncs Temporal result into DB on first completed poll. operationId: get_mtd_filing_status_legal_research_v3_documents__research_id__mtd_filing_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MtdFilingStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/msj_filing/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Msj Filing description: 'Start (or restart) summary-judgment filing generation (one document: notice of motion + memorandum). Regenerating replaces the previous.' operationId: generate_msj_filing_legal_research_v3_documents__research_id__msj_filing_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MsjFilingGenerateRequest' responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/msj_filing: get: tags: - 'Legal Research: V3 API' summary: Get Msj Filing Status description: Return summary-judgment filing status; lazily syncs Temporal result into DB on first completed poll. operationId: get_msj_filing_status_legal_research_v3_documents__research_id__msj_filing_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MsjFilingStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/demand_letter/demands/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Demands description: Generate a list of structured demands derived from the research context. operationId: generate_demands_legal_research_v3__research_id__demand_letter_demands_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DemandLetterDemandsRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DemandSuggestions' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/demand_letter/letter/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Letter description: Stream a full demand letter. operationId: generate_letter_legal_research_v3__research_id__demand_letter_letter_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DemandLetterLetterRequest' responses: '200': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/{doc_type}/plan: get: tags: - 'Legal Research: V3 API' summary: Get Plan description: 'READ: the plan''s committed sections (selection) and any staged suggestion, position-ordered.' operationId: get_plan_legal_research_v3_documents__research_id___doc_type__plan_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: doc_type in: path required: true schema: $ref: '#/components/schemas/GeneratedDocumentType' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PlanStepResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/{doc_type}/plan/sections/{section_id}: put: tags: - 'Legal Research: V3 API' summary: Edit Section description: 'COMMIT: manual edit — writes status=committed, source=manual directly (bypasses staging).' operationId: edit_section_legal_research_v3_documents__research_id___doc_type__plan_sections__section_id__put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: doc_type in: path required: true schema: $ref: '#/components/schemas/GeneratedDocumentType' - name: section_id in: path required: true schema: type: string format: uuid title: Section Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SectionEditRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DocumentSectionModel' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/{doc_type}/plan/sections/{section_id}/regenerate: post: tags: - 'Legal Research: V3 API' summary: Regenerate Section description: 'Stage a fresh redraft of one section. Approved default is staged-until-accepted; accept via the PUT above (commit_section already evicts the superseded committed row).' operationId: regenerate_section_legal_research_v3_documents__research_id___doc_type__plan_sections__section_id__regenerate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: doc_type in: path required: true schema: $ref: '#/components/schemas/GeneratedDocumentType' - name: section_id in: path required: true schema: type: string format: uuid title: Section Id responses: '202': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/{doc_type}/pregeneration_warnings: get: tags: - 'Legal Research: V3 API' summary: Get Pregeneration Warnings description: 'Non-blocking warnings for the (research, doc_type) pair the setup modal is about to draft. Computed fresh every call, not persisted -- see pregeneration_warnings.py''s producer registry for why (deliberately non-blocking, no state of its own to go stale).' operationId: get_pregeneration_warnings_legal_research_v3_documents__research_id___doc_type__pregeneration_warnings_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: doc_type in: path required: true schema: $ref: '#/components/schemas/GeneratedDocumentType' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PreGenerationWarningsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/{research_id}/filing_court/resolve: post: tags: - 'Legal Research: V3 API' summary: Resolve Filing Court Endpoint description: 'Determine the court when the research names none, and keep it (ENG-22987). The form calls this once when its Filing court auto-fills empty: the intake complaint''s caption is read, then the record itself, and the answer is stored as ``resolved_court`` for the form to show and the run to use. A research that already holds a court answers from it without a call.' operationId: resolve_filing_court_endpoint_legal_research_v3_documents__research_id__filing_court_resolve_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FilingCourtResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/chat_context: get: tags: - 'Legal Research: V3 API' summary: Get Chat Context description: Return formatted research context markdown for Smart Bot injection. operationId: get_chat_context_legal_research_v3__research_id__chat_context_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResearchChatContextResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/research_chat: get: tags: - 'Legal Research: V3 API' summary: Get Research Chat description: Fetch the conversation and all messages for a research. operationId: get_research_chat_legal_research_v3__research_id__research_chat_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ChatConversationRead' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - 'Legal Research: V3 API' summary: Clear Research Chat description: Delete the conversation and all messages, returning an empty shell. operationId: clear_research_chat_legal_research_v3__research_id__research_chat_delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ChatConversationRead' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/research_chat/send: post: tags: - 'Legal Research: V3 API' summary: Send Chat Message description: Send a message and stream the AI response via SSE. operationId: send_chat_message_legal_research_v3__research_id__research_chat_send_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatSendRequest' responses: '200': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/email/generate: post: tags: - 'Legal Research: V3 API' summary: Generate Email description: Generate a client email from the research context and form parameters. operationId: generate_email_legal_research_v3__research_id__email_generate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmailGenerateRequest' responses: '200': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/email/draft: get: tags: - 'Legal Research: V3 API' summary: Get Email Draft Endpoint description: 'Return the last Custom Email this research generated, for restoring into the wizard. The Custom Email deliberately has no ``generated_documents`` row and so no "Your Drafts" entry (it is a message to copy out, not a document to file, edit in Draft Studio, or export). This is where its work survives instead — see ``ResearchEmailDraft``''s own docstring.' operationId: get_email_draft_endpoint_legal_research_v3__research_id__email_draft_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EmailDraftResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Save Email Draft Endpoint description: Save (replacing any prior) the research's Custom Email draft. operationId: save_email_draft_endpoint_legal_research_v3__research_id__email_draft_put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmailDraftSaveRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EmailDraftResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/email/adjust: post: tags: - 'Legal Research: V3 API' summary: Adjust Email description: Revise a previously generated email based on the lawyer's feedback. operationId: adjust_email_legal_research_v3__research_id__email_adjust_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmailAdjustRequest' responses: '200': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/wizard-draft/{kind}: get: tags: - 'Legal Research: V3 API' summary: Get Wizard Draft Endpoint description: 'Return the last draft this wizard generated, for restoring into the dialog on reopen. ``kind`` is typed as the enum, so an unknown wizard is a 422 from FastAPI''s own validation rather than a silently-empty response that would look like "nothing saved yet".' operationId: get_wizard_draft_endpoint_legal_research_v3__research_id__wizard_draft__kind__get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: kind in: path required: true schema: $ref: '#/components/schemas/WizardDraftKind' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/WizardDraftResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - 'Legal Research: V3 API' summary: Save Wizard Draft Endpoint description: Save (replacing any prior) this wizard's draft for the research. operationId: save_wizard_draft_endpoint_legal_research_v3__research_id__wizard_draft__kind__put parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: kind in: path required: true schema: $ref: '#/components/schemas/WizardDraftKind' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WizardDraftSaveRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/WizardDraftResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/score: post: tags: - 'Legal Research: V3 API' summary: Score Endpoint description: Score draft content and return a structured scorecard. operationId: score_endpoint_legal_research_v3__research_id__draft_score_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScoreRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ScoreResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/improve: post: tags: - 'Legal Research: V3 API' summary: Improve Endpoint description: Run one or more improvement agents and return proposed draft content. operationId: improve_endpoint_legal_research_v3__research_id__draft_improve_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ImproveRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ImproveResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/improve/async: post: tags: - 'Legal Research: V3 API' summary: Improve Async Start Endpoint description: 'Start improve in the background; poll GET .../improve/jobs/{job_id} for the result. Prefer this over sync POST /improve for long briefs — avoids gateway 504 / client 499. Sync POST /improve remains available unchanged.' operationId: improve_async_start_endpoint_legal_research_v3__research_id__draft_improve_async_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ImproveRequest' responses: '202': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ImproveAsyncStartResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/improve/jobs/{job_id}: get: tags: - 'Legal Research: V3 API' summary: Improve Job Status Endpoint description: Poll async improve job status / proposed markdown. operationId: improve_job_status_endpoint_legal_research_v3__research_id__draft_improve_jobs__job_id__get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - name: job_id in: path required: true schema: type: string format: uuid title: Job Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ImproveJobStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/citation-check: post: tags: - 'Legal Research: V3 API' summary: Citation Check Endpoint description: Check draft citations and return validation results. operationId: citation_check_endpoint_legal_research_v3__research_id__draft_citation_check_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CitationCheckRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CitationCheckResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/verify-case-citations: post: tags: - 'Legal Research: V3 API' summary: Verify Case Citations Endpoint description: 'Verify case-law cites in a Fast Draft against db_caselaw (fail-closed). Checks existence and whether each cite supports the draft''s attributed proposition. Full Research sessions are rejected — they already use the deep case-search path and formatting citation-check; this endpoint is Fast Draft only.' operationId: verify_case_citations_endpoint_legal_research_v3__research_id__draft_verify_case_citations_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VerifyCaseCitationsRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VerifyCaseCitationsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/missing-details: post: tags: - 'Legal Research: V3 API' summary: Missing Details Endpoint description: Detect missing factual or procedural details in the draft. operationId: missing_details_endpoint_legal_research_v3__research_id__draft_missing_details_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MissingDetailsRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MissingDetailsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/save: post: tags: - 'Legal Research: V3 API' summary: Save Draft Endpoint description: Persist edited HTML as a completed draft document. operationId: save_draft_endpoint_legal_research_v3__research_id__draft_save_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/app__modules__legal_research__api__drafting_studio__SaveDraftRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SaveDraftResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/export-pdf: post: tags: - 'Legal Research: V3 API' summary: Export Pdf Endpoint description: Export a completed draft as PDF and return a download URL. operationId: export_pdf_endpoint_legal_research_v3__research_id__draft_export_pdf_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExportPdfRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExportPdfResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/export-docx: post: tags: - 'Legal Research: V3 API' summary: Export Docx Endpoint description: Export a completed draft as DOCX without the Studio legal-advisory cover page. operationId: export_docx_endpoint_legal_research_v3__research_id__draft_export_docx_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExportDocxRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExportDocxResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/preview-html: post: tags: - 'Legal Research: V3 API' summary: Preview Html Endpoint description: Convert a completed draft DOCX to HTML for Draft Studio (Aspose, richer than Mammoth). operationId: preview_html_endpoint_legal_research_v3__research_id__draft_preview_html_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PreviewHtmlRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PreviewHtmlResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/rename: post: tags: - 'Legal Research: V3 API' summary: Rename Draft Endpoint description: Rename a draft document title. operationId: rename_draft_endpoint_legal_research_v3__research_id__draft_rename_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RenameRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/RenameResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/duplicate: post: tags: - 'Legal Research: V3 API' summary: Duplicate Draft Endpoint description: Duplicate a completed draft and return metadata for the copy. operationId: duplicate_draft_endpoint_legal_research_v3__research_id__draft_duplicate_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DuplicateRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DuplicateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/draft/remove: post: tags: - 'Legal Research: V3 API' summary: Remove Draft Endpoint description: Remove a draft document record from the research. operationId: remove_draft_endpoint_legal_research_v3__research_id__draft_remove_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RemoveRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/RemoveResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/drafts: get: tags: - 'Legal Research: V3 API' summary: List Drafts Endpoint description: List all generated drafts for a research (newest first), including prior versions. operationId: list_drafts_endpoint_legal_research_v3__research_id__drafts_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/app__modules__legal_research__api__drafting_studio__DraftListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/save-task-memory: post: tags: - 'Legal Research: V3 API' summary: Save Lr Task Memory Endpoint description: 'Save the current research state as a TASK_MEMORY doc in doc hub. Called by the frontend when the user reaches the overview page after completing research steps. Triggers the standard downstream pipeline (INGEST → TASK_MEMORY_SYNTHESIS → matter memory regen).' operationId: save_lr_task_memory_endpoint_legal_research_v3__research_id__save_task_memory_post parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SaveTaskMemoryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/document/{document_id}/intake: get: tags: - 'Legal Research: V3 API' summary: Get Document Intake description: 'Poll for intake fields extracted from an uploaded document. Checks for a guided artifact first (from user-provided guidance), then falls back to the canonical auto-triggered artifact.' operationId: get_document_intake_legal_research_v3_document__document_id__intake_get 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/DocumentIntakeResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - 'Legal Research: V3 API' summary: Post Document Intake description: 'Store user guidance and trigger re-processing via the same Temporal pipeline. The guidance is stored as an ``LR_INTAKE_GUIDANCE`` manifest artifact. The Temporal activity reads it, runs analysis with guidance, and stores the result in a separate GUIDED artifact slot (preserving the canonical artifact).' operationId: post_document_intake_legal_research_v3_document__document_id__intake_post 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/IntakeGuidanceRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DocumentIntakeResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/documents/intake-parties: post: tags: - 'Legal Research: V3 API' summary: Extract Intake Parties description: 'Extract parties-with-roles from the uploaded intake documents'' combined text. Runs the form filler once over the documents (the same engine that populates parties on the matter intake path), so the intake form can prefill parties for a document-upload research with no linked matter. One pass over the aggregated text reconciles the same party referred to differently across documents.' operationId: extract_intake_parties_legal_research_v3_documents_intake_parties_post requestBody: content: application/json: schema: $ref: '#/components/schemas/ExtractIntakePartiesRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractIntakePartiesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/matter/{matter_id}/complaint-causes: get: tags: - 'Legal Research: V3 API' summary: Get Matter Complaint Causes description: 'Poll for the operative complaint''s causes of action to prefill LR intake. Selects the best complaint on the matter, then reads its parsed causes from the case-context artifact — enqueuing on-demand extraction and reporting GENERATING when the artifact isn''t ready yet (the FE keeps polling, and drops silently on its own deadline). Returns COMPLETED with an empty result when the matter has no complaint.' operationId: get_matter_complaint_causes_legal_research_v3_matter__matter_id__complaint_causes_get parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MatterComplaintCausesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/documents: get: tags: - 'Legal Research: V3 API' summary: List Research Documents description: List all source documents linked to this research. operationId: list_research_documents_legal_research_v3__research_id__documents_get parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResearchDocumentsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /legal_research/v3/{research_id}/documents/{document_id}: delete: tags: - 'Legal Research: V3 API' summary: Unlink Research Document description: Remove a document from this research (unlink, not delete). operationId: unlink_research_document_legal_research_v3__research_id__documents__document_id__delete parameters: - name: research_id in: path required: true schema: type: string format: uuid title: Research Id - 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' components: schemas: AuthorityVerificationStatus: type: string enum: - pending - failed - valid - outdated - not_found - unverifiable title: AuthorityVerificationStatus GeneratedDocumentType: type: string enum: - brief - complaint - memo - motion - overview_pdf - msj_motion - msj_mpa - mtd_motion - mtd_mpa - demand_letter - mil_motion - mts_motion - pi_motion - appellate_brief - mtd_filing - msj_filing title: GeneratedDocumentType description: 'Write-side constraint for ``generated_documents.document_type`` (ENG-17017 item 22). The column itself stays free text (no DB enum, no migration) — this only closes off the write sites so a typo can''t silently open a new bucket. Values are exact, byte-for-byte matches of the strings already persisted; do NOT rename/renumber members, that would orphan existing rows. Distinct from ``DraftDocumentType`` above (an intake *intent*, e.g. its DEMAND_LETTER spells "demand-letter-document") and from the unrelated ``DocumentType`` in ``intake.document_analysis.types`` (input-document classification).' RelevantHolding: properties: db_ids: $ref: '#/components/schemas/HoldingDbIds' holding: type: string title: Holding generalized_holding: type: string title: Generalized Holding contextual_similarity: $ref: '#/components/schemas/ContextualSimilarity' legal_similarity: $ref: '#/components/schemas/LegalSimilarity' citation_score: type: number title: Citation Score is_slip: type: boolean title: Is Slip default: false llm_relevance: $ref: '#/components/schemas/RelevanceLevel' default: Unknown type: object required: - db_ids - holding - generalized_holding - contextual_similarity - legal_similarity - citation_score title: RelevantHolding RetrievalStepResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' holdings: anyOf: - items: $ref: '#/components/schemas/RelevantHolding' type: array - type: 'null' title: Holdings error: anyOf: - type: string - type: 'null' title: Error type: object required: - status title: RetrievalStepResponse SeedParty: properties: full_name: type: string title: Full Name party_group: $ref: '#/components/schemas/PartyGroup' default: other roles: items: type: string type: array title: Roles involvement: type: string title: Involvement default: '' type: object required: - full_name title: SeedParty ResearchCompletionReport: properties: complete: type: boolean title: Complete blocking_gaps: items: $ref: '#/components/schemas/CompletionGap' type: array title: Blocking Gaps warnings: items: $ref: '#/components/schemas/CompletionGap' type: array title: Warnings checked_at: type: string format: date-time title: Checked At type: object required: - complete - checked_at title: ResearchCompletionReport description: Whole-research completeness verdict. In-memory only (not persisted). Formality: type: string enum: - casual - informal - formal - highly_formal title: Formality CommitSubQuestionRequest: properties: subquestions: items: $ref: '#/components/schemas/CommitSubQuestionItem' type: array title: Subquestions type: object required: - subquestions title: CommitSubQuestionRequest CommitKeyQuestionRequest: properties: questions: items: $ref: '#/components/schemas/CommitKeyQuestionItem' type: array minItems: 1 title: Questions type: object required: - questions title: CommitKeyQuestionRequest ChatMessageRole: type: string enum: - user - assistant title: ChatMessageRole ImproveJobStatusResponse: properties: job_id: type: string title: Job Id status: type: string enum: - generating - completed - failed title: Status proposed_content: anyOf: - type: string - type: 'null' title: Proposed Content error: anyOf: - type: string - type: 'null' title: Error type: object required: - job_id - status title: ImproveJobStatusResponse ResearchProgressEvent: properties: phase: type: string title: Phase status: type: string enum: - started - completed - error title: Status detail: anyOf: - type: string - type: 'null' title: Detail section_id: anyOf: - type: string format: uuid - type: 'null' title: Section Id section_status: anyOf: - type: string enum: - started - drafted - revised - type: 'null' title: Section Status type: object required: - phase - status title: ResearchProgressEvent description: 'One phase transition published by the workflow. `section_id`/`section_status` are additive (ENG-17626): only `publish_section` sets them. Every pre-existing document-level event leaves them absent, so a reader that only looks at phase/status/detail is unaffected by their presence.' SoFStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitSoFRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitSoFRequest' - type: 'null' provenance: anyOf: - $ref: '#/components/schemas/SoFImportResult' - type: 'null' exhibits: items: $ref: '#/components/schemas/ResearchExhibit' type: array title: Exhibits type: object required: - status - suggestion - selection title: SoFStepResponse MsjFilingGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id answer_document_id: anyOf: - type: string format: uuid - type: 'null' title: Answer Document Id mtd_ruling_document_id: anyOf: - type: string format: uuid - type: 'null' title: Mtd Ruling Document Id record: anyOf: - items: $ref: '#/components/schemas/RecordDesignation' type: array - type: 'null' title: Record complaint_document_id: anyOf: - type: string format: uuid - type: 'null' title: Complaint Document Id type: object title: MsjFilingGenerateRequest CommitBriefingRequest: properties: title: type: string minLength: 1 title: Title briefing: $ref: '#/components/schemas/Briefing' type: object required: - title - briefing title: CommitBriefingRequest SlipIdentity: properties: docket_number: type: string title: Docket Number court_citation_string: type: string title: Court Citation String default: '' date_filed: anyOf: - type: string format: date - type: 'null' title: Date Filed year_filed: anyOf: - type: integer - type: 'null' title: Year Filed type: object required: - docket_number title: SlipIdentity description: 'Docket-form identity — the slip opinion''s analogue of volume/reporter/page. Render data only. `is_citationless` stays the authority on what a slip *is*, so a producer that never populates this degrades to the case name rather than silently reclassifying the case.' ResearchProgressSnapshot: properties: events: items: $ref: '#/components/schemas/ResearchProgressEvent' type: array title: Events done: type: boolean title: Done terminal_status: anyOf: - type: string - type: 'null' title: Terminal Status milestones: anyOf: - $ref: '#/components/schemas/ResearchMilestones' - type: 'null' type: object required: - events - done title: ResearchProgressSnapshot description: 'What the polling endpoint returns: the full event log + done flag. ``terminal_status`` is additive: None until the run marks done, then "done" (legacy "1") or "failed". A reader that only checks ``done`` is unaffected — a failed run still sets done=true so the polling client stops; the status merely lets a caller distinguish success from failure.' FactsEvidenceFact: properties: index: type: integer title: Index text: type: string title: Text exhibit_labels: items: type: string type: array title: Exhibit Labels type: object required: - index - text title: FactsEvidenceFact description: A single numbered fact and the exhibit label(s) it cites. PartyToFavor: type: string enum: - Plaintiff - Defendant - Appellant - Appellee - Prosecution - None title: PartyToFavor description: 'The advocacy framing value for a research — every representable intake role, not a trial side. One member per representable ``STANDARD_PARTY_ROLES`` entry (party_role.py''s ``to_party_to_favor`` maps roster labels here). Trial-side-only consumers (captions, the Case Timeline anchor) must use ``trial_side_label`` instead of narrowing this enum.' AvailableCase: properties: case_id: type: string format: uuid title: Case Id case_name: type: string title: Case Name citation: type: string title: Citation holdings: items: $ref: '#/components/schemas/AvailableHolding' type: array title: Holdings type: object required: - case_id - case_name - citation - holdings title: AvailableCase PreGenerationWarning: properties: code: type: string title: Code message: type: string title: Message type: object required: - code - message title: PreGenerationWarning description: 'One non-blocking defect surfaced before a generation is spent. ``code`` is the stable per-producer identifier the FE keys UI/tests off of; ``message`` is the human-readable copy rendered verbatim in the setup modal''s banner.' FollowupQuestions-Output: properties: questions: items: $ref: '#/components/schemas/FollowupQuestion' type: array title: Questions type: object required: - questions title: FollowupQuestions MTSGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id what_is_struck: anyOf: - type: string maxLength: 2000 - type: 'null' title: What Is Struck complaint_document_id: anyOf: - type: string format: uuid - type: 'null' title: Complaint Document Id type: object title: MTSGenerateRequest description: 'Optional pleading document. A Rule 12(f) motion targets specific matter IN a pleading (contrast MILGenerateRequest, which has none: MIL targets anticipated trial evidence, not a pleading).' CommitSoFRequest: properties: paragraphs: items: $ref: '#/components/schemas/SoFParagraphItem' type: array minItems: 1 title: Paragraphs type: object required: - paragraphs title: CommitSoFRequest OverviewBundleResponse: properties: coa: additionalProperties: $ref: '#/components/schemas/CoaSlice' propertyNames: format: uuid type: object title: Coa completion: $ref: '#/components/schemas/ResearchCompletionReport' type: object required: - coa - completion title: OverviewBundleResponse DemandLetterDemandsRequest: properties: demander: $ref: '#/components/schemas/ContactInformation' sender: $ref: '#/components/schemas/ContactInformation' recipient: $ref: '#/components/schemas/ContactInformation' tone: $ref: '#/components/schemas/DemandLetterTone' default: assertive length: $ref: '#/components/schemas/DemandLetterLength' default: extensive custom_instructions: type: string title: Custom Instructions default: '' damages_info: type: string title: Damages Info default: '' additional_background: type: string title: Additional Background default: '' type: object title: DemandLetterDemandsRequest ExtractedIntakeParty: properties: name: type: string title: Name default: '' roles: items: type: string type: array title: Roles description: type: string title: Description default: '' type: object title: ExtractedIntakeParty description: 'A party pulled from uploaded intake documents, in the intake-form structure. ``roles`` is a list because an appellate party carries both its trial-side role and its appellate designation ("Defendant-Appellant" → both); each entry is a STANDARD_PARTY_ROLES value.' ChatConversationRead: properties: id: type: string format: uuid title: Id research_id: type: string format: uuid title: Research Id messages: items: $ref: '#/components/schemas/ChatMessageRead' type: array title: Messages created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At type: object required: - id - research_id - messages title: ChatConversationRead WizardDraftSaveRequest: properties: content: type: string maxLength: 400000 minLength: 1 title: Content form: additionalProperties: true type: object title: Form type: object required: - content title: WizardDraftSaveRequest description: 'The wizard''s current state: what it is showing, and the inputs that produced it.' ProvisionType: type: string enum: - Cause of Action - Rights - Limitation - Remedies - Liability - Damages - Procedure - Other title: ProvisionType PlanStepResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' posture: anyOf: - type: string - type: 'null' title: Posture suggestion: items: $ref: '#/components/schemas/DocumentSectionModel' type: array title: Suggestion selection: items: $ref: '#/components/schemas/DocumentSectionModel' type: array title: Selection type: object required: - status - suggestion - selection title: PlanStepResponse description: 'Step-convention shape (contract spec §3): selection = committed, suggestion = staged.' CaselawCoverageResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' type: object required: - status title: CaselawCoverageResponse description: 'Lifecycle status of a question''s caselaw-coverage assessment. The per-criterion support is read from the analysis; this only reports whether an assessment is running / done.' CommitAdAuthorityRequest: properties: authorities: items: $ref: '#/components/schemas/CommitAdAuthorityItem' type: array title: Authorities type: object title: CommitAdAuthorityRequest ReligiousLawSubAreasEnum: type: string enum: - Islamic Law - Jewish Law - Indigenous and Tribal Religious Laws - Canon Law - Sikh Law - Hindu Law - Buddhist Law title: ReligiousLawSubAreasEnum SourceType: type: string enum: - matter_portal title: SourceType LegalQuestion: properties: question: type: string title: Question question_label: type: string title: Question Label evaluation_criteria: items: $ref: '#/components/schemas/EvaluationCriterion' type: array title: Evaluation Criteria analysis: anyOf: - $ref: '#/components/schemas/QuestionAnalysis' - type: 'null' analysis_staged: anyOf: - $ref: '#/components/schemas/QuestionAnalysis' - type: 'null' applicability: anyOf: - $ref: '#/components/schemas/ApplicabilityLevel' - type: 'null' subquestion_keys: items: type: string format: uuid type: array title: Subquestion Keys holding_keys: additionalProperties: items: type: string format: uuid type: array propertyNames: format: uuid type: object title: Holding Keys retrieval_staged: anyOf: - items: $ref: '#/components/schemas/RelevantHolding' type: array - type: 'null' title: Retrieval Staged retrieval_workflow_id: anyOf: - type: string - type: 'null' title: Retrieval Workflow Id coverage_workflow_id: anyOf: - type: string - type: 'null' title: Coverage Workflow Id type: object required: - question - question_label title: LegalQuestion ScoreRequest: properties: document_key: type: string title: Document Key draft_content: type: string title: Draft Content default: '' type: object required: - document_key title: ScoreRequest DuplicateResponse: properties: status: type: string title: Status new_document_key: type: string title: New Document Key new_title: type: string title: New Title download_url: anyOf: - type: string - type: 'null' title: Download Url document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id type: object required: - status - new_document_key - new_title title: DuplicateResponse FollowupQuestion: properties: question: type: string title: Question answer: type: string title: Answer default: '' excluded: type: boolean title: Excluded default: false type: object required: - question title: FollowupQuestion LegalSimilarity: properties: coa_sim: type: number title: Coa Sim question_sim: type: number title: Question Sim default: 0 klq_generalized_holding_sim: type: number title: Klq Generalized Holding Sim default: 0 legal_similarity: type: number title: Legal Similarity default: 0 type: object required: - coa_sim title: LegalSimilarity CaseStage: type: string enum: - motion_to_dismiss - preliminary_injunction - summary_judgment - motion_in_limine - motion_to_strike - other_pretrial - trial - post_trial - other - unknown title: CaseStage description: 'The procedural vehicle whose standard the court applied in the ruling this case is cited for. An appellate opinion carries the stage of the ruling it *reviews* — an affirmed summary-judgment grant is SUMMARY_JUDGMENT — because the value of the label is that a drafting attorney can ask for authority decided under the standard they are briefing.' ResearchExhibit: properties: label: type: string title: Label document_id: anyOf: - type: string - type: 'null' title: Document Id filename: anyOf: - type: string - type: 'null' title: Filename page: anyOf: - type: integer - type: 'null' title: Page bates_number: anyOf: - type: string - type: 'null' title: Bates Number quote: anyOf: - type: string - type: 'null' title: Quote type: object required: - label title: ResearchExhibit description: "What one exhibit letter points to, for one research — the registry entry behind ``(Ex. A)``.\n\nLetters are per-research, never per-variant: Short inherits exactly the letters Extensive\nestablished. They are also never re-lettered. A matter with a Timeline & Facts task already has\na master exhibit set the attorney's notes and deposition outlines reference, so imported letters\nare preserved verbatim and gaps (citing A, D, G out of a master set) are correct — silently\nrenumbering the same document is the defect.\n\nCovers both provenances, matching the shape discovery's per-version ``exhibits`` JSONB already\nuses so the import is a copy rather than a translation:\n- a formal eDiscovery exhibit imported from the Timeline task (``filename``/``page``/\n ``bates_number``, no doc-hub id);\n- a matter document the fill agent pulled from the record (``document_id`` so the UI can open it,\n plus the supporting ``quote``)." LegalParty: properties: full_name: type: string title: Full Name description: Full legal name. short_name: type: string title: Short Name description: Shortened name for narrative document text. defined_term: type: string title: Defined Term description: Defined term for this party. involvement: type: string title: Involvement description: One sentence describing who they are and their involvement. entity_description: anyOf: - type: string - type: 'null' title: Entity Description description: How the party is characterized in the caption, exactly as the source pleading states it — e.g. 'an individual', 'a Delaware corporation', 'a California limited liability company'. Null unless a source document states it. Never infer the entity type or the state of organization from the party's name. roles: items: type: string type: array title: Roles description: Legal roles in the matter. type: object required: - full_name - short_name - defined_term - involvement title: LegalParty UpsertPromptOverrideRequest: properties: prompt_text: type: string minLength: 1 title: Prompt Text is_active: type: boolean title: Is Active default: true type: object required: - prompt_text title: UpsertPromptOverrideRequest DemandLetterTone: type: string enum: - formal - assertive - conciliatory title: DemandLetterTone AddCasesRequest: properties: db_caselaw_case_ids: items: type: string format: uuid type: array title: Db Caselaw Case Ids description: The db_caselaw ids of the cases to add. type: object required: - db_caselaw_case_ids title: AddCasesRequest SeedQuestion: properties: question: type: string title: Question question_label: type: string title: Question Label default: '' type: object required: - question title: SeedQuestion AppellateBriefStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: AppellateBriefStatusResponse ContactEntity: properties: is_organization: type: boolean title: Is Organization default: false first_names: type: string title: First Names default: '' last_name: type: string title: Last Name default: '' organization_name: type: string title: Organization Name default: '' designation: type: string title: Designation default: '' title: type: string title: Title default: '' type: object title: ContactEntity SoFParagraph: properties: variant: type: string enum: - short - extensive title: Variant text: type: string title: Text persuasive_text: type: string title: Persuasive Text default: '' exhibit_labels: items: type: string type: array title: Exhibit Labels favorability: anyOf: - type: string enum: - favorable - neutral - unfavorable - type: 'null' title: Favorability sort_order: anyOf: - type: integer - type: 'null' title: Sort Order edited_at: anyOf: - type: string format: date-time - type: 'null' title: Edited At source_timeline_event_ids: items: type: integer type: array title: Source Timeline Event Ids source_paragraph_ids: items: type: string format: uuid type: array title: Source Paragraph Ids type: object required: - variant - text title: SoFParagraph description: 'One paragraph of a research''s Statement of Facts — cited legal prose, not an atomic fact. The paragraph text is the work product: it is what the attorney reviews in the Facts & Evidence tab and what lands verbatim in a generated document''s Statement of Facts. Exhibit citations are baked into the prose (``... on March 3. (Ex. A)``); ``exhibit_labels`` is the reconciled index of those cites, not a second, independently mutable copy of them.' FilingCourtResponse: properties: filing_court: anyOf: - type: string - type: 'null' title: Filing Court filing_court_source: anyOf: - type: string enum: - intake - research - document - suggested - type: 'null' title: Filing Court Source type: object title: FilingCourtResponse WizardDraftKind: type: string enum: - motion - demand_letter_custom title: WizardDraftKind description: 'Which streaming wizard a saved row belongs to. Values are the ``{kind}`` path segment. Distinct from ``GeneratedDocumentType``: these name a *wizard''s working state*, not a filed document — a MOTION row here coexists with that motion''s own ``generated_documents`` row rather than replacing it.' MissingDetailsResponse: properties: result: $ref: '#/components/schemas/MissingDetailsResult' type: object required: - result title: MissingDetailsResponse RelevanceLevel: type: string enum: - Unknown - Very Low - Low - Medium - High - Very High title: RelevanceLevel CourtSelection: type: string enum: - All courts - State - Federal - State and Federal - State and superior federal title: CourtSelection VerifyCaseCitationsResponse: properties: result: $ref: '#/components/schemas/CaseCiteVerificationResult' type: object required: - result title: VerifyCaseCitationsResponse CorporateLawSubAreasEnum: type: string enum: - Business Organizations Law - Corporate Governance Law - Mergers and Acquisitions Law title: CorporateLawSubAreasEnum app__modules__legal_research__api__drafting_studio__DraftListResponse: properties: drafts: items: $ref: '#/components/schemas/app__modules__legal_research__api__drafting_studio__DraftListItem' type: array title: Drafts type: object required: - drafts title: DraftListResponse CommitSubQuestionItem: properties: subquestion_id: type: string format: uuid title: Subquestion Id content: $ref: '#/components/schemas/LegalQuestion' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - subquestion_id - content title: CommitSubQuestionItem DocumentStatus: type: string enum: - not_started - generating - completed - failed title: DocumentStatus CreateResearchResponse: properties: research_id: type: string format: uuid title: Research Id type: object required: - research_id title: CreateResearchResponse FactsEvidenceBundle: properties: dataset_id: type: integer title: Dataset Id sof_id: anyOf: - type: integer - type: 'null' title: Sof Id title: anyOf: - type: string - type: 'null' title: Title writing_style: anyOf: - type: string - type: 'null' title: Writing Style generated_at: anyOf: - type: string format: date-time - type: 'null' title: Generated At paragraphs: items: type: string type: array title: Paragraphs facts: items: $ref: '#/components/schemas/FactsEvidenceFact' type: array title: Facts exhibits: items: $ref: '#/components/schemas/FactsEvidenceExhibit' type: array title: Exhibits type: object required: - dataset_id title: FactsEvidenceBundle description: 'The matter''s established facts + their exhibits, resolved for a research. ``paragraphs`` is the raw SoF prose (for the markdown renderer / agent context); ``facts`` is the same prose split into numbered facts tagged with the exhibits they cite; ``exhibits`` is the version''s exhibit snapshot.' UpdateResearchRequest: properties: title: anyOf: - type: string - type: 'null' title: Title research_type: anyOf: - $ref: '#/components/schemas/ResearchType' - type: 'null' fact_pattern: anyOf: - type: string - type: 'null' title: Fact Pattern jurisdiction: anyOf: - $ref: '#/components/schemas/UsStates' - type: 'null' jurisdiction_extra: anyOf: - type: string - type: 'null' title: Jurisdiction Extra federal_district: anyOf: - type: string - type: 'null' title: Federal District description: 'Specific federal district (e.g. ''S.D.N.Y. (Southern District of New York)''); must be a known picker label. With court_selection=''Federal'' in the same PATCH it is the attorney''s explicit forum pick and re-anchors jurisdiction to the district''s state. Under any other (or omitted) court_selection it is venue-derived forum information: stored for procedural-authority scoping without modifying jurisdiction. Clearing it does not reset jurisdiction.' filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' court_selection: anyOf: - $ref: '#/components/schemas/CourtSelection' - type: 'null' party_to_favor: anyOf: - type: string - type: 'null' title: Party To Favor litigation_stage: anyOf: - $ref: '#/components/schemas/LitigationStage' - type: 'null' venue: anyOf: - type: string - type: 'null' title: Venue judge: anyOf: - type: string - type: 'null' title: Judge draft_document_type: anyOf: - $ref: '#/components/schemas/DraftDocumentType' - type: 'null' draft_document_inputs: anyOf: - $ref: '#/components/schemas/DraftDocumentInputs' - type: 'null' seed_causes_of_action: anyOf: - items: type: string type: array - type: 'null' title: Seed Causes Of Action limit_to_seeded_coas: anyOf: - type: boolean - type: 'null' title: Limit To Seeded Coas phase_type: anyOf: - $ref: '#/components/schemas/PhaseType' - type: 'null' entry_point_type: anyOf: - $ref: '#/components/schemas/EntryPointType' - type: 'null' type: object title: UpdateResearchRequest description: Used for PATCH (partial update). CommitAdAuthorityItem: properties: authority_id: type: string format: uuid title: Authority Id content: $ref: '#/components/schemas/LegalAuthority' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - authority_id - content title: CommitAdAuthorityItem OpenLawsSearchResponse: properties: results: items: $ref: '#/components/schemas/ScoredOpenLawsRecord' type: array title: Results search_type: $ref: '#/components/schemas/OpenLawsSearchType' jurisdiction_used: type: string title: Jurisdiction Used type: object required: - results - search_type - jurisdiction_used title: OpenLawsSearchResponse app__modules__legal_research__api__drafting_studio__SaveDraftRequest: properties: document_key: type: string title: Document Key content_html: type: string title: Content Html document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id type: object required: - document_key - content_html title: SaveDraftRequest MotionStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: MotionStatusResponse SaveDraftResponse: properties: status: type: string title: Status download_url: anyOf: - type: string - type: 'null' title: Download Url type: object required: - status title: SaveDraftResponse MissingDetailField: properties: key: type: string title: Key label: type: string title: Label placeholder_text: type: string title: Placeholder Text field_type: type: string title: Field Type default: text priority: type: string title: Priority default: needed occurrences: type: integer title: Occurrences default: 1 type: object required: - key - label - placeholder_text title: MissingDetailField CommitSummaryRequest: properties: answer: type: string minLength: 1 title: Answer type: object required: - answer title: CommitSummaryRequest 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 TrialSide: type: string enum: - plaintiff - defendant title: TrialSide description: Which side of the trial-court caption a party sits on. AuthorityStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitAuthorityRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitAuthorityRequest' - type: 'null' only_use_case_law: type: boolean title: Only Use Case Law default: false type: object required: - status - suggestion - selection title: AuthorityStepResponse BriefStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title statement_of_facts_available: type: boolean title: Statement Of Facts Available default: false type: object required: - status title: BriefStatusResponse StatutePieces: properties: volume: anyOf: - type: string - type: 'null' title: Volume container: type: string title: Container subdivision: anyOf: - type: string - type: 'null' title: Subdivision marker: $ref: '#/components/schemas/SectionMarker' default: § section: type: string title: Section type: object required: - container - section title: StatutePieces description: 'Structured citation pieces derived from an OpenLaws record (no string parsing). These map straight onto the CSL legislation variables, so the style renders the citation (the comma in a section like ``25-21,185.09`` is just data, not parsed). ``marker`` defaults to the section symbol so pieces persisted before the field existed keep rendering exactly as they did.' KeyProvision: properties: provision_type: anyOf: - $ref: '#/components/schemas/ProvisionType' - type: 'null' topic: type: string title: Topic default: '' assessment: anyOf: - type: string - type: 'null' title: Assessment assessment_factors: anyOf: - items: type: string type: array - type: 'null' title: Assessment Factors locator: anyOf: - type: string - type: 'null' title: Locator type: object title: KeyProvision ComplaintGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' damages_information: anyOf: - type: string - type: 'null' title: Damages Information template_doc_id: anyOf: - type: string format: uuid - type: 'null' title: Template Doc Id style_approach: anyOf: - type: string enum: - lr_draft_first - doc_agent_direct - type: 'null' title: Style Approach type: object title: ComplaintGenerateRequest description: Optional damages context for complaint generation. CasePosture: properties: stage: $ref: '#/components/schemas/CaseStage' on_appeal: type: boolean title: On Appeal default: false prevailing_side: anyOf: - $ref: '#/components/schemas/TrialSide' - type: 'null' type: object required: - stage title: CasePosture description: 'Procedural posture of the ruling a case is cited for, read from db_caselaw at hydration. ``stage`` is the corpus label (ENG-22665). The rest is derived from columns the corpus already had: the court level says whether this opinion reviewed a lower ruling, the winning party''s roles say which trial-court side it favoured. Nothing here is classified per research (resources/cases/posture.py).' IntellectualPropertyLawSubAreasEnum: type: string enum: - Patent Law - Trade Secret Law - Trademark and Trade Dress Law - Copyright Law title: IntellectualPropertyLawSubAreasEnum OverviewPDFStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title error: anyOf: - type: string - type: 'null' title: Error warning: anyOf: - type: string - type: 'null' title: Warning type: object required: - status title: OverviewPDFStatusResponse DraftDocumentType: type: string enum: - mtd - msj - brief - complaint - demand-letter-document - memo - mil - mts - pi-motion - appellate-brief - overview-pdf title: DraftDocumentType description: 'The document an attorney intends to draft, captured at intake. Values match the work-products generation keys so the drafting step / draft-direct job can map a chosen type to its generator and input slots. See ENG-15499. One member per Draft Hub type that has a real generation endpoint, so intake can offer everything the Hub can produce. The FE mirror is DOC_TYPE_REGISTRY''s ``intakeValue`` (docTypeRegistry.ts) — adding a member here without one there leaves it unselectable. Deliberately absent: the Hub''s three dialog wizards (custom Email / custom Demand Letter / custom Motion) each generate over client-driven SSE with no server-side job, so there is nothing a post-run trigger could start and leave running to completion.' AuthorityVerificationResult: properties: status: $ref: '#/components/schemas/AuthorityVerificationStatus' openlaws_status: anyOf: - $ref: '#/components/schemas/AuthorityValidityStatus' - type: 'null' replacement_authority: anyOf: - type: string - type: 'null' title: Replacement Authority reasoning: type: string title: Reasoning type: object required: - status - reasoning title: AuthorityVerificationResult ResearchMilestone: properties: id: type: string enum: - reviewing_documents - claims_defenses - governing_law - case_law - analysis_review - finishing_up title: Id label: type: string title: Label state: type: string enum: - done - current - waiting title: State count_text: anyOf: - type: string - type: 'null' title: Count Text type: object required: - id - label - state - count_text title: ResearchMilestone RecordDesignation: properties: document_id: type: string format: uuid title: Document Id volume_label: anyOf: - type: string - type: 'null' title: Volume Label type: object required: - document_id title: RecordDesignation description: 'One record document designated for page-anchored citation, in citation order. ``volume_label`` is the human-facing token a rendered record cite substitutes for the plain ordinal (e.g. a designation labeled "II" renders "II-ER-234" instead of "2-ER-234" — see ``citations/record_cites.py``''s ``render_record_cite``). None means "render the plain ordinal."' CitableDocumentsResponse: properties: documents: items: $ref: '#/components/schemas/CitableDocument' type: array title: Documents type: object required: - documents title: CitableDocumentsResponse ExportDocxResponse: properties: download_url: anyOf: - type: string - type: 'null' title: Download Url error: anyOf: - type: string - type: 'null' title: Error type: object title: ExportDocxResponse AuthorityClass: type: string enum: - statute - regulation - constitution - secondary title: AuthorityClass description: 'Source class of a non-case authority. STATUTE, REGULATION, and CONSTITUTION are enacted primary law; SECONDARY covers Restatements, treatises, model codes, and law-review articles (non-enacted sources).' PersonalInjuryAndTortLawSubAreasEnum: type: string enum: - Personal Property Law - Product Liability Law - Defamation Law - Mass Torts Law - Negligence and Malpractice Law - Assault Law - Fraud and Economic Torts Law title: PersonalInjuryAndTortLawSubAreasEnum DocumentReference: properties: doc_id: type: string format: uuid title: Doc Id context: anyOf: - type: string maxLength: 2000 - type: 'null' title: Context type: object required: - doc_id title: DocumentReference description: A user-selected document with optional contextualization. CommitCaseItem: properties: case_id: type: string format: uuid title: Case Id content: $ref: '#/components/schemas/CaseV3' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - case_id - content title: CommitCaseItem CommitAuthorityItem: properties: authority_id: type: string format: uuid title: Authority Id content: $ref: '#/components/schemas/LegalAuthority' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - authority_id - content title: CommitAuthorityItem UpsertPromptOverrideResponse: properties: prompt_key: type: string title: Prompt Key status: type: string title: Status default: saved type: object required: - prompt_key title: UpsertPromptOverrideResponse DeepenStep: type: string enum: - authorities - cases - coverage title: DeepenStep description: 'Target of one deepen action. AUTHORITIES runs the deepen agent (assembled here); CASES and COVERAGE are routed by DeepenStepWorkflow to their existing workflows.' EnergyLawSubAreasEnum: type: string enum: - Renewable Energy Law - Nuclear Law - Energy Sales and Transmission Law - Oil and Gas Law title: EnergyLawSubAreasEnum ItemSource: type: string enum: - generate - manual - cascade - landmark - migration - seed - second_pass - agent - procedural - timeline - complaint title: ItemSource description: 'Provenance tag: which creation path produced this entity row.' SeedEntity: properties: cause_of_action_name: type: string title: Cause Of Action Name affirmative_defenses: items: $ref: '#/components/schemas/SeedAffirmativeDefense' type: array title: Affirmative Defenses cases: items: $ref: '#/components/schemas/SeedCase' type: array title: Cases authorities: items: $ref: '#/components/schemas/SeedAuthority' type: array title: Authorities questions: items: $ref: '#/components/schemas/SeedQuestion' type: array title: Questions type: object required: - cause_of_action_name title: SeedEntity RenameRequest: properties: document_key: type: string title: Document Key new_title: type: string title: New Title document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id type: object required: - document_key - new_title title: RenameRequest FullResearchStartRequest: properties: fill_engine: anyOf: - $ref: '#/components/schemas/FillEngine' - type: 'null' type: object title: FullResearchStartRequest BankruptcyInsolvencyAndRestructuringLawSubAreasEnum: type: string enum: - Personal Insolvency Law - Corporate Insolvency Law title: BankruptcyInsolvencyAndRestructuringLawSubAreasEnum RemoveRequest: properties: document_key: type: string title: Document Key document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id type: object required: - document_key title: RemoveRequest AddParagraphRequest: properties: text: type: string minLength: 1 title: Text persuasive_text: type: string title: Persuasive Text default: '' favorability: anyOf: - type: string enum: - favorable - neutral - unfavorable - type: 'null' title: Favorability type: object required: - text title: AddParagraphRequest SectionSourceRef: properties: kind: type: string title: Kind handle: type: string title: Handle entity_id: type: string format: uuid title: Entity Id type: object required: - kind - handle - entity_id title: SectionSourceRef description: One entity reference in a section's ``source_refs`` — the ENG-17332 handle map's entity UUID, not ref text. MotionGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id instructions: type: string maxLength: 5000 minLength: 1 title: Instructions supporting_document_ids: items: type: string format: uuid type: array maxItems: 25 title: Supporting Document Ids type: object required: - instructions title: MotionGenerateRequest description: The lawyer's free-text description of the motion to draft. MsjFilingStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: MsjFilingStatusResponse AreasOfLaw: type: string enum: - Constitutional and Civil Rights Law - Personal Injury and Tort Law - Information Security Law - Banking Law - Municipal Law - Public and Administrative Law - Bankruptcy, Insolvency, and Restructuring Law - Law of Obligations - Food and Drug Law - Energy Law - Transportation Law - Personal and Family Law - Religious Law - Cannabis Law - Gaming Law - Securities and Financial Instruments Law - Contract Law - Labor and Employment Law - Education Law - Insurance Law - Real Property Law - Intellectual Property Law - Finance and Lending Law - Corporate Law - Criminal Law - Environmental and Natural Resource Law - Agriculture Law - Tax and Revenue Law - Health Law - Telecommunications, Media, and Entertainment Law - Commercial and Trade Law title: AreasOfLaw EnsureFillResponse: properties: action: $ref: '#/components/schemas/EnsureFillAction' type: object required: - action title: EnsureFillResponse CommitADRequest: properties: defenses: items: $ref: '#/components/schemas/CommitADItem' type: array title: Defenses type: object required: - defenses title: CommitADRequest Research: properties: id: type: string format: uuid title: Id user_id: type: string title: User Id research_type: $ref: '#/components/schemas/ResearchType' jurisdiction: $ref: '#/components/schemas/UsStates' court_selection: $ref: '#/components/schemas/CourtSelection' fact_pattern: anyOf: - type: string - type: 'null' title: Fact Pattern jurisdiction_extra: anyOf: - type: string - type: 'null' title: Jurisdiction Extra federal_district: anyOf: - type: string - type: 'null' title: Federal District filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' party_to_favor: anyOf: - type: string - type: 'null' title: Party To Favor litigation_stage: anyOf: - $ref: '#/components/schemas/LitigationStage' - type: 'null' venue: anyOf: - type: string - type: 'null' title: Venue judge: anyOf: - type: string - type: 'null' title: Judge resolved_court: anyOf: - type: string - type: 'null' title: Resolved Court resolved_court_source: anyOf: - type: string - type: 'null' title: Resolved Court Source resolved_court_level: anyOf: - type: string - type: 'null' title: Resolved Court Level draft_document_type: anyOf: - $ref: '#/components/schemas/DraftDocumentType' - type: 'null' draft_document_inputs: anyOf: - $ref: '#/components/schemas/DraftDocumentInputs' - type: 'null' seed_causes_of_action: items: type: string type: array title: Seed Causes Of Action limit_to_seeded_coas: type: boolean title: Limit To Seeded Coas default: false use_agentic_fill: type: boolean title: Use Agentic Fill default: false task_mode: $ref: '#/components/schemas/TaskMode' default: full fill_engine: anyOf: - $ref: '#/components/schemas/FillEngine' - type: 'null' source_dataset_id: anyOf: - type: integer - type: 'null' title: Source Dataset Id entry_point_type: $ref: '#/components/schemas/EntryPointType' phase_type: $ref: '#/components/schemas/PhaseType' title_staged: anyOf: - type: string - type: 'null' title: Title Staged briefing_staged: anyOf: - $ref: '#/components/schemas/Briefing' - type: 'null' summary_staged: anyOf: - type: string - type: 'null' title: Summary Staged parties_staged: anyOf: - $ref: '#/components/schemas/LegalParties' - type: 'null' followup_staged: anyOf: - $ref: '#/components/schemas/FollowupQuestions-Output' - type: 'null' title: anyOf: - type: string - type: 'null' title: Title briefing: anyOf: - $ref: '#/components/schemas/Briefing' - type: 'null' summary: anyOf: - type: string - type: 'null' title: Summary theory_of_the_case: anyOf: - type: string - type: 'null' title: Theory Of The Case parties: anyOf: - $ref: '#/components/schemas/LegalParties' - type: 'null' followup: anyOf: - $ref: '#/components/schemas/FollowupQuestions-Output' - type: 'null' auto_wf_id: anyOf: - type: string - type: 'null' title: Auto Wf Id landmark_cases_wf_id: anyOf: - type: string - type: 'null' title: Landmark Cases Wf Id seed_wf_id: anyOf: - type: string - type: 'null' title: Seed Wf Id briefing_context_wf_id: anyOf: - type: string - type: 'null' title: Briefing Context Wf Id case_search_agent_considered_at: anyOf: - type: string format: date-time - type: 'null' title: Case Search Agent Considered At matter_id: anyOf: - type: string - type: 'null' title: Matter Id causes_of_action_staged: additionalProperties: $ref: '#/components/schemas/CauseofAction' propertyNames: format: uuid type: object title: Causes Of Action Staged legal_authorities_staged: additionalProperties: $ref: '#/components/schemas/LegalAuthority' propertyNames: format: uuid type: object title: Legal Authorities Staged key_questions_staged: additionalProperties: $ref: '#/components/schemas/LegalQuestion' propertyNames: format: uuid type: object title: Key Questions Staged subquestions_staged: additionalProperties: $ref: '#/components/schemas/LegalQuestion' propertyNames: format: uuid type: object title: Subquestions Staged cases_staged: additionalProperties: $ref: '#/components/schemas/CaseV3' propertyNames: format: uuid type: object title: Cases Staged affirmative_defenses_staged: additionalProperties: $ref: '#/components/schemas/AffirmativeDefenseV3' propertyNames: format: uuid type: object title: Affirmative Defenses Staged causes_of_action: additionalProperties: $ref: '#/components/schemas/CauseofAction' propertyNames: format: uuid type: object title: Causes Of Action legal_authorities: additionalProperties: $ref: '#/components/schemas/LegalAuthority' propertyNames: format: uuid type: object title: Legal Authorities key_questions: additionalProperties: $ref: '#/components/schemas/LegalQuestion' propertyNames: format: uuid type: object title: Key Questions subquestions: additionalProperties: $ref: '#/components/schemas/LegalQuestion' propertyNames: format: uuid type: object title: Subquestions cases: additionalProperties: $ref: '#/components/schemas/CaseV3' propertyNames: format: uuid type: object title: Cases affirmative_defenses: additionalProperties: $ref: '#/components/schemas/AffirmativeDefenseV3' propertyNames: format: uuid type: object title: Affirmative Defenses type: object required: - id - user_id - research_type - jurisdiction - court_selection - jurisdiction_extra - party_to_favor - entry_point_type - phase_type title: Research LegalParties: properties: represented_parties: items: $ref: '#/components/schemas/LegalParty' type: array title: Represented Parties description: All legal parties represented by the lawyer. opposing_parties: items: $ref: '#/components/schemas/LegalParty' type: array title: Opposing Parties description: All opposing parties. other_parties: items: $ref: '#/components/schemas/LegalParty' type: array title: Other Parties description: All other legal parties in the matter. type: object title: LegalParties SeedAuthority: properties: authority_name: type: string title: Authority Name bluebook: type: string title: Bluebook default: '' type: object required: - authority_name title: SeedAuthority AppellateBriefGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id what_is_appealed: anyOf: - type: string maxLength: 2000 - type: 'null' title: What Is Appealed record: anyOf: - items: $ref: '#/components/schemas/RecordDesignation' type: array - type: 'null' title: Record appealed_order_document_id: anyOf: - type: string format: uuid - type: 'null' title: Appealed Order Document Id type: object title: AppellateBriefGenerateRequest QuickChatAction: type: string enum: - limit_liability - show_arguments - client_email - demand_letter - internal_memo title: QuickChatAction BankingLawSubAreasEnum: type: string enum: - Cryptocurrency Law - Bank Secrecy and Anti-Money Laundering Law - Banking Operations Law title: BankingLawSubAreasEnum PiMotionStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: PiMotionStatusResponse PublicAndAdministrativeLawSubAreasEnum: type: string enum: - Indigenous People's Law - Military and Veterans Law - Project Finance Law - Public Health and Welfare Law - Public Finance Law - Public Policy and Government Affairs Law - Government Contracts Law - Election Law title: PublicAndAdministrativeLawSubAreasEnum ContactInformation: properties: entity: $ref: '#/components/schemas/ContactEntity' city: type: string title: City default: '' state: type: string title: State default: '' zip_code: type: string title: Zip Code default: '' street_address: type: string title: Street Address default: '' phone_number: type: string title: Phone Number default: '' email: type: string title: Email default: '' type: object title: ContactInformation RemoveResponse: properties: status: type: string title: Status type: object required: - status title: RemoveResponse OpenLawsAncestor: properties: path: type: string title: Path default: '' display_name: type: string title: Display Name type: object required: - display_name title: OpenLawsAncestor CitationCheckResult: properties: total_citations: type: integer title: Total Citations issues_found: type: integer title: Issues Found corrections: items: $ref: '#/components/schemas/CitationCorrection' type: array title: Corrections type: object required: - total_citations - issues_found - corrections title: CitationCheckResult app__modules__legal_research__api__drafting_studio__DraftListItem: properties: document_id: type: string format: uuid title: Document Id document_key: type: string title: Document Key document_type: type: string title: Document Type status: $ref: '#/components/schemas/DocumentStatus' title: anyOf: - type: string - type: 'null' title: Title download_url: anyOf: - type: string - type: 'null' title: Download Url error: anyOf: - type: string - type: 'null' title: Error created_at: type: string title: Created At type: object required: - document_id - document_key - document_type - status - created_at title: DraftListItem ProcessedParagraph: properties: text: type: string title: Text default: '' citations: items: $ref: '#/components/schemas/ProcessedCitation' type: array title: Citations type: object title: ProcessedParagraph FilingForum: type: string enum: - federal - state title: FilingForum RelativeLegalAuthoritySummary: properties: jurisdictions: type: string title: Jurisdictions description: The jurisdiction(s) of the statute. default: '' purpose: type: string title: Purpose description: The purpose or intent of the statute, includes a statement of applicability to the Current Case. default: '' scope: type: string title: Scope description: Who or what the statute applies to, includes a statement of applicability to the Current Case. default: '' key_provisions: items: type: string type: array title: Key Provisions description: Essential parts of the statute, includes a statement of applicability to the Current Case for each provision. default: [] penalties_remedies: type: string title: Penalties Remedies description: Consequences of non-compliance and relief for those affected, in context of the current case. default: '' definitions: type: string title: Definitions description: The definitions of terms used in the statute and their implications for the current case. default: '' interpretations: type: string title: Interpretations description: Understanding of the statute by courts/agencies, and its implications for the current case. default: '' precedents: type: string title: Precedents description: Noteworthy cases that have interpreted the statute and their relevance to the current case. default: '' relevance: type: string title: Relevance description: A description of the relevance of the statute to the current case, includes a brief overview of what the involved parties may argue under this statute. default: '' type: object title: RelativeLegalAuthoritySummary TaskMode: type: string enum: - full - fast title: TaskMode DemandLetterLength: type: string enum: - succinct - extensive title: DemandLetterLength FillEngine: type: string enum: - smartbot - graph title: FillEngine Briefing: properties: research_area: anyOf: - type: string - type: 'null' title: Research Area description: Specific legal domain or jurisprudential subject for investigation objectives: items: type: string type: array title: Objectives description: What the research aims to accomplish or answer key_issues: items: type: string type: array title: Key Issues description: Primary legal issues, questions, or areas of concern factual_summary: anyOf: - items: type: string type: array - type: 'null' title: Factual Summary description: Key facts and events (only if facts are available or derived) legal_context: anyOf: - items: type: string type: array - type: 'null' title: Legal Context description: Relevant legal background, statutes, or precedents informing the research scope_inclusions: items: type: string type: array title: Scope Inclusions description: Topics explicitly within the research scope scope_exclusions: items: type: string type: array title: Scope Exclusions description: Topics the user has explicitly asked to exclude, if any. uncertainties: items: type: string type: array title: Uncertainties description: Unknown or ambiguous aspects requiring clarification case_type: anyOf: - $ref: '#/components/schemas/CaseTypes' - type: 'null' claims_and_allegations: anyOf: - items: type: string type: array - type: 'null' title: Claims And Allegations procedural_history: anyOf: - items: type: string type: array - type: 'null' title: Procedural History court_of_proper_jurisdiction: anyOf: - type: string - type: 'null' title: Court Of Proper Jurisdiction sources: items: $ref: '#/components/schemas/BriefingSource' type: array title: Sources default: [] type: object required: - objectives - key_issues title: Briefing description: Entrypoint-agnostic briefing model. ResearchType: type: string enum: - litigation - explore title: ResearchType SeedSource: properties: source_type: $ref: '#/components/schemas/SourceType' source_id: type: string title: Source Id type: object required: - source_type - source_id title: SeedSource COAStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitCOARequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitCOARequest' - type: 'null' type: object required: - status - suggestion - selection title: COAStepResponse SeedResearchRequest: properties: source: $ref: '#/components/schemas/SeedSource' fact_pattern: type: string title: Fact Pattern jurisdiction: $ref: '#/components/schemas/UsStates' research_type: $ref: '#/components/schemas/ResearchType' default: litigation title: type: string title: Title default: '' jurisdiction_extra: anyOf: - type: string - type: 'null' title: Jurisdiction Extra federal_district: anyOf: - type: string - type: 'null' title: Federal District filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' court_selection: $ref: '#/components/schemas/CourtSelection' default: State and Federal party_to_favor: anyOf: - $ref: '#/components/schemas/PartyToFavor' - type: 'null' litigation_stage: anyOf: - $ref: '#/components/schemas/LitigationStage' - type: 'null' venue: anyOf: - type: string - type: 'null' title: Venue judge: anyOf: - type: string - type: 'null' title: Judge phase_type: $ref: '#/components/schemas/PhaseType' default: quick_answer entry_point_type: $ref: '#/components/schemas/EntryPointType' default: factual seeds: items: $ref: '#/components/schemas/SeedEntity' type: array title: Seeds parties: items: $ref: '#/components/schemas/SeedParty' type: array title: Parties type: object required: - source - fact_pattern - jurisdiction title: SeedResearchRequest description: Payload for creating a research from an external source. OpenLawsSearchType: type: string enum: - or - phrase - and title: OpenLawsSearchType LaborAndEmploymentLawSubAreasEnum: type: string enum: - Reduction in Force Law - Employment Law - Substance Abuse and Drug Testing Law - Labor Law - Employment Immigration Law - Wage and Hour Law - Employment Discrimination Law - Employment Health and Safety Law - Pay Equity Law - Termination Law - Unemployment Benefits Law - Employee Pension and Benefits Law - Employment Contracts Law - Independent Contractor Law - Workers Compensation Law title: LaborAndEmploymentLawSubAreasEnum DuplicateRequest: properties: document_key: type: string title: Document Key document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id type: object required: - document_key title: DuplicateRequest RealPropertyLawSubAreasEnum: type: string enum: - Condominium Law - Property Rights and Transactions Law - Construction and Development Law - Eminent Domain Law - Landlord Tenant Law - Land Use and Zoning Law title: RealPropertyLawSubAreasEnum LegalAuthoritySummary: properties: jurisdictions: type: string title: Jurisdictions description: The jurisdiction(s) of the statute. default: '' purpose: type: string title: Purpose description: The purpose or intent of the statute. Includes a general purpose and specific goals or objectives. default: '' scope: type: string title: Scope description: The scope of the statute. Includes who or what it applies to and where it applies. default: '' key_provisions: items: type: string type: array title: Key Provisions description: Essential parts of the statute. default: [] penalties_remedies: type: string title: Penalties Remedies description: Consequences of non-compliance and relief for those affected. default: '' definitions: type: string title: Definitions description: The definitions of terms used in the statute. default: '' interpretations: type: string title: Interpretations description: Understanding of the statute by courts/agencies. default: '' precedents: type: string title: Precedents description: Noteworthy cases that have interpreted the statute. default: '' type: object title: LegalAuthoritySummary CommitPartyItem: properties: party_id: type: string format: uuid title: Party Id group: $ref: '#/components/schemas/PartyGroup' content: $ref: '#/components/schemas/LegalParty' type: object required: - party_id - group - content title: CommitPartyItem InformationSecurityLawSubAreasEnum: type: string enum: - Cybersecurity Law - Privacy Law - Government Access and Disclosure Law title: InformationSecurityLawSubAreasEnum ScorecardResult: properties: overall_score: type: integer maximum: 100.0 minimum: 0.0 title: Overall Score categories: items: $ref: '#/components/schemas/ScorecardCategory' type: array title: Categories top_fixes: items: type: string type: array title: Top Fixes type: object required: - overall_score - categories title: ScorecardResult BriefGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' complaint_document_id: anyOf: - type: string format: uuid - type: 'null' title: Complaint Document Id responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id relevant_documents: anyOf: - items: $ref: '#/components/schemas/DocumentReference' type: array - type: 'null' title: Relevant Documents use_statement_of_facts: type: boolean title: Use Statement Of Facts default: true template_doc_id: anyOf: - type: string format: uuid - type: 'null' title: Template Doc Id style_approach: anyOf: - type: string enum: - lr_draft_first - doc_agent_direct - type: 'null' title: Style Approach brief_purpose: anyOf: - type: string maxLength: 2000 - type: 'null' title: Brief Purpose type: object title: BriefGenerateRequest CommitAnalysisItem: properties: question_id: type: string format: uuid title: Question Id analysis: $ref: '#/components/schemas/QuestionAnalysis' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' type: object required: - question_id - analysis title: CommitAnalysisItem GenerateSoFRequest: properties: variant: type: string enum: - short - extensive title: Variant style_instructions: type: string title: Style Instructions default: '' type: object required: - variant title: GenerateSoFRequest ImproveAsyncStartResponse: properties: job_id: type: string title: Job Id status: type: string const: generating title: Status default: generating type: object required: - job_id title: ImproveAsyncStartResponse PartyAlignment: properties: research_id: type: string format: uuid title: Research Id client_name: anyOf: - type: string - type: 'null' title: Client Name client_role: anyOf: - type: string - type: 'null' title: Client Role co_clients: items: $ref: '#/components/schemas/AlignedParty' type: array title: Co Clients opposing_parties: items: $ref: '#/components/schemas/AlignedParty' type: array title: Opposing Parties counsel_names: items: type: string type: array title: Counsel Names firm_name: anyOf: - type: string - type: 'null' title: Firm Name signatory_name: anyOf: - type: string - type: 'null' title: Signatory Name signatory_title: anyOf: - type: string - type: 'null' title: Signatory Title provenance: $ref: '#/components/schemas/PartyAlignmentProvenance' type: object required: - research_id title: PartyAlignment description: 'Canonical party/counsel/signatory record for one research. Absence (``None`` / empty list) means genuinely unresolvable — never a placeholder string. A consumer (WS3) decides whether to omit the line or fall back to a neutral default (e.g. "To: File"); this record only ever reports the ground truth it could find.' SeedCase: properties: caselaw_db_id: anyOf: - type: string format: uuid - type: 'null' title: Caselaw Db Id case_name: type: string title: Case Name default: '' volume: type: string title: Volume default: '' reporter: type: string title: Reporter default: '' page: type: string title: Page default: '' type: object title: SeedCase AddAuthorityRequest: properties: authority_name: type: string minLength: 1 title: Authority Name bluebook: type: string title: Bluebook default: '' description: type: string title: Description default: '' type: object required: - authority_name title: AddAuthorityRequest SecuritiesAndFinancialInstrumentsLawSubAreasEnum: type: string enum: - Investment Advisor Law - Derivatives and Futures Law - Investment Companies Law - Cryptocurrency Law - Exchanges Law - Structured Finance Law - Commodities Law - Security Offerings and Capital Markets Law - Broker-Dealer Law - Private Equity, Hedge Funds and Venture Capital Law title: SecuritiesAndFinancialInstrumentsLawSubAreasEnum DocumentIntakeFields: properties: title: type: string title: Title default: '' fact_pattern: type: string title: Fact Pattern default: '' jurisdiction: anyOf: - $ref: '#/components/schemas/UsStates' - type: 'null' party_to_favor: type: string title: Party To Favor default: '' venue: anyOf: - type: string - type: 'null' title: Venue judge: anyOf: - type: string - type: 'null' title: Judge litigation_stage: anyOf: - $ref: '#/components/schemas/LitigationStage' - type: 'null' federal_district: anyOf: - type: string - type: 'null' title: Federal District filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' seed_causes_of_action: items: type: string type: array title: Seed Causes Of Action description: Cause-of-action names seeded from the uploaded complaint's analysis (empty for documents that carry no complaint counts, e.g. generic-intake docs). type: object title: DocumentIntakeFields description: Validated intake fields extracted from a document, ready for form hydration. VerifyCaseCitationsRequest: properties: document_key: type: string title: Document Key draft_content: type: string title: Draft Content default: '' type: object required: - document_key title: VerifyCaseCitationsRequest AuthorityValidityStatus: type: string enum: - REPEALED - EXPIRED - RENUMBERED - CURRENT - VERIFIED - FURTHER_RESEARCH_RECOMMENDED title: AuthorityValidityStatus MSJDocumentInfo: properties: download_url: anyOf: - type: string - type: 'null' title: Download Url title: anyOf: - type: string - type: 'null' title: Title type: object title: MSJDocumentInfo ImproveRequest: properties: document_key: type: string title: Document Key draft_content: type: string title: Draft Content default: '' agent: type: string enum: - case_law - evidence - arguments - citations - formatting - research_coverage - other title: Agent default: other agents: items: type: string enum: - case_law - evidence - arguments - citations - formatting - research_coverage - other type: array title: Agents agent_instructions: additionalProperties: type: string type: object title: Agent Instructions custom_instructions: type: string title: Custom Instructions default: '' scorecard: anyOf: - $ref: '#/components/schemas/ScorecardResult' - type: 'null' type: object required: - document_key title: ImproveRequest ClearPromptOverrideResponse: properties: prompt_key: type: string title: Prompt Key status: type: string title: Status type: object required: - prompt_key - status title: ClearPromptOverrideResponse ContextualSimilarity: properties: factual_similarity: type: number title: Factual Similarity procedural_similarity: type: number title: Procedural Similarity party_similarity: type: number title: Party Similarity default: 0 contextual_similarity: type: number title: Contextual Similarity default: 0 type: object required: - factual_similarity - procedural_similarity title: ContextualSimilarity CaseCiteVerificationItem: properties: id: type: string title: Id original_text: type: string title: Original Text status: type: string enum: - verified - partial - unverifiable - unsupported - contradicted - error title: Status case_name: anyOf: - type: string - type: 'null' title: Case Name source_url: anyOf: - type: string - type: 'null' title: Source Url cluster_id: anyOf: - type: integer - type: 'null' title: Cluster Id proposition: anyOf: - type: string - type: 'null' title: Proposition pinpoint: anyOf: - type: string - type: 'null' title: Pinpoint key_quote: anyOf: - type: string - type: 'null' title: Key Quote note: anyOf: - type: string - type: 'null' title: Note type: object required: - id - original_text - status title: CaseCiteVerificationItem ResearchDocumentItem: properties: id: type: string format: uuid title: Id name: type: string title: Name file_content_type: anyOf: - $ref: '#/components/schemas/DocumentType' - type: 'null' status: type: string title: Status size_bytes: anyOf: - type: integer - type: 'null' title: Size Bytes upload_datetime: anyOf: - type: string format: date-time - type: 'null' title: Upload Datetime type: object required: - id - name - file_content_type - status - size_bytes - upload_datetime title: ResearchDocumentItem ProcessedCitation: properties: citation: type: string title: Citation default: '' url: type: string title: Url default: '' bluebook: anyOf: - type: string - type: 'null' title: Bluebook default: '' type: object title: ProcessedCitation BriefingSource: properties: ref_id: type: integer title: Ref Id doc_name: type: string title: Doc Name doc_id: anyOf: - type: string - type: 'null' title: Doc Id page_label: anyOf: - type: string - type: 'null' title: Page Label source_type: type: string title: Source Type type: object required: - ref_id - doc_name - source_type title: BriefingSource PromptOverridesListResponse: properties: prompts: items: $ref: '#/components/schemas/PromptOverrideItem' type: array title: Prompts type: object required: - prompts title: PromptOverridesListResponse MTDDocumentInfo: properties: download_url: anyOf: - type: string - type: 'null' title: Download Url title: anyOf: - type: string - type: 'null' title: Title type: object title: MTDDocumentInfo DocumentIntakeResponse: properties: status: $ref: '#/components/schemas/StepStatus' intake: anyOf: - $ref: '#/components/schemas/DocumentIntakeFields' - type: 'null' type: object required: - status title: DocumentIntakeResponse ResearchMilestones: properties: milestones: items: $ref: '#/components/schemas/ResearchMilestone' type: array title: Milestones completed: type: integer title: Completed status_line: type: string title: Status Line type: object required: - milestones - completed - status_line title: ResearchMilestones description: The six milestones in order, how many are done, and the one-line status under the bar. PreviewHtmlResponse: properties: content_html: type: string title: Content Html type: object required: - content_html title: PreviewHtmlResponse ChatSendRequest: properties: message: anyOf: - type: string maxLength: 10000 minLength: 1 - type: 'null' title: Message quick_action: anyOf: - $ref: '#/components/schemas/QuickChatAction' - type: 'null' relevant_documents: anyOf: - items: $ref: '#/components/schemas/DocumentReference' type: array - type: 'null' title: Relevant Documents type: object title: ChatSendRequest CitationCorrection: properties: id: type: string title: Id original_text: type: string title: Original Text issue: type: string title: Issue suggested_fix: type: string title: Suggested Fix severity: type: string title: Severity type: object required: - id - original_text - issue - suggested_fix - severity title: CitationCorrection AlignedParty: properties: name: type: string title: Name role: anyOf: - type: string - type: 'null' title: Role type: object required: - name title: AlignedParty description: One named party with its litigation role (e.g. "Defendant/Respondent"). CaseTypes: type: string enum: - Civil Litigation - Criminal - Contract - Tort - Family - Probate - Property - Bankruptcy - Administrative - Intellectual Property - Tax - Immigration - Antitrust - Other title: CaseTypes DraftDocumentInputs: properties: complaint_document_id: anyOf: - type: string format: uuid - type: 'null' title: Complaint Document Id answer_document_id: anyOf: - type: string format: uuid - type: 'null' title: Answer Document Id reply_document_id: anyOf: - type: string format: uuid - type: 'null' title: Reply Document Id responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id relevant_documents: items: $ref: '#/components/schemas/DocumentReference' type: array title: Relevant Documents template_doc_id: anyOf: - type: string format: uuid - type: 'null' title: Template Doc Id page_limit: anyOf: - type: integer - type: 'null' title: Page Limit use_statement_of_facts: anyOf: - type: boolean - type: 'null' title: Use Statement Of Facts type: object title: DraftDocumentInputs description: 'What the attorney supplied at intake for the chosen draft type. Keyed by the role each plays in generation. Mirrors the per-type generate-request fields so the drafting step / draft-direct job consumes them directly. See ENG-15499. Every field is optional and per-type: the Hub config panel for the chosen type decides which ones intake renders, and a type with no use for one leaves it None. Persisted as JSONB (legal_research_v3.draft_document_inputs), so new members are additive — no migration.' CascadeResetRequest: properties: from_step: $ref: '#/components/schemas/StepName' coa_id: anyOf: - type: string format: uuid - type: 'null' title: Coa Id type: object required: - from_step title: CascadeResetRequest CommitFollowupRequest: properties: questions: items: $ref: '#/components/schemas/FollowupQuestion' type: array title: Questions type: object required: - questions title: CommitFollowupRequest CommitKeyQuestionItem: properties: question_id: type: string format: uuid title: Question Id content: $ref: '#/components/schemas/LegalQuestion' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - question_id - content title: CommitKeyQuestionItem ExtractIntakePartiesRequest: properties: document_ids: items: type: string format: uuid type: array maxItems: 50 title: Document Ids type: object title: ExtractIntakePartiesRequest description: The uploaded documents to pull parties from (matter-less doc-upload intake). Authority: type: string enum: - Federal Constitution - Federal Statute - State Constitution - State Statute - Administrative Regulation - Executive Order - International Treaty - Case Law - Other title: Authority CommitCOAItem: properties: coa_id: type: string format: uuid title: Coa Id content: $ref: '#/components/schemas/CauseofAction' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - coa_id - content title: CommitCOAItem MSJStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At motion: anyOf: - $ref: '#/components/schemas/MSJDocumentInfo' - type: 'null' mpa: anyOf: - $ref: '#/components/schemas/MSJDocumentInfo' - type: 'null' type: object required: - status title: MSJStatusResponse BriefingStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitBriefingRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitBriefingRequest' - type: 'null' type: object required: - status - suggestion - selection title: BriefingStepResponse EmailDraftResponse: properties: content: anyOf: - type: string - type: 'null' title: Content form: anyOf: - $ref: '#/components/schemas/EmailGenerateRequest' - type: 'null' updated_at: anyOf: - type: string - type: 'null' title: Updated At type: object title: EmailDraftResponse description: 'The saved Custom Email draft, or all-None when this research has never saved one. All-None rather than a 404: "nothing saved yet" is the ordinary first-open state of the wizard, not an error, and the client opens the dialog the same way either way.' ScoredOpenLawsRecord: properties: record: $ref: '#/components/schemas/OpenLawsRecord' bluebook: type: string title: Bluebook score: type: number title: Score type: object required: - record - bluebook - score title: ScoredOpenLawsRecord Demand: properties: causes_of_action: items: type: string type: array minItems: 1 title: Causes Of Action description: The cause(s) of action underlying the demand. legal_bases: items: type: string type: array title: Legal Bases description: Legal bases from the existing Matter Analysis supporting the demand. demand: type: string title: Demand description: Explicit statement of the action or remedy sought. deadline: type: string format: date-time title: Deadline description: Compliance deadline (UTC), balancing urgency with feasibility. consequences: items: type: string type: array title: Consequences description: Enforceable actions following non-compliance. damages: type: string title: Damages description: Detailed damages information. type: object required: - causes_of_action - legal_bases - demand - consequences - damages title: Demand MtdFilingStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: MtdFilingStatusResponse MTDStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At motion: anyOf: - $ref: '#/components/schemas/MTDDocumentInfo' - type: 'null' mpa: anyOf: - $ref: '#/components/schemas/MTDDocumentInfo' - type: 'null' type: object required: - status title: MTDStatusResponse CascadeResetResponse: properties: tier: type: string enum: - global - coa_scoped title: Tier cleared: items: type: string type: array title: Cleared rehydrated: type: boolean title: Rehydrated default: false type: object required: - tier - cleared title: CascadeResetResponse CaselawSupport: properties: supporting_case_ids: items: type: string format: uuid type: array title: Supporting Case Ids assessment: type: string title: Assessment default: '' support_level: $ref: '#/components/schemas/SupportLevel' default: NOT_COVERED type: object title: CaselawSupport EmailDraftSaveRequest: properties: content: type: string maxLength: 200000 minLength: 1 title: Content form: $ref: '#/components/schemas/EmailGenerateRequest' type: object required: - content - form title: EmailDraftSaveRequest description: 'The wizard''s current state: the email it is showing, and the form that produced it.' PartyAlignmentSource: type: string enum: - user - matter - intake - research title: PartyAlignmentSource description: 'Provenance of one field. Priority, highest first: USER > MATTER > INTAKE > RESEARCH. A higher-priority source''s value is sticky — re-resolution never overwrites it (see resources/party_alignment.py::merge_party_alignment). INTAKE has no producer yet in WS1 (resolve_party_alignment takes research/matter/profile, not intake extractions) — reserved so the provenance contract doesn''t need a breaking change when a later slice wires one in.' ItemLifecycle: type: string enum: - permanent title: ItemLifecycle description: 'Behavioral lifecycle — controls regeneration survival. NULL (unlisted source) means ephemeral: replaced on regen. PERMANENT items survive regeneration (``discard_staged(preserve_durable=True)``).' DocumentType: type: string enum: - COMPLAINT - STATEMENT_OF_FACTS - ANSWER - PRIOR_MOTION - CONTRACT - BRIEF - DEMAND_LETTER - EXHIBITS - OTHER - VARIOUS - FINANCIAL_DOCUMENT - POLICY_DOCUMENT - PERSONNEL_RECORD - MEETING_MINUTES - TESTIMONY_STATEMENT - TECHNICAL_DOCUMENT - MEDIA_CONTENT - EMAIL - MEDICAL_RECORD - MATTER_MEMORY - TASK_MEMORY - MATTER_FORM_CACHE - MATTER_PREFERENCES - PRELIMINARY_ANALYSIS - EARLY_INTAKE_MEMORY title: DocumentType description: Document type classification for matters. DemandSuggestions: properties: demands: items: $ref: '#/components/schemas/Demand' type: array title: Demands description: A list of strategically crafted demands, underpinned by legal rationale. type: object required: - demands title: DemandSuggestions WizardDraftResponse: properties: kind: $ref: '#/components/schemas/WizardDraftKind' content: anyOf: - type: string - type: 'null' title: Content form: anyOf: - additionalProperties: true type: object - type: 'null' title: Form updated_at: anyOf: - type: string - type: 'null' title: Updated At type: object required: - kind title: WizardDraftResponse description: 'The saved draft, or all-None when this wizard has never saved one for this research. All-None rather than a 404: "nothing saved yet" is the ordinary first-open state of a wizard, not an error, and the client opens the dialog the same way either way.' ExportPdfRequest: properties: document_key: type: string title: Document Key document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id type: object required: - document_key title: ExportPdfRequest OpenLawsSearchRequest: properties: query: type: string title: Query jurisdiction: type: string title: Jurisdiction search_type: $ref: '#/components/schemas/OpenLawsSearchType' default: phrase type: object required: - query - jurisdiction title: OpenLawsSearchRequest PiMotionGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id injunction_sought: anyOf: - type: string maxLength: 2000 - type: 'null' title: Injunction Sought type: object title: PiMotionGenerateRequest CriminalLawSubAreasEnum: type: string enum: - Prison Law - Anti-Corruption Law - Asset Forfeiture Law - Organized Crime Law - Business and Financial Crimes Law - Cybercrime Law title: CriminalLawSubAreasEnum CitationCheckRequest: properties: document_key: type: string title: Document Key draft_content: type: string title: Draft Content default: '' type: object required: - document_key title: CitationCheckRequest OpenLawsRecord: properties: identifier: type: string title: Identifier law_key: type: string title: Law Key display_ancestors: items: $ref: '#/components/schemas/OpenLawsAncestor' type: array title: Display Ancestors jurisdiction_key: type: string title: Jurisdiction Key division_type: anyOf: - type: string - type: 'null' title: Division Type is_repealed: anyOf: - type: boolean - type: 'null' title: Is Repealed default: false is_reserved: anyOf: - type: boolean - type: 'null' title: Is Reserved default: false renumbered: anyOf: - type: string - type: 'null' title: Renumbered effective_date_start: anyOf: - type: string format: date - type: 'null' title: Effective Date Start effective_date_end: anyOf: - type: string format: date - type: 'null' title: Effective Date End openlaws_web_url: anyOf: - type: string - type: 'null' title: Openlaws Web Url title: anyOf: - type: string - type: 'null' title: Title content: anyOf: - type: string - type: 'null' title: Content type: object required: - identifier - law_key - jurisdiction_key title: OpenLawsRecord SectionMarker: type: string enum: - § - r. - '' title: SectionMarker description: 'Symbol introducing the section identifier in a Bluebook citation. Statutory codes use the section symbol ("Neb. Rev. Stat. § 25-1401"); some administrative codes cite rules with "r." ("Ala. Admin. Code r. 335-6-5-.02") or with a bare rule number ("Tenn. Comp. R. & Regs. 1200-08-01-.01"). Forcing every code through "§" is the bug class this enum exists to prevent (ENG-14758).' PartyGroup: type: string enum: - represented - opposing - other title: PartyGroup AgentStatusSnapshot: properties: messages: items: type: string type: array title: Messages done: type: boolean title: Done type: object required: - messages - done title: AgentStatusSnapshot description: 'What the polling endpoint returns: the recent feed + done flag.' CommitCOARequest: properties: coas: items: $ref: '#/components/schemas/CommitCOAItem' type: array minItems: 1 title: Coas type: object required: - coas title: CommitCOARequest AffirmativeDefenseV3: properties: name: type: string title: Name coa_id: anyOf: - type: string format: uuid - type: 'null' title: Coa Id assessment: anyOf: - type: string - type: 'null' title: Assessment assessment_factors: anyOf: - items: type: string type: array - type: 'null' title: Assessment Factors authority_keys: items: type: string format: uuid type: array title: Authority Keys case_keys: items: type: string format: uuid type: array title: Case Keys applicability: anyOf: - $ref: '#/components/schemas/ApplicabilityLevel' - type: 'null' only_use_case_law: type: boolean title: Only Use Case Law default: false only_use_case_law_reason: anyOf: - type: string - type: 'null' title: Only Use Case Law Reason type: object required: - name title: AffirmativeDefenseV3 PreviewHtmlRequest: properties: document_key: type: string title: Document Key document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id type: object required: - document_key title: PreviewHtmlRequest PersonalAndFamilyLawSubAreasEnum: type: string enum: - Trusts and Estate Planning Law - Custody Law - Juvenile Law - Matrimonial Law - Immigration Law - Adoption, Surrogacy, and Paternity Law - Probate Law title: PersonalAndFamilyLawSubAreasEnum MTSDocumentInfo: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: MTSDocumentInfo CommitAuthorityRequest: properties: authorities: items: $ref: '#/components/schemas/CommitAuthorityItem' type: array title: Authorities only_use_case_law: anyOf: - type: boolean - type: 'null' title: Only Use Case Law type: object required: - authorities title: CommitAuthorityRequest ScorecardCategory: properties: key: type: string title: Key label: type: string title: Label score: anyOf: - type: integer maximum: 100.0 minimum: 0.0 - type: 'null' title: Score status: type: string title: Status rationale: type: string title: Rationale evidence: type: string title: Evidence default: '' fix: type: string title: Fix default: '' type: object required: - key - label - score - status - rationale title: ScorecardCategory TaxAndRevenueLawSubAreasEnum: type: string enum: - Estates, Gifts, and Trusts Law - Non-Profit and Tax-Exempt Organizations Law - Tax Law title: TaxAndRevenueLawSubAreasEnum AddADRequest: properties: name: type: string minLength: 1 title: Name type: object required: - name title: AddADRequest DemandLetterStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At document: anyOf: - $ref: '#/components/schemas/DemandLetterDocumentInfo' - type: 'null' type: object required: - status title: DemandLetterStatusResponse QuestionMappingInfo: properties: question_id: type: string format: uuid title: Question Id question_text: type: string title: Question Text question_label: anyOf: - type: string - type: 'null' title: Question Label mapped_holdings: items: $ref: '#/components/schemas/HoldingSelection' type: array title: Mapped Holdings type: object required: - question_id - question_text - question_label - mapped_holdings title: QuestionMappingInfo CommitPartiesRequest: properties: parties: items: $ref: '#/components/schemas/CommitPartyItem' type: array minItems: 1 title: Parties type: object required: - parties title: CommitPartiesRequest SoFImportResult: properties: paragraphs: type: integer title: Paragraphs exhibits: type: integer title: Exhibits dataset_id: anyOf: - type: integer - type: 'null' title: Dataset Id writing_style: anyOf: - type: string - type: 'null' title: Writing Style type: object required: - paragraphs - exhibits title: SoFImportResult description: What one import produced — also the payload behind the tab's "imported from Timeline" banner. EvaluationCriterion: properties: title: type: string title: Title description: The title of the evaluation criterion default: '' criterion: type: string title: Criterion description: The evaluation logic default: '' result: type: string title: Result description: The outcome of the evaluation default: '' caselaw_support: anyOf: - $ref: '#/components/schemas/CaselawSupport' - type: 'null' type: object title: EvaluationCriterion StepName: type: string enum: - intake - followup - briefing - parties - summary - causes of action - affirmative defenses - legal authorities - key questions - cases title: StepName description: Pipeline step identifiers — values match the frontend stepLabel exactly. DocumentSectionModel: properties: id: type: string format: uuid title: Id plan_id: type: string format: uuid title: Plan Id position: type: integer title: Position role: type: string title: Role heading: anyOf: - type: string - type: 'null' title: Heading content: type: string title: Content source: $ref: '#/components/schemas/ItemSource' status: $ref: '#/components/schemas/ItemStatus' generation_status: anyOf: - $ref: '#/components/schemas/DocumentStatus' - type: 'null' word_budget: anyOf: - type: integer - type: 'null' title: Word Budget source_refs: anyOf: - items: $ref: '#/components/schemas/SectionSourceRef' type: array - type: 'null' title: Source Refs 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 type: object required: - id - plan_id - position - role - content - source - status - created_at - updated_at title: DocumentSectionModel CasesStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitCasesRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitCasesRequest' - type: 'null' question_mappings: items: $ref: '#/components/schemas/QuestionMappingInfo' type: array title: Question Mappings available_holdings: items: $ref: '#/components/schemas/AvailableCase' type: array title: Available Holdings has_unmapped_cases: type: boolean title: Has Unmapped Cases default: false type: object required: - status - suggestion - selection - question_mappings - available_holdings title: CasesStepResponse SummaryStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitSummaryRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitSummaryRequest' - type: 'null' type: object required: - status - suggestion - selection title: SummaryStepResponse ImproveResponse: properties: proposed_content: type: string title: Proposed Content type: object required: - proposed_content title: ImproveResponse AvailableHolding: properties: holding_id: type: string format: uuid title: Holding Id text: type: string title: Text type: object required: - holding_id - text title: AvailableHolding ReconcileRequest: properties: coa_ids: anyOf: - items: type: string format: uuid type: array - type: 'null' title: Coa Ids type: object title: ReconcileRequest description: Causes of action to update. Omit / null to self-derive from the completeness gaps. ResearchChatContextResponse: properties: context_markdown: type: string title: Context Markdown research_title: anyOf: - type: string - type: 'null' title: Research Title matter_id: anyOf: - type: string - type: 'null' title: Matter Id cases: additionalProperties: type: string format: uuid type: object title: Cases type: object required: - context_markdown - research_title - matter_id title: ResearchChatContextResponse description: Formatted research context for Smart Bot seed message injection. ResearchStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' selection: anyOf: - $ref: '#/components/schemas/Research' - type: 'null' type: object required: - status - selection title: ResearchStepResponse ApplicabilityLevel: type: string enum: - unsupported - thin - arguable - strong - decisive title: ApplicabilityLevel description: 'Strength of support, weakest to strongest. Tiers: unsupported (contradicts, or a required element is missing); thin (partial, parts rest on weak or indirect grounds); arguable (reasonable, with real counterarguments available); strong (firm across the required elements); decisive (near-total, little room for genuine counterargument).' PartiesStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitPartiesRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitPartiesRequest' - type: 'null' type: object required: - status - suggestion - selection title: PartiesStepResponse ResearchIntakeRequest: properties: title: type: string title: Title default: '' research_type: $ref: '#/components/schemas/ResearchType' fact_pattern: type: string title: Fact Pattern jurisdiction: $ref: '#/components/schemas/UsStates' jurisdiction_extra: anyOf: - type: string - type: 'null' title: Jurisdiction Extra federal_district: anyOf: - type: string - type: 'null' title: Federal District filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' court_selection: $ref: '#/components/schemas/CourtSelection' default: State and Federal party_to_favor: anyOf: - type: string - type: 'null' title: Party To Favor litigation_stage: anyOf: - $ref: '#/components/schemas/LitigationStage' - type: 'null' venue: anyOf: - type: string - type: 'null' title: Venue judge: anyOf: - type: string - type: 'null' title: Judge draft_document_type: anyOf: - $ref: '#/components/schemas/DraftDocumentType' - type: 'null' draft_document_inputs: anyOf: - $ref: '#/components/schemas/DraftDocumentInputs' - type: 'null' seed_causes_of_action: items: type: string type: array title: Seed Causes Of Action limit_to_seeded_coas: type: boolean title: Limit To Seeded Coas default: false phase_type: anyOf: - $ref: '#/components/schemas/PhaseType' - type: 'null' default: quick_answer entry_point_type: anyOf: - $ref: '#/components/schemas/EntryPointType' - type: 'null' default: factual type: object required: - research_type - fact_pattern - jurisdiction title: ResearchIntakeRequest description: Full intake payload used by PUT (commit). All core fields required. CreateResearchRequest: properties: title: type: string title: Title default: '' research_type: $ref: '#/components/schemas/ResearchType' default: litigation fact_pattern: type: string title: Fact Pattern jurisdiction: $ref: '#/components/schemas/UsStates' jurisdiction_extra: anyOf: - type: string - type: 'null' title: Jurisdiction Extra federal_district: anyOf: - type: string - type: 'null' title: Federal District filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' court_selection: $ref: '#/components/schemas/CourtSelection' default: State and Federal party_to_favor: anyOf: - type: string - type: 'null' title: Party To Favor litigation_stage: anyOf: - $ref: '#/components/schemas/LitigationStage' - type: 'null' venue: anyOf: - type: string - type: 'null' title: Venue judge: anyOf: - type: string - type: 'null' title: Judge draft_document_type: anyOf: - $ref: '#/components/schemas/DraftDocumentType' - type: 'null' draft_document_inputs: anyOf: - $ref: '#/components/schemas/DraftDocumentInputs' - type: 'null' seed_causes_of_action: items: type: string type: array title: Seed Causes Of Action limit_to_seeded_coas: type: boolean title: Limit To Seeded Coas default: false use_agentic_fill: type: boolean title: Use Agentic Fill default: false task_mode: $ref: '#/components/schemas/TaskMode' default: full phase_type: anyOf: - $ref: '#/components/schemas/PhaseType' - type: 'null' default: quick_answer entry_point_type: anyOf: - $ref: '#/components/schemas/EntryPointType' - type: 'null' default: factual pending_document_ids: items: type: string format: uuid type: array title: Pending Document Ids matter_id: anyOf: - type: string - type: 'null' title: Matter Id source_dataset_id: anyOf: - type: integer - type: 'null' title: Source Dataset Id memory_enabled: anyOf: - type: boolean - type: 'null' title: Memory Enabled type: object required: - fact_pattern - jurisdiction title: CreateResearchRequest description: Payload for creating a new research with intake metadata. SyncMappingRequest: properties: mappings: items: $ref: '#/components/schemas/MappingTuple' type: array title: Mappings type: object required: - mappings title: SyncMappingRequest FactsEvidenceResponse: properties: available: type: boolean title: Available facts_evidence: anyOf: - $ref: '#/components/schemas/FactsEvidenceBundle' - type: 'null' type: object required: - available title: FactsEvidenceResponse description: 'Facts & Evidence state for a research. ``available`` is false when no completed Timeline & Facts task is linked to the matter — the FE then shows an empty state rather than a fact list.' LegalResearchV3Record: properties: id: type: string format: uuid title: Id user_id: type: string title: User Id title: anyOf: - type: string - type: 'null' title: Title research_type: anyOf: - $ref: '#/components/schemas/ResearchType' - type: 'null' status: anyOf: - type: string - type: 'null' title: Status current_step: anyOf: - $ref: '#/components/schemas/StepName' - type: 'null' created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At document_count: type: integer title: Document Count default: 0 task_mode: $ref: '#/components/schemas/TaskMode' default: full type: object required: - id - user_id - title - research_type - status - current_step - created_at - updated_at title: LegalResearchV3Record description: 'Public: research metadata for listing views.' UpdatePartyAlignmentRequest: properties: client_name: anyOf: - type: string - type: 'null' title: Client Name client_role: anyOf: - type: string - type: 'null' title: Client Role co_clients: anyOf: - items: $ref: '#/components/schemas/AlignedParty' type: array - type: 'null' title: Co Clients opposing_parties: anyOf: - items: $ref: '#/components/schemas/AlignedParty' type: array - type: 'null' title: Opposing Parties counsel_names: anyOf: - items: type: string type: array - type: 'null' title: Counsel Names firm_name: anyOf: - type: string - type: 'null' title: Firm Name signatory_name: anyOf: - type: string - type: 'null' title: Signatory Name signatory_title: anyOf: - type: string - type: 'null' title: Signatory Title type: object title: UpdatePartyAlignmentRequest description: Partial edit — only fields present in the request (``model_fields_set``) are applied. MemoStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: MemoStatusResponse DemandLetterLetterRequest: properties: demander: $ref: '#/components/schemas/ContactInformation' sender: $ref: '#/components/schemas/ContactInformation' recipient: $ref: '#/components/schemas/ContactInformation' tone: $ref: '#/components/schemas/DemandLetterTone' default: assertive length: $ref: '#/components/schemas/DemandLetterLength' default: extensive custom_instructions: type: string title: Custom Instructions default: '' damages_info: type: string title: Damages Info default: '' additional_background: type: string title: Additional Background default: '' demands: items: $ref: '#/components/schemas/Demand' type: array title: Demands type: object title: DemandLetterLetterRequest InsuranceLawSubAreasEnum: type: string enum: - Disability Insurance Law - Accident Benefits Law - Captive Insurance Law title: InsuranceLawSubAreasEnum ExtractIntakePartiesResponse: properties: parties: items: $ref: '#/components/schemas/ExtractedIntakeParty' type: array title: Parties type: object title: ExtractIntakePartiesResponse description: Normalized parties-with-roles in the structure the intake form consumes. JurisdictionLevel: type: string enum: - Federal - State - Mixed title: JurisdictionLevel SubQuestionStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitSubQuestionRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitSubQuestionRequest' - type: 'null' type: object required: - status - suggestion - selection title: SubQuestionStepResponse FollowupStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitFollowupRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitFollowupRequest' - type: 'null' type: object required: - status - suggestion - selection title: FollowupStepResponse MissingDetailsRequest: properties: document_key: type: string title: Document Key draft_content: type: string title: Draft Content default: '' type: object required: - document_key title: MissingDetailsRequest AnalysisStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitAnalysisRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitAnalysisRequest' - type: 'null' type: object required: - status - suggestion - selection title: AnalysisStepResponse ComplaintStatusResponse: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title title: anyOf: - type: string - type: 'null' title: Title description: 'Deprecated duplicate of document_title. Remove once useComplaintGeneration.ts (FE) reads document_title instead and that change has deployed.' readOnly: true type: object required: - status - title title: ComplaintStatusResponse CompletionGapTier: type: string enum: - blocking - warn title: CompletionGapTier CommercialAndTradeLawSubAreasEnum: type: string enum: - Trade Law - Commercial Transactions Law - Admiralty and Maritime Law - Consumer Protection Law - Franchise Law - Antitrust and Competition Law title: CommercialAndTradeLawSubAreasEnum GenerateMappingRequest: properties: target_type: type: string enum: - case - question - all title: Target Type target_id: anyOf: - type: string format: uuid - type: 'null' title: Target Id type: object required: - target_type title: GenerateMappingRequest HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError EnsureFillAction: type: string enum: - started - resuming - migrated - render_readonly - already_agentic title: EnsureFillAction description: What ensure_fill did / what the FE should do next. RenameResponse: properties: status: type: string title: Status new_title: type: string title: New Title type: object required: - status - new_title title: RenameResponse LegalAuthority: properties: authority_name: type: string title: Authority Name default: '' bluebook: type: string title: Bluebook default: '' url: type: string title: Url default: '' description: type: string title: Description default: '' key_provision: anyOf: - $ref: '#/components/schemas/KeyProvision' - type: 'null' summary: anyOf: - $ref: '#/components/schemas/LegalAuthoritySummary' - type: 'null' relative_summary: $ref: '#/components/schemas/RelativeLegalAuthoritySummary' description: The summary of the legal authority with respect to the current case. default: jurisdictions: '' purpose: '' scope: '' key_provisions: [] penalties_remedies: '' definitions: '' interpretations: '' precedents: '' relevance: '' openlaws_id: anyOf: - type: string - type: 'null' title: Openlaws Id openlaws_url: anyOf: - type: string - type: 'null' title: Openlaws Url openlaws_status: anyOf: - $ref: '#/components/schemas/AuthorityValidityStatus' - type: 'null' verification_status: anyOf: - $ref: '#/components/schemas/AuthorityVerificationStatus' - type: 'null' verification_reasoning: anyOf: - type: string - type: 'null' title: Verification Reasoning replacement_authority: anyOf: - type: string - type: 'null' title: Replacement Authority applicability: anyOf: - $ref: '#/components/schemas/ApplicabilityLevel' - type: 'null' authority_class: $ref: '#/components/schemas/AuthorityClass' default: statute provenance: type: string enum: - openlaws - web - model_only title: Provenance default: model_only evidence_url: anyOf: - type: string - type: 'null' title: Evidence Url openlaws_content: anyOf: - type: string - type: 'null' title: Openlaws Content display_ancestors: items: $ref: '#/components/schemas/OpenLawsAncestor' type: array title: Display Ancestors description: Ancestor breadcrumb labels examples: - - display_name: Title 42 path: title-42 statute_pieces: anyOf: - $ref: '#/components/schemas/StatutePieces' - type: 'null' law_key: anyOf: - type: string - type: 'null' title: Law Key effective_date_start: anyOf: - type: string format: date - type: 'null' title: Effective Date Start effective_date_end: anyOf: - type: string format: date - type: 'null' title: Effective Date End renumbered_to: anyOf: - type: string - type: 'null' title: Renumbered To volume: anyOf: - type: string - type: 'null' title: Volume author: anyOf: - type: string - type: 'null' title: Author url_accessed: type: string format: date title: Url Accessed date_issued: anyOf: - type: string format: date - type: 'null' title: Date Issued publisher: anyOf: - type: string - type: 'null' title: Publisher edition: anyOf: - type: string - type: 'null' title: Edition year: anyOf: - type: integer - type: 'null' title: Year type: object title: LegalAuthority EnvironmentalAndNaturalResourceLawSubAreasEnum: type: string enum: - Water Resources and Wetlands Law - Forest Resources Law - Contaminant Cleanup Law - Waste Management Law - Air Quality Law - Water Quality Law - Mineral Resources Law - Environmental, Social, and Governance Law - Chemical Safety Law - Fish and Game Law - Impact Assessment Law - Wildlife and Plants Law title: EnvironmentalAndNaturalResourceLawSubAreasEnum ExportDocxRequest: properties: document_key: type: string title: Document Key document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id variant: type: string enum: - original - edited title: Variant default: original type: object required: - document_key title: ExportDocxRequest MissingDetailsResult: properties: fields: items: $ref: '#/components/schemas/MissingDetailField' type: array title: Fields type: object required: - fields title: MissingDetailsResult TransportationLawSubAreasEnum: type: string enum: - Motor Vehicle Law - Aviation Law - Railway Law title: TransportationLawSubAreasEnum HoldingSelection: properties: case_id: type: string format: uuid title: Case Id holding_ids: items: type: string format: uuid type: array title: Holding Ids type: object required: - case_id - holding_ids title: HoldingSelection SaveTaskMemoryResponse: properties: saved: type: boolean title: Saved skipped_reason: anyOf: - type: string - type: 'null' title: Skipped Reason doc_id: anyOf: - type: string - type: 'null' title: Doc Id type: object required: - saved title: SaveTaskMemoryResponse CitationCheckResponse: properties: result: $ref: '#/components/schemas/CitationCheckResult' type: object required: - result title: CitationCheckResponse ItemStatus: type: string enum: - staged - committed title: ItemStatus DemandLetterGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id template_doc_id: anyOf: - type: string format: uuid - type: 'null' title: Template Doc Id style_approach: anyOf: - type: string enum: - lr_draft_first - doc_agent_direct - type: 'null' title: Style Approach type: object title: DemandLetterGenerateRequest CompletionGap: properties: item_type: type: string enum: - coa - question - case - party - summary - theory - authority - facts title: Item Type item_id: anyOf: - type: string format: uuid - type: 'null' title: Item Id item_name: type: string title: Item Name reason: type: string title: Reason tier: $ref: '#/components/schemas/CompletionGapTier' type: object required: - item_type - item_name - reason - tier title: CompletionGap description: One missing/ungrounded item found by the completeness gate. LitigationStage: type: string enum: - State Trial Court - State Court of Appeals - State Supreme Court - Federal District Court - Federal Court of Appeals - U.S. Supreme Court - Federal Specialized Court - Other title: LitigationStage SeedAffirmativeDefense: properties: defense: type: string title: Defense type: object required: - defense title: SeedAffirmativeDefense MILDocumentInfo: properties: status: $ref: '#/components/schemas/DocumentStatus' error: anyOf: - type: string - type: 'null' title: Error progress: anyOf: - type: string - type: 'null' title: Progress started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At download_url: anyOf: - type: string - type: 'null' title: Download Url document_title: anyOf: - type: string - type: 'null' title: Document Title type: object required: - status title: MILDocumentInfo AddSubQuestionRequest: properties: question: type: string minLength: 1 title: Question question_label: type: string minLength: 1 title: Question Label type: object required: - question - question_label title: AddSubQuestionRequest SoFParagraphItem: properties: paragraph_id: type: string format: uuid title: Paragraph Id content: $ref: '#/components/schemas/SoFParagraph' evidence: items: $ref: '#/components/schemas/ResearchExhibit' type: array title: Evidence source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - paragraph_id - content title: SoFParagraphItem SectionEditRequest: properties: heading: anyOf: - type: string - type: 'null' title: Heading content: type: string minLength: 1 title: Content type: object required: - content title: SectionEditRequest AddAdAuthorityRequest: properties: authority_name: type: string minLength: 1 title: Authority Name bluebook: type: string title: Bluebook default: '' description: type: string title: Description default: '' type: object required: - authority_name title: AddAdAuthorityRequest AddKeyQuestionRequest: properties: question: type: string minLength: 1 title: Question question_label: type: string minLength: 1 title: Question Label type: object required: - question - question_label title: AddKeyQuestionRequest ResearchDocumentsResponse: properties: documents: items: $ref: '#/components/schemas/ResearchDocumentItem' type: array title: Documents type: object required: - documents title: ResearchDocumentsResponse AdAuthorityStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitAdAuthorityRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitAdAuthorityRequest' - type: 'null' type: object required: - status - suggestion - selection title: AdAuthorityStepResponse FinanceAndLendingLawSubAreasEnum: type: string enum: - Commercial Finance Law - Lender Liability Law - Debt Collection Law - Structured Finance Law title: FinanceAndLendingLawSubAreasEnum CaseV3: properties: caselaw_db_id: type: string format: uuid title: Caselaw Db Id case_name: type: string title: Case Name volume: type: string title: Volume reporter: type: string title: Reporter page: type: string title: Page slip: anyOf: - $ref: '#/components/schemas/SlipIdentity' - type: 'null' holdings: additionalProperties: type: string propertyNames: format: uuid type: object title: Holdings dicta: items: type: string type: array title: Dicta posture: anyOf: - $ref: '#/components/schemas/CasePosture' - type: 'null' type: object required: - caselaw_db_id - case_name - volume - reporter - page title: CaseV3 CoaSlice: properties: key_question: $ref: '#/components/schemas/KeyQuestionStepResponse' cases: $ref: '#/components/schemas/CasesStepResponse' legal_authority: $ref: '#/components/schemas/AuthorityStepResponse' affirmative_defense: $ref: '#/components/schemas/ADStepResponse' ad_legal_authority: additionalProperties: $ref: '#/components/schemas/AdAuthorityStepResponse' propertyNames: format: uuid type: object title: Ad Legal Authority subquestion: additionalProperties: $ref: '#/components/schemas/SubQuestionStepResponse' propertyNames: format: uuid type: object title: Subquestion analysis: additionalProperties: $ref: '#/components/schemas/AnalysisStepResponse' propertyNames: format: uuid type: object title: Analysis retrieval: additionalProperties: $ref: '#/components/schemas/RetrievalStepResponse' propertyNames: format: uuid type: object title: Retrieval type: object required: - key_question - cases - legal_authority - affirmative_defense - ad_legal_authority - subquestion - analysis - retrieval title: CoaSlice Depth: type: string enum: - succinct - balanced - exhaustive title: Depth StepStatus: type: string enum: - not_started - seeded - generating - generated - completed title: StepStatus KeyQuestionStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitKeyQuestionRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitKeyQuestionRequest' - type: 'null' type: object required: - status - suggestion - selection title: KeyQuestionStepResponse HoldingDbIds: properties: holding_id: type: string format: uuid title: Holding Id case_id: type: string format: uuid title: Case Id coa_id: type: string format: uuid title: Coa Id question_id: type: string format: uuid title: Question Id cluster_id: type: integer title: Cluster Id type: object required: - holding_id - case_id - coa_id - question_id - cluster_id title: HoldingDbIds EntryPointType: type: string enum: - factual - caselaw - statute - legal_question - document title: EntryPointType EmailAdjustRequest: properties: audience: $ref: '#/components/schemas/Audience' formality: $ref: '#/components/schemas/Formality' depth: $ref: '#/components/schemas/Depth' goal: type: string maxLength: 2000 minLength: 1 title: Goal confidential: type: boolean title: Confidential default: false original_email: type: string minLength: 1 title: Original Email feedback: type: string maxLength: 2000 minLength: 1 title: Feedback type: object required: - audience - formality - depth - goal - original_email - feedback title: EmailAdjustRequest ExportPdfResponse: properties: download_url: anyOf: - type: string - type: 'null' title: Download Url error: anyOf: - type: string - type: 'null' title: Error type: object title: ExportPdfResponse CommitADItem: properties: defense_id: type: string format: uuid title: Defense Id content: $ref: '#/components/schemas/AffirmativeDefenseV3' source: anyOf: - $ref: '#/components/schemas/ItemSource' - type: 'null' lifecycle: anyOf: - $ref: '#/components/schemas/ItemLifecycle' - type: 'null' type: object required: - defense_id - content title: CommitADItem ChatMessageRead: properties: id: type: string format: uuid title: Id role: $ref: '#/components/schemas/ChatMessageRole' content: type: string title: Content created_at: type: string format: date-time title: Created At type: object required: - id - role - content - created_at title: ChatMessageRead CitableDocument: properties: document_id: type: string title: Document Id filename: type: string title: Filename type: object required: - document_id - filename title: CitableDocument MatterComplaintCausesResponse: properties: status: $ref: '#/components/schemas/StepStatus' complaint_document_id: anyOf: - type: string format: uuid - type: 'null' title: Complaint Document Id complaint_document_name: anyOf: - type: string - type: 'null' title: Complaint Document Name seed_causes_of_action: items: type: string type: array title: Seed Causes Of Action type: object required: - status title: MatterComplaintCausesResponse description: 'The operative complaint and its causes of action for a matter''s intake prefill. ``status`` follows the same poll contract as the document-intake endpoint: GENERATING while extraction is in flight, COMPLETED once it resolves (or when there is no complaint at all — an empty result is a terminal, non-error state so the FE stops polling and simply seeds nothing).' FactsEvidenceExhibit: properties: label: type: string title: Label description: Exhibit label, e.g. 'A', 'R', 'AA'. filename: anyOf: - type: string - type: 'null' title: Filename page: anyOf: - type: integer - type: 'null' title: Page bates_number: anyOf: - type: string - type: 'null' title: Bates Number type: object required: - label title: FactsEvidenceExhibit description: One exhibit backing a fact, in the same shape the eDiscovery UI uses. MappingTuple: properties: question_id: type: string format: uuid title: Question Id case_id: type: string format: uuid title: Case Id holding_id: type: string format: uuid title: Holding Id type: object required: - question_id - case_id - holding_id title: MappingTuple PromptOverrideItem: properties: prompt_key: type: string title: Prompt Key label: type: string title: Label default_text: type: string title: Default Text override_text: anyOf: - type: string - type: 'null' title: Override Text is_active: type: boolean title: Is Active default: false has_override: type: boolean title: Has Override default: false updated_by: anyOf: - type: string - type: 'null' title: Updated By updated_at: anyOf: - type: string - type: 'null' title: Updated At type: object required: - prompt_key - label - default_text title: PromptOverrideItem CaseCiteVerificationResult: properties: total_case_citations: type: integer title: Total Case Citations verified_count: type: integer title: Verified Count unverifiable_count: type: integer title: Unverifiable Count unsupported_count: type: integer title: Unsupported Count default: 0 partial_count: type: integer title: Partial Count default: 0 contradicted_count: type: integer title: Contradicted Count default: 0 error_count: type: integer title: Error Count default: 0 items: items: $ref: '#/components/schemas/CaseCiteVerificationItem' type: array title: Items type: object required: - total_case_citations - verified_count - unverifiable_count - items title: CaseCiteVerificationResult MtdFilingGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id record: anyOf: - items: $ref: '#/components/schemas/RecordDesignation' type: array - type: 'null' title: Record complaint_document_id: anyOf: - type: string format: uuid - type: 'null' title: Complaint Document Id type: object title: MtdFilingGenerateRequest CommitCasesRequest: properties: cases: items: $ref: '#/components/schemas/CommitCaseItem' type: array minItems: 1 title: Cases type: object required: - cases title: CommitCasesRequest CoAJurisdictionalInfo: properties: primary_jurisdiction: $ref: '#/components/schemas/JurisdictionLevel' description: The primary jurisdiction. default: Federal state: type: string title: State description: The most relevant U.S. state (if applicable). default: '' key_considerations: items: type: string type: array title: Key Considerations description: Key considerations for jurisdiction. potential_challenges: items: type: string type: array title: Potential Challenges description: Potential challenges to jurisdiction. conclusion: type: string title: Conclusion description: A succinct executive summary of the jurisdictional analysis. default: '' type: object title: CoAJurisdictionalInfo SupportLevel: type: string enum: - FULLY_COVERED - PARTIALLY_COVERED - NOT_COVERED title: SupportLevel ScoreResponse: properties: scorecard: $ref: '#/components/schemas/ScorecardResult' type: object required: - scorecard title: ScoreResponse Audience: type: string enum: - client - colleagues - senior_management - junior_staff - legal_opponent title: Audience ADStepResponse: properties: status: $ref: '#/components/schemas/StepStatus' suggestion: anyOf: - $ref: '#/components/schemas/CommitADRequest' - type: 'null' selection: anyOf: - $ref: '#/components/schemas/CommitADRequest' - type: 'null' type: object required: - status - suggestion - selection title: ADStepResponse DemandLetterDocumentInfo: properties: download_url: anyOf: - type: string - type: 'null' title: Download Url title: anyOf: - type: string - type: 'null' title: Title type: object title: DemandLetterDocumentInfo TelecommunicationsMediaAndEntertainmentLawSubAreasEnum: type: string enum: - Entertainment Law - Telecommunications Law - Sports Law - Advertising Law title: TelecommunicationsMediaAndEntertainmentLawSubAreasEnum CommitAnalysisRequest: properties: analyses: items: $ref: '#/components/schemas/CommitAnalysisItem' type: array minItems: 1 title: Analyses type: object required: - analyses title: CommitAnalysisRequest IntakeGuidanceRequest: properties: guidance: anyOf: - type: string maxLength: 2000 - type: 'null' title: Guidance type: object title: IntakeGuidanceRequest description: User-provided guidance describing how the document should be used in the research. PreGenerationWarningsResponse: properties: warnings: items: $ref: '#/components/schemas/PreGenerationWarning' type: array title: Warnings resolved_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' filing_court: anyOf: - type: string - type: 'null' title: Filing Court filing_court_source: anyOf: - type: string enum: - intake - research - document - suggested - type: 'null' title: Filing Court Source type: object required: - warnings - resolved_forum title: PreGenerationWarningsResponse PartyAlignmentProvenance: properties: client_name: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' client_role: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' co_clients: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' opposing_parties: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' counsel_names: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' firm_name: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' signatory_name: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' signatory_title: anyOf: - $ref: '#/components/schemas/PartyAlignmentSource' - type: 'null' type: object title: PartyAlignmentProvenance description: Per-field source, one attribute per ``PartyAlignment`` data field. None = never resolved. MemoGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' citation_style: type: string enum: - footnote - inline title: Citation Style default: footnote template_doc_id: anyOf: - type: string format: uuid - type: 'null' title: Template Doc Id style_approach: anyOf: - type: string enum: - lr_draft_first - doc_agent_direct - type: 'null' title: Style Approach type: object title: MemoGenerateRequest ContractLawSubAreasEnum: type: string enum: - Property Rights and Transactions Law - Civil Contract Law - Commercial Transactions Law - Government Contracts Law - Employment Contracts Law - Independent Contractor Law title: ContractLawSubAreasEnum PhaseType: type: string enum: - quick_answer - pre_litigation - complaint - answer - discovery - dispositive_motions - trial - appeal title: PhaseType description: Litigation lifecycle phases - for future use. CauseofAction: properties: area_of_law: anyOf: - $ref: '#/components/schemas/AreasOfLaw' - type: 'null' sub_areas: items: anyOf: - $ref: '#/components/schemas/ConstitutionalAndCivilRightsLawSubAreasEnum' - $ref: '#/components/schemas/PersonalInjuryAndTortLawSubAreasEnum' - $ref: '#/components/schemas/InformationSecurityLawSubAreasEnum' - $ref: '#/components/schemas/BankingLawSubAreasEnum' - $ref: '#/components/schemas/PublicAndAdministrativeLawSubAreasEnum' - $ref: '#/components/schemas/BankruptcyInsolvencyAndRestructuringLawSubAreasEnum' - $ref: '#/components/schemas/EnergyLawSubAreasEnum' - $ref: '#/components/schemas/TransportationLawSubAreasEnum' - $ref: '#/components/schemas/PersonalAndFamilyLawSubAreasEnum' - $ref: '#/components/schemas/ReligiousLawSubAreasEnum' - $ref: '#/components/schemas/SecuritiesAndFinancialInstrumentsLawSubAreasEnum' - $ref: '#/components/schemas/ContractLawSubAreasEnum' - $ref: '#/components/schemas/LaborAndEmploymentLawSubAreasEnum' - $ref: '#/components/schemas/InsuranceLawSubAreasEnum' - $ref: '#/components/schemas/RealPropertyLawSubAreasEnum' - $ref: '#/components/schemas/IntellectualPropertyLawSubAreasEnum' - $ref: '#/components/schemas/FinanceAndLendingLawSubAreasEnum' - $ref: '#/components/schemas/CorporateLawSubAreasEnum' - $ref: '#/components/schemas/CriminalLawSubAreasEnum' - $ref: '#/components/schemas/EnvironmentalAndNaturalResourceLawSubAreasEnum' - $ref: '#/components/schemas/TaxAndRevenueLawSubAreasEnum' - $ref: '#/components/schemas/TelecommunicationsMediaAndEntertainmentLawSubAreasEnum' - $ref: '#/components/schemas/CommercialAndTradeLawSubAreasEnum' type: array title: Sub Areas cause_of_action_name: type: string title: Cause Of Action Name overview: type: string title: Overview default: '' relevance: type: string title: Relevance default: '' authority_types: items: $ref: '#/components/schemas/Authority' type: array title: Authority Types deepdive: items: $ref: '#/components/schemas/ProcessedParagraph' type: array title: Deepdive jurisdictional_analysis: $ref: '#/components/schemas/CoAJurisdictionalInfo' default: primary_jurisdiction: Federal state: '' key_considerations: [] potential_challenges: [] conclusion: '' user_court_selection: anyOf: - $ref: '#/components/schemas/CourtSelection' - type: 'null' governing_law: anyOf: - type: string - type: 'null' title: Governing Law relevant_courts: items: type: string type: array uniqueItems: true title: Relevant Courts applicability: anyOf: - $ref: '#/components/schemas/ApplicabilityLevel' - type: 'null' only_use_case_law: type: boolean title: Only Use Case Law default: false only_use_case_law_reason: anyOf: - type: string - type: 'null' title: Only Use Case Law Reason authority_keys: items: type: string format: uuid type: array title: Authority Keys question_keys: items: type: string format: uuid type: array title: Question Keys case_keys: items: type: string format: uuid type: array title: Case Keys defense_keys: items: type: string format: uuid type: array title: Defense Keys type: object required: - cause_of_action_name title: CauseofAction EmailGenerateRequest: properties: audience: $ref: '#/components/schemas/Audience' formality: $ref: '#/components/schemas/Formality' depth: $ref: '#/components/schemas/Depth' goal: type: string maxLength: 2000 minLength: 1 title: Goal confidential: type: boolean title: Confidential default: false type: object required: - audience - formality - depth - goal title: EmailGenerateRequest RegisterExhibitRequest: properties: document_id: type: string minLength: 1 title: Document Id page: anyOf: - type: integer minimum: 0.0 - type: 'null' title: Page type: object required: - document_id title: RegisterExhibitRequest ConstitutionalAndCivilRightsLawSubAreasEnum: type: string enum: - Individual Rights Law - Environmental, Social, and Governance Law - Discrimination Law - Political Rights Law title: ConstitutionalAndCivilRightsLawSubAreasEnum QuestionAnalysis: properties: evaluations: items: $ref: '#/components/schemas/EvaluationCriterion' type: array title: Evaluations description: A list of evaluation criteria with their assessments, strictly scoped to the question under evaluation. answer: type: string title: Answer description: An incisive and decisive short answer default: '' type: object title: QuestionAnalysis AddCOARequest: properties: cause_of_action_name: type: string minLength: 1 title: Cause Of Action Name court_scope: anyOf: - $ref: '#/components/schemas/CourtSelection' - type: 'null' type: object required: - cause_of_action_name title: AddCOARequest UsStates: type: string enum: - Alabama - Alaska - Arizona - Arkansas - California - Colorado - Connecticut - Delaware - District of Columbia - Florida - Georgia - Guam - Hawaii - Idaho - Illinois - Indiana - Iowa - Kansas - Kentucky - Louisiana - Maine - Maryland - Massachusetts - Michigan - Minnesota - Mississippi - Missouri - Montana - Nebraska - Nevada - New Hampshire - New Jersey - New Mexico - New York - North Carolina - North Dakota - Northern Mariana Islands - Ohio - Oklahoma - Oregon - Pennsylvania - Puerto Rico - Rhode Island - South Carolina - South Dakota - Tennessee - Texas - Utah - Vermont - Virgin Islands - Virginia - Washington - West Virginia - Wisconsin - Wyoming title: UsStates MILGenerateRequest: properties: page_limit: anyOf: - type: integer maximum: 500.0 minimum: 1.0 - type: 'null' title: Page Limit retain_prior_drafts: type: boolean title: Retain Prior Drafts default: true filing_forum: anyOf: - $ref: '#/components/schemas/FilingForum' - type: 'null' responding_to_document_id: anyOf: - type: string format: uuid - type: 'null' title: Responding To Document Id evidence_at_issue: anyOf: - type: string maxLength: 2000 - type: 'null' title: Evidence At Issue type: object title: MILGenerateRequest description: 'Optional-field parity with the other *GenerateRequest models. No complaint/template fields (contrast MTDGenerateRequest) — a motion in limine argues over anticipated trial evidence, not a specific uploaded pleading, and has no v1 templating story of its own (mirrors BriefGenerateAgenticRequest''s documented scope cut).'