openapi: 3.2.0 info: title: CallidusAI Platform API description: Callidus AI backend API version: 0.1.0 tags: - name: Platform paths: /platform/admin/users/{target_user_id}/purge-work-data: post: tags: - Platform summary: Purge User Work Data Route description: 'Delete Doc Hub, blobs, eDiscovery, analytics, and related work data. Does not delete ``model_usage_ledger`` (retained for cost of deleted users). Postgres and eDiscovery commits run **before** blob-container and vector-table deletes so a failed commit cannot leave DB rows pointing at storage that already gone. The two commits are independent databases (no 2PC): if ``db.commit()`` succeeds and ``ediscovery_db.commit()`` fails, Postgres work data is already gone and a retry is idempotent. The response is 200 only after both commits and the external deletes succeed.' operationId: purge_user_work_data_route_platform_admin_users__target_user_id__purge_work_data_post parameters: - name: target_user_id in: path required: true schema: type: string title: Target User Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PurgeWorkDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks/{task_id}/audit-logs: post: tags: - Platform summary: Create Audit Log description: 'Create a new audit log entry for a task. Requires can_edit permission on the conversation or legal research session.' operationId: create_audit_log_platform_tasks__task_id__audit_logs_post parameters: - name: task_id in: path required: true schema: type: string title: Task Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TaskAuditLogCreateRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskAuditLogResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Platform summary: List Audit Logs description: 'List audit log entries for a task. Requires can_view permission on the conversation or legal research session.' operationId: list_audit_logs_platform_tasks__task_id__audit_logs_get parameters: - name: task_id in: path required: true schema: type: string title: Task Id - name: module_type in: query required: true schema: type: string minLength: 1 title: Module Type responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskAuditLogListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/feature-flags/: get: tags: - Platform summary: List Feature Flags operationId: list_feature_flags_platform_feature_flags__get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/FeatureFlagResponse' type: array title: Response List Feature Flags Platform Feature Flags Get post: tags: - Platform summary: Create Feature Flag operationId: create_feature_flag_platform_feature_flags__post requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlagCreate' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FeatureFlagResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/feature-flags/{key}: put: tags: - Platform summary: Update Feature Flag operationId: update_feature_flag_platform_feature_flags__key__put parameters: - name: key in: path required: true schema: type: string title: Key requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FeatureFlagUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FeatureFlagResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Feature Flag operationId: delete_feature_flag_platform_feature_flags__key__delete parameters: - name: key in: path required: true schema: type: string title: Key responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Platform summary: Get Feature Flag Value description: 'Return the raw value for a given flag key. Any authenticated user can call this endpoint. Returns 404 if the flag does not exist.' operationId: get_feature_flag_value_platform_feature_flags__key__get parameters: - name: key in: path required: true schema: type: string title: Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FeatureFlagValueResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/billing/: get: tags: - Platform summary: List Billable Hours Entries Endpoint description: List all billable hours entries for a matter with per-user aggregates. operationId: list_billable_hours_entries_endpoint_platform_matters__matter_id__billing__get parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: date_from in: query required: false schema: anyOf: - type: string format: date - type: 'null' title: Date From - name: date_to in: query required: false schema: anyOf: - type: string format: date - type: 'null' title: Date To responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BillableHoursListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Platform summary: Create Billable Hours Entry Endpoint description: 'Create a new billable hours entry for the authenticated user. If an entry already exists for the same date, its hours are overwritten. Returns 201 for new entries, 200 for overwrites.' operationId: create_billable_hours_entry_endpoint_platform_matters__matter_id__billing__post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateBillableHoursRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BillableHoursEntryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/billing/team/: get: tags: - Platform summary: Team Billable Hours Summary Endpoint description: Team billable hours summary — total hours per team member (org accounts only). operationId: team_billable_hours_summary_endpoint_platform_matters__matter_id__billing_team__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/TeamBillableHoursSummaryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/billing/{entry_id}/: put: tags: - Platform summary: Update Billable Hours Entry Endpoint description: Update an existing billable hours entry (owner only). operationId: update_billable_hours_entry_endpoint_platform_matters__matter_id__billing__entry_id___put parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: entry_id in: path required: true schema: type: string title: Entry Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateBillableHoursRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BillableHoursEntryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Billable Hours Entry Endpoint description: Delete a billable hours entry (owner only). operationId: delete_billable_hours_entry_endpoint_platform_matters__matter_id__billing__entry_id___delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: entry_id in: path required: true schema: type: string title: Entry Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/billing/team/{member_user_id}/: delete: tags: - Platform summary: Delete Team Member Hours Endpoint description: 'Delete all billable hours entries for a removed team member on a matter. Only the matter owner (can_manage_members) can do this, and only for members who are no longer shared on the matter.' operationId: delete_team_member_hours_endpoint_platform_matters__matter_id__billing_team__member_user_id___delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: member_user_id in: path required: true schema: type: string title: Member User Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/billing/: get: tags: - Platform summary: User Billable Hours Aggregates Endpoint description: Return the authenticated user's cross-matter billable hours aggregates. operationId: user_billable_hours_aggregates_endpoint_platform_billing__get parameters: - name: date_from in: query required: false schema: anyOf: - type: string format: date - type: 'null' title: Date From - name: date_to in: query required: false schema: anyOf: - type: string format: date - type: 'null' title: Date To responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UserBillableHoursAggregatesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/billing/allocation: get: tags: - Platform summary: User Monthly Allocation Endpoint description: Return the authenticated user's per-matter allocation for the current month. operationId: user_monthly_allocation_endpoint_platform_billing_allocation_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MonthlyAllocationResponse' /platform/clients/: post: tags: - Platform summary: Create Client Endpoint description: Create a new client contact. Caller becomes owner via user_id. operationId: create_client_endpoint_platform_clients__post requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateClientRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClientResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/clients/{client_id}: patch: tags: - Platform summary: Update Client Endpoint description: Update a client contact. Only the owner can update. operationId: update_client_endpoint_platform_clients__client_id__patch parameters: - name: client_id in: path required: true schema: type: string title: Client Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateClientRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClientResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Client Endpoint description: Delete a client contact. Only the owner can delete. Linked matter-client rows cascade. operationId: delete_client_endpoint_platform_clients__client_id__delete parameters: - name: client_id in: path required: true schema: type: string title: Client Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/context-engine/{matter_id}/debug: get: tags: - Platform summary: Memory Debug description: 'Return diagnostic info: gate state, cache freshness, and doc-hub metadata.' operationId: memory_debug_platform_context_engine__matter_id__debug_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/MemoryDebugInfo' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/context-engine/{matter_id}/reset-cache: post: tags: - Platform summary: Reset Memory Cache description: Archive doc-hub MATTER_MEMORY documents and clear the JSONB cache so the next run forces a full rebuild. operationId: reset_memory_cache_platform_context_engine__matter_id__reset_cache_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: type: string title: Response Reset Memory Cache Platform Context Engine Matter Id Reset Cache Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/context-engine/{matter_id}: post: tags: - Platform summary: Context Engine description: 'Unified context engine: fast synthesis or search pipeline.' operationId: context_engine_platform_context_engine__matter_id__post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: oneOf: - $ref: '#/components/schemas/FastModeConfig' - $ref: '#/components/schemas/SearchModeConfig' - $ref: '#/components/schemas/DeepSearchModeConfig' discriminator: propertyName: mode mapping: fast: '#/components/schemas/FastModeConfig' search: '#/components/schemas/SearchModeConfig' deep_search: '#/components/schemas/DeepSearchModeConfig' title: Body responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/UnifiedFastResult' - $ref: '#/components/schemas/UnifiedSearchResult' title: Response Context Engine Platform Context Engine Matter Id Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/context-engine/task/{task_id}: post: tags: - Platform summary: Task Context Engine description: 'Task-scoped context engine (search mode). When matter intelligence is on for this task (``Matter.memory_enabled`` AND not ``Conversation.matter_memory_override``), runs the full matter search pipeline. Otherwise runs the search pipeline scoped to the task''s DocHub documents only, with no memory preload — see ``run_task_context_engine`` for the enforcement details.' operationId: task_context_engine_platform_context_engine_task__task_id__post parameters: - name: task_id in: path required: true schema: type: string title: Task Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SearchModeConfig' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UnifiedSearchResult' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/credits/used: get: tags: - Platform summary: Get Credits Used Endpoint description: 'Return total credits consumed for the specified month. When called without ``?target_user_id=``, returns credits for the authenticated caller. When ``?target_user_id=`` is provided, the caller must have internal Callidus admin (``callidus-admin`` or ``strongsuit-god``) or enterprise ``admin`` role. Query params: target_user_id: Admin-only, query another user''s credits month: Optional "YYYY-MM" format (e.g., "2026-03"). Defaults to current month.' operationId: get_credits_used_endpoint_platform_credits_used_get parameters: - name: target_user_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Target User Id - name: month in: query required: false schema: anyOf: - type: string pattern: ^\d{4}-(0[1-9]|1[0-2])$ - type: 'null' title: Month responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreditsUsedResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/credits/ledger: get: tags: - Platform summary: Get Ledger Credits Endpoint description: 'Return credits from ``model_usage_ledger`` for a calendar month or rolling window. Defaults to the current month (open-ended upper bound, same as ``get_credits_used``). Pass ``month=YYYY-MM`` to query a closed historical month (for reconciliation / debugging). Same validation window as ``GET /credits/used`` (last 12 months, not future). ``since``: ISO lower bound (inclusive) through now — mutually exclusive with ``month``. ``since`` may reach up to **730 days** in the past; ``month`` remains limited to the same **12-month** window as ``GET /credits/used``. ``target_user_id``: admin-only; same role gate as ``GET /credits/used``.' operationId: get_ledger_credits_endpoint_platform_credits_ledger_get parameters: - name: month in: query required: false schema: anyOf: - type: string pattern: ^\d{4}-(0[1-9]|1[0-2])$ - type: 'null' title: Month - name: since in: query required: false schema: anyOf: - type: string - type: 'null' title: Since - name: target_user_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Target User Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LedgerCreditsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/credit-debug/recent-usage: get: tags: - Platform summary: Recent Usage description: 'The CALLER''s most recent usage-ledger rows, newest first. Always scoped to the authenticated user — there is no ``target_user_id`` parameter, so this cannot expose another account''s usage. Rows from ``HIDDEN_BACKGROUND_MODULES`` / ``HIDDEN_BACKGROUND_STEPS`` are omitted so the panel only moves when the tester actually does something. They are still charged and still stored; this endpoint just does not show them. Zero-credit rows are omitted too. ``credits_from_cost_usd`` is ``cost/0.02`` with no rounding, so a row charging real money always has credits > 0 and this filter drops nothing current. What it does drop is the tracking-only history from Aug 6-20 2026, when this ticket recorded ``cost_usd`` while ``effective_credits`` stayed 0 by design: those rows read as "0.000000 credits / $0.01673360", which a non-technical tester would reasonably report as a billing fault. They cannot surface as the newest row today, so this is belt-and-braces — but the cost of being wrong is a reopened ticket, and the cost of the guard is one predicate. Trade-off accepted: if some future path ever records 0 credits for real work, the panel will hide it rather than show a confusing zero. Query the ledger directly to audit that case. Ordered by ``created_at`` rather than ``id``: there is no ``(user_id, id)`` index, so ordering by the primary key degrades into a backward PK scan that discards every other user''s rows until it finds a match (measured on beta: 6,124 rows discarded / 5,149 buffers to return ONE row, growing with how long the caller has been idle — and this endpoint is polled every 15s). ``idx_mul_user_created (user_id, created_at)`` serves this ordering directly. Both columns are written at insert time, so the row order is the same.' operationId: recent_usage_platform_credit_debug_recent_usage_get parameters: - name: limit in: query required: false schema: type: integer maximum: 50 minimum: 1 default: 20 title: Limit responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreditDebugResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/debug/tracemalloc: get: tags: - Platform summary: Tracemalloc Snapshot description: 'Take a tracemalloc snapshot of the current process and return the top allocators. If tracemalloc isn''t already running, this starts it and returns ``was_tracing=false`` — call again later to see meaningful growth, since the first snapshot right after ``start()`` captures almost nothing.' operationId: tracemalloc_snapshot_platform_debug_tracemalloc_get parameters: - name: limit in: query required: false schema: type: integer default: 25 title: Limit - name: stack_limit in: query required: false schema: type: integer default: 1 title: Stack Limit - name: key_type in: query required: false schema: enum: - lineno - filename - traceback type: string default: lineno title: Key Type responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TracemallocSnapshotResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/debug/tracemalloc/dump: get: tags: - Platform summary: Tracemalloc Dump description: 'Return the raw pickled snapshot from ``tracemalloc.Snapshot.dump()``. Load it locally for offline analysis, e.g.:: snapshot = tracemalloc.Snapshot.load("tracemalloc.dump") snapshot.statistics("lineno")' operationId: tracemalloc_dump_platform_debug_tracemalloc_dump_get responses: '200': description: Successful Response content: application/json: schema: {} /platform/debug/tracemalloc/start: post: tags: - Platform summary: Tracemalloc Start description: Explicitly start tracemalloc tracing, if it isn't already running. operationId: tracemalloc_start_platform_debug_tracemalloc_start_post parameters: - name: stack_limit in: query required: false schema: type: integer default: 1 title: Stack Limit responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TracemallocStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/debug/tracemalloc/stop: post: tags: - Platform summary: Tracemalloc Stop description: Explicitly stop tracemalloc tracing, if it's running. operationId: tracemalloc_stop_platform_debug_tracemalloc_stop_post responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TracemallocStatusResponse' /platform/matters/{matter_id}/clients/: post: tags: - Platform summary: Link Client Endpoint description: Link an existing client to a matter with an optional role. operationId: link_client_endpoint_platform_matters__matter_id__clients__post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LinkClientRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClientResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/clients/create: post: tags: - Platform summary: Create And Link Client Endpoint description: Create a new client and link it to a matter in one transaction. operationId: create_and_link_client_endpoint_platform_matters__matter_id__clients_create_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateAndLinkClientRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClientResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/clients/{client_id}: patch: tags: - Platform summary: Update Matter Client Endpoint description: Update the role on a matter-client link. operationId: update_matter_client_endpoint_platform_matters__matter_id__clients__client_id__patch parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: client_id in: path required: true schema: type: string title: Client Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateMatterClientRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClientResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Unlink Client Endpoint description: Unlink a client from a matter. The client record is kept. operationId: unlink_client_endpoint_platform_matters__matter_id__clients__client_id__delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: client_id in: path required: true schema: type: string title: Client Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/: get: tags: - Platform summary: List Matters Endpoint description: List all matters the user owns or has shared access to. operationId: list_matters_endpoint_platform_matters__get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/app__modules__platform__schemas__matter__MatterListResponse' post: tags: - Platform summary: Create Matter Endpoint description: 'Create a new matter. Caller becomes owner via user_id on the row. Optionally accepts ``team_member_ids`` to link team members as EDITORs on the newly created matter. Returns the creator''s permissions inline (always owner capabilities) so clients can seed their matter cache without a follow-up GET, which can transiently 404 right after create while the read path catches up.' operationId: create_matter_endpoint_platform_matters__post requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateMatterRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MatterListItemResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}: get: tags: - Platform summary: Get Matter Endpoint description: Get matter by id. Requires can_view permission. operationId: get_matter_endpoint_platform_matters__matter_id__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/MatterListItemResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Platform summary: Update Matter Endpoint description: Partially update a matter. Requires can_edit permission. operationId: update_matter_endpoint_platform_matters__matter_id__patch parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateMatterRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MatterResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Matter Endpoint description: 'Delete a matter. Requires ``can_delete`` permission on the matter. The two flags are independent; any combination is valid. Concretely: * No flags + tasks linked → 409 (caller must unlink or pass ``force``). * No flags + no tasks → 204, matter deleted. * ``force=true`` → linked tasks are detached (``matter_id`` cleared) and the matter is deleted. Files survive as unassigned (the ``matter_docs`` FK cascades the join row only, not the doc). Returns 204. * ``delete_files=true`` (with or without ``force``) → every file attached to the matter is queued for hard delete (DB row + Azure blob + vector store), including files also attached to other matters. The purge runs in the background ``BulkDeleteWorkflow``; the files disappear from every listing immediately. Returns 200 with :class:`MatterDeleteResponse`. Without ``force``, linked tasks still produce 409 first; the file-delete path only runs after the task check passes. ``GET {id}/delete-impact`` previews how many files are shared with other matters. **Per-file authorization on ``delete_files=true``:** matter ``can_delete`` is treated as authority over every document attached to the matter, including files uploaded by other team members. No per-doc owner check runs on this path (unlike ``/document/delete-document`` and ``/document/delete-documents``, which are per-doc owner-only). The intent is matter-teardown: an admin who deletes the matter is entitled to clean up everything attached to it. Callers who want to preserve a specific contributor''s files should detach them from the matter (via ``POST /document/remove-from-matter``) before calling this with ``delete_files=true``. **Why the purge is async (ENG-23658):** done inline, a matter with thousands of files outlived the 240 s gateway timeout. The client saw "failed" while the request kept destroying blobs and vectors with its DB transaction still open, so every retry blocked on its locks. **Partial-failure semantics on ``delete_files=true``:** the matter is **always** deleted on this path. Files that could not be queued are returned in ``files_failed`` and survive in the Unassigned view for manual retry; the usual one is an archive still being extracted (ENG-22114), which is refused outright. The matter cannot be un-deleted to retry in place.' operationId: delete_matter_endpoint_platform_matters__matter_id__delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: force in: query required: false schema: type: boolean description: Force-unlink any tasks linked to this matter before deleting. Without this flag, linked tasks cause a 409 response. default: false title: Force description: Force-unlink any tasks linked to this matter before deleting. Without this flag, linked tasks cause a 409 response. - name: delete_files in: query required: false schema: type: boolean description: Hard-delete files attached to this matter. Without this flag, files survive (matter_docs cascade-deletes the join row) and appear in the unassigned-files view. default: false title: Delete Files description: Hard-delete files attached to this matter. Without this flag, files survive (matter_docs cascade-deletes the join row) and appear in the unassigned-files view. responses: '200': description: Matter deleted; files queued for async purge on the delete_files path. content: application/json: schema: $ref: '#/components/schemas/MatterDeleteResponse' '204': description: Matter deleted (no body) — returned when delete_files=false. '409': description: Linked tasks present and force=false. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/delete-impact: get: tags: - Platform summary: Get Matter Delete Impact Endpoint description: 'Preview a ``delete_files=true`` delete: how many of the matter''s files are also in other matters, and would be removed from them too. Requires ``can_delete``; read-only.' operationId: get_matter_delete_impact_endpoint_platform_matters__matter_id__delete_impact_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/MatterDeleteImpactResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/transfer-ownership: post: tags: - Platform summary: Transfer Matter Ownership Endpoint description: 'Transfer ownership of a matter to another user in the same enterprise. The caller must be the current owner or hold ``can_manage_members`` on the matter. The old owner is downgraded to EDITOR.' operationId: transfer_matter_ownership_endpoint_platform_matters__matter_id__transfer_ownership_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TransferMatterOwnershipRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TransferMatterOwnershipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/regenerate-memory: post: tags: - Platform summary: Regenerate Memory Endpoint description: 'Trigger a background matter memory regeneration. Requires can_view permission. Returns 202 Accepted immediately; regeneration runs in the background. No-op if memory is not enabled for this matter.' operationId: regenerate_memory_endpoint_platform_matters__matter_id__regenerate_memory_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id responses: '202': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/_RegenerateMemoryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/preliminary-analysis: get: tags: - Platform summary: Get Preliminary Analysis Endpoint description: Return the current preliminary analysis for a matter, or indicate it's not yet available. operationId: get_preliminary_analysis_endpoint_platform_matters__matter_id__preliminary_analysis_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/PreliminaryAnalysisResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/link-tasks: post: tags: - Platform summary: Link Tasks Endpoint description: 'Link tasks (Conversations / LegalResearchSessions) to a matter. Requires ``can_view`` on the matter and ``can_edit`` on each task. Returns per-item status.' operationId: link_tasks_endpoint_platform_matters__matter_id__link_tasks_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LinkTasksRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LinkUnlinkTasksResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/unlink-tasks: post: tags: - Platform summary: Unlink Tasks Endpoint description: 'Unlink tasks from a matter. Requires edit access on each task or on the matter. Returns per-item status.' operationId: unlink_tasks_endpoint_platform_matters__matter_id__unlink_tasks_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UnlinkTasksRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LinkUnlinkTasksResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/cases/{caselaw_db_id}: post: tags: - Platform summary: Add Case To Matter Endpoint description: 'Add a case from standalone case search to a matter. Idempotent. Requires can_edit on the matter.' operationId: add_case_to_matter_endpoint_platform_matters__matter_id__cases__caselaw_db_id__post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: caselaw_db_id in: path required: true schema: type: string format: uuid title: Caselaw Db Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Remove Case From Matter Endpoint description: 'Remove a case added via standalone case search from a matter. Idempotent. Requires can_edit on the matter.' operationId: remove_case_from_matter_endpoint_platform_matters__matter_id__cases__caselaw_db_id__delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: caselaw_db_id in: path required: true schema: type: string format: uuid title: Caselaw Db Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/profile-photo/{user_id}: post: tags: - Platform summary: Upload Profile Photo Endpoint description: Upload a profile photo. The image is center-cropped to a square and saved as JPEG. operationId: upload_profile_photo_endpoint_platform_profile_photo__user_id__post requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_upload_profile_photo_endpoint_platform_profile_photo__user_id__post' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Upload Profile Photo Endpoint Platform Profile Photo User Id Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/search-tracking/events: post: tags: - Platform summary: Record Search Events description: 'Record user interaction events for search result training data. Accepts a batch of events and inserts them. Returns 202 immediately. Events referencing non-existent or unowned session_ids are silently skipped.' operationId: record_search_events_platform_search_tracking_events_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SearchEventBatchRequest' required: true responses: '202': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Record Search Events Platform Search Tracking Events Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks/: get: tags: - Platform summary: List Tasks Endpoint description: List all tasks the user owns or has shared access to. operationId: list_tasks_endpoint_platform_tasks__get parameters: - name: matter_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter tasks by matter ID title: Matter Id description: Filter tasks by matter ID - name: task_type in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter tasks by task type title: Task Type description: Filter tasks by task type - name: mapped in: query required: false schema: anyOf: - type: boolean - type: 'null' description: 'Filter by mapping status: true = mapped to a matter, false = unmapped' title: Mapped description: 'Filter by mapping status: true = mapped to a matter, false = unmapped' - name: q in: query required: false schema: anyOf: - type: string minLength: 1 maxLength: 200 - type: 'null' description: Case-insensitive substring match against the task title and, when the task references a dataset, the dataset name and context. title: Q description: Case-insensitive substring match against the task title and, when the task references a dataset, the dataset name and context. - name: page in: query required: false schema: anyOf: - type: integer minimum: 1 - type: 'null' description: Page number (1-indexed). Only honored when task_type is provided. title: Page description: Page number (1-indexed). Only honored when task_type is provided. - name: page_size in: query required: false schema: anyOf: - type: integer maximum: 200 minimum: 1 - type: 'null' description: Number of tasks per page. Only honored when task_type is provided. title: Page Size description: Number of tasks per page. Only honored when task_type is provided. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks/suggested-title: get: tags: - Platform summary: Suggested Task Title Endpoint description: 'Return the label + existing-task count for a new task''s auto-filled title. The client composes ''[Matter] - {label} {count + 1}'' (the matter name is decrypted client-side).' operationId: suggested_task_title_endpoint_platform_tasks_suggested_title_get parameters: - name: task_type in: query required: true schema: type: string description: Module slug or numeric id (e.g. 'aiDiscovery' or '15'). title: Task Type description: Module slug or numeric id (e.g. 'aiDiscovery' or '15'). - name: matter_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Scope the existing-task count to this matter. title: Matter Id description: Scope the existing-task count to this matter. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SuggestedTaskTitleResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks/{task_id}: get: tags: - Platform summary: Get Task Endpoint description: Fetch one task by id when the caller has view access. operationId: get_task_endpoint_platform_tasks__task_id__get parameters: - name: task_id in: path required: true schema: type: string title: Task Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskListItemResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Platform summary: Update Task description: 'Update a Task row (title and/or conversation_matter). Requires ``can_edit`` on the CONVERSATION or LEGAL_RESEARCH_SESSION resource.' operationId: update_task_platform_tasks__task_id__patch parameters: - name: task_id in: path required: true schema: type: string title: Task Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TaskUpdateRequest' responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Update Task Platform Tasks Task Id Patch '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Task description: Delete a Task row. Only the owner can delete. operationId: delete_task_platform_tasks__task_id__delete parameters: - name: task_id in: path required: true schema: type: string title: Task Id responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Delete Task Platform Tasks Task Id Delete '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks/ensure-for-lr-session: post: tags: - Platform summary: Ensure For Lr Session description: 'Ensure a Task (Conversation) row exists for the given Legal Research session. Idempotent: if the session has no Conversation yet, creates one from the LRS so that operations requiring a task_id (e.g. Doc Hub document registration) work. Returns ensured=True if a new row was created, ensured=False if the task already existed. Returns 404 if the session does not exist, 403 if the user does not own the session.' operationId: ensure_for_lr_session_platform_tasks_ensure_for_lr_session_post requestBody: content: application/json: schema: $ref: '#/components/schemas/EnsureForLrSessionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EnsureForLrSessionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks/transfer-ownership: post: tags: - Platform summary: Transfer Ownership Endpoint description: 'Transfer ownership of a task from the current user to another user. Only supported for AI Assistant and Legal Research task types. Requires can_edit for the transferor and can_view for the transferee.' operationId: transfer_ownership_endpoint_platform_tasks_transfer_ownership_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TransferTask' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TransferOwnershipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks/todos: post: tags: - Platform summary: Get Task Todos Endpoint description: 'Batch-fetch todo lists for one or more tasks. Returns only todos for tasks the caller can view. Missing or inaccessible task IDs are silently omitted from the response.' operationId: get_task_todos_endpoint_platform_tasks_todos_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TaskTodosRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskTodosResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tasks: post: tags: - Platform summary: Create Task description: 'Create a Task row for unified task tracking. Caller (e.g. Next.js legal-research API) should pass the same id as the linked record (e.g. LegalResearchSession.id). Auth: session must match body.user_id.' operationId: create_task_platform_tasks_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TaskCreateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Create Task Platform Tasks Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/enterprise/{enterprise_id}/team: get: tags: - Platform summary: List Team Members Endpoint description: List all team members belonging to the given enterprise. operationId: list_team_members_endpoint_platform_enterprise__enterprise_id__team_get parameters: - name: enterprise_id in: path required: true schema: type: string title: Enterprise Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamMemberListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/enterprise/matter/{matter_id}/team: get: tags: - Platform summary: List Team Members For Matter Endpoint description: 'List enterprise team members with their permissions on a specific matter. The enterprise is resolved from the authenticated user''s record.' operationId: list_team_members_for_matter_endpoint_platform_enterprise_matter__matter_id__team_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/TeamMemberWithPermissionsListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Platform summary: Add Matter Team Members Endpoint description: 'Add team members to a matter. Grants each team member the specified relation (default EDITOR) on the matter using upsert semantics (existing grants are replaced). The requesting user must have can_manage_members permission on the matter. All provided user IDs must belong to the caller''s enterprise.' operationId: add_matter_team_members_endpoint_platform_enterprise_matter__matter_id__team_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddTeamMembersRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AddTeamMembersResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Remove Matter Team Member Endpoint description: 'Remove a team member from a matter. Revokes the permission grant and unlinks any tasks owned by the removed member from the matter (sets matter_id to NULL on their Conversations and LegalResearchSessions). The requesting user must have can_manage_members permission on the matter.' operationId: remove_matter_team_member_endpoint_platform_enterprise_matter__matter_id__team_delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: team_member_user_id in: query required: true schema: type: string description: User ID of the team member to remove title: Team Member User Id description: User ID of the team member to remove - name: relation in: query required: true schema: type: integer maximum: 3 minimum: 1 description: 'Relation to revoke: 1=OWNER, 2=EDITOR, 3=VIEWER' title: Relation description: 'Relation to revoke: 1=OWNER, 2=EDITOR, 3=VIEWER' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/tos-signatures/: get: tags: - Platform summary: Download Tos Signature Endpoint description: 'Download the most recent TOS signature image for a user. ``identifier`` may be a user id or an email address. Restricted to internal Callidus admin roles.' operationId: download_tos_signature_endpoint_platform_tos_signatures__get parameters: - name: identifier in: query required: true schema: type: string title: Identifier responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/case-analysis/upload: post: tags: - Platform summary: Start Case Analysis Upload description: 'Kick off the upload-prep workflow for a matter. Creates or reuses the CaseAnalysis row, recreates only the FILE_UPLOAD task, and starts CaseAnalysisUploadWorkflow. Returns 409 if an upload is already in progress, 502 if the Temporal workflow cannot be started. Matter Intelligence is not required for this step; it is only enforced when starting the analysis itself (see start_case_analysis). Running Strong Start is a write activity, so this requires can_edit (matter owner or editor team member), not just can_view.' operationId: start_case_analysis_upload_platform_matters__matter_id__case_analysis_upload_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id responses: '202': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/StartCaseAnalysisResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/case-analysis/start: post: tags: - Platform summary: Start Case Analysis description: 'Start the automated preliminary analysis workflow for a matter. Requires the upload-prep step to have been completed first (FILE_UPLOAD task must exist). Returns 409 if analysis is already running, 412 if no upload has been completed or Matter Intelligence is disabled for the matter, 502 if the Temporal workflow cannot be started. Running Strong Start is a write activity, so this requires can_edit (matter owner or editor team member), not just can_view.' operationId: start_case_analysis_platform_matters__matter_id__case_analysis_start_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id responses: '202': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/StartCaseAnalysisResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/case-analysis/export: get: tags: - Platform summary: Export Case Brief description: 'Return the latest Initial Matter Analysis as a .docx or .pdf download. Read-only, so it is gated on can_view like `get_case_analysis` rather than can_edit. The returned filename is a generic fallback: matter titles are encrypted at rest, so only the frontend (which holds the decrypted title) can name the file after the matter.' operationId: export_case_brief_platform_matters__matter_id__case_analysis_export_get parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: format in: query required: false schema: enum: - docx - pdf type: string default: docx title: Format responses: '200': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/case-analysis/: get: tags: - Platform summary: Get Case Analysis description: Return the latest CaseAnalysis for the matter with per-task status. operationId: get_case_analysis_platform_matters__matter_id__case_analysis__get parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/CaseAnalysisResponse' - type: 'null' title: Response Get Case Analysis Platform Matters Matter Id Case Analysis Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/case-analysis/admin/overview: get: tags: - Platform summary: Get Case Analysis Overview description: Paginated list of all case analyses with per-task status. operationId: get_case_analysis_overview_platform_matters_case_analysis_admin_overview_get parameters: - name: matter_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Matter Id - name: user_id_filter in: query required: false schema: anyOf: - type: string - type: 'null' title: User Id Filter - name: start_date in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' title: Start Date - name: end_date in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' title: End Date - name: stage in: query required: false schema: anyOf: - type: string - type: 'null' title: Stage - name: page in: query required: false schema: type: integer default: 1 title: Page - name: page_size in: query required: false schema: type: integer default: 50 title: Page Size responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdminCaseAnalysisOverviewResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/case-analysis/admin/{analysis_id}/restart: post: tags: - Platform summary: Restart Case Analysis description: 'Restart a case analysis workflow with the specified mode. Modes: - from_scratch: reset all analysis tasks and rerun from the beginning. - from_subtask: reset the specified task and all downstream tasks; skip completed upstream. - resume_from_failure: reset only failed tasks; skip all completed tasks. - brief_only: reset nothing; skip every completed task and regenerate the case brief.' operationId: restart_case_analysis_platform_matters_case_analysis_admin__analysis_id__restart_post parameters: - name: analysis_id in: path required: true schema: type: string format: uuid title: Analysis Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RestartRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdminCaseAnalysisItem' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/case-analysis/admin/{analysis_id}/stop: post: tags: - Platform summary: Stop Case Analysis description: 'Stop a running case analysis: cancel/terminate its executions and write DB truth now. Cancel only lands on the next activity heartbeat; pass ``force=true`` to terminate immediately instead. Either way, any RUNNING task is immediately flipped to FAILED (error="Stopped by admin") so the UI doesn''t lag the cancel/terminate call. Idempotent — stopping an analysis with no live executions is a no-op on the Temporal side.' operationId: stop_case_analysis_platform_matters_case_analysis_admin__analysis_id__stop_post parameters: - name: analysis_id in: path required: true schema: type: string format: uuid title: Analysis Id requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/StopRequest' - type: 'null' title: Body responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdminCaseAnalysisItem' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/case-analysis/admin/{analysis_id}/artifacts: get: tags: - Platform summary: Get Case Analysis Artifacts description: Dry-run inventory of the downstream artifacts a delete would remove. operationId: get_case_analysis_artifacts_platform_matters_case_analysis_admin__analysis_id__artifacts_get parameters: - name: analysis_id in: path required: true schema: type: string format: uuid title: Analysis Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdminCaseAnalysisArtifactsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Case Analysis Artifacts description: 'Delete generated conversations/datasets/legal-research rows for one or all task types. Never touches MatterDoc, DocMetadata, or any DocHub/document rows. Resets the affected task row(s) to PENDING so a subsequent restart regenerates the artifact from scratch.' operationId: delete_case_analysis_artifacts_platform_matters_case_analysis_admin__analysis_id__artifacts_delete parameters: - name: analysis_id in: path required: true schema: type: string format: uuid title: Analysis Id - name: task_type in: query required: false schema: enum: - doc_review - timeline_facts - legal_research - smartbot - all type: string default: all title: Task Type responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdminCaseAnalysisItem' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/case-analysis/admin/{analysis_id}/detail: get: tags: - Platform summary: Get Case Analysis Detail description: 'Per-task drill-down: Temporal pending-activity/child state plus per-task diagnostics.' operationId: get_case_analysis_detail_platform_matters_case_analysis_admin__analysis_id__detail_get parameters: - name: analysis_id in: path required: true schema: type: string format: uuid title: Analysis Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdminCaseAnalysisDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/case-analysis/admin/{analysis_id}/tasks/{task_type}: patch: tags: - Platform summary: Override Case Analysis Task description: 'Manually override a single task''s status. Guardrails: - 409 if any execution for this analysis (or its upload workflow) is Running — stop it first, otherwise the workflow will race the override. - 422 on ``complete`` unless the task already has a ``source_task_id`` or non-empty ``result_metadata`` — a task can''t be marked done with no artifact behind it. ``status="stopped"`` is a UI-facing alias for ``failed`` that defaults the error message to "Stopped by admin" instead of a generic one.' operationId: override_case_analysis_task_platform_matters_case_analysis_admin__analysis_id__tasks__task_type__patch parameters: - name: analysis_id in: path required: true schema: type: string format: uuid title: Analysis Id - name: task_type in: path required: true schema: type: string title: Task Type requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TaskOverrideRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdminCaseAnalysisItem' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/discovery/admin/datasets/{dataset_id}/progress: get: tags: - Platform summary: Get Dataset Analysis Progress operationId: get_dataset_analysis_progress_platform_discovery_admin_datasets__dataset_id__progress_get parameters: - name: dataset_id in: path required: true schema: type: integer title: Dataset Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DatasetProgressResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/: get: tags: - Platform summary: Get Milestones Endpoint description: Load the full phase -> milestone -> task hierarchy for a matter. operationId: get_milestones_endpoint_platform_matters__matter_id__milestones__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/MatterMilestonesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Platform summary: Create Milestone Endpoint description: Create a new milestone on a matter. Initializes milestones from templates if needed. operationId: create_milestone_endpoint_platform_matters__matter_id__milestones__post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateMilestoneRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MilestoneResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/suggestions: get: tags: - Platform summary: Suggest Milestones Endpoint description: Return 3-5 LLM-suggested milestone names based on the matter's context. operationId: suggest_milestones_endpoint_platform_matters__matter_id__milestones_suggestions_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/MilestoneSuggestionsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/{milestone_id}/tasks/suggestions: get: tags: - Platform summary: Suggest Tasks Endpoint description: Return 1-3 LLM-suggested tasks for a milestone. operationId: suggest_tasks_endpoint_platform_matters__matter_id__milestones__milestone_id__tasks_suggestions_get parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskSuggestionsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/next-steps: get: tags: - Platform summary: Suggest Next Steps Endpoint description: 'Return 3-4 LLM-suggested next steps for a matter. Optionally accepts: - stage: the current phase of the matter (e.g. "Discovery Phase"). When omitted the agent infers the stage from matter context and milestone state. - goal: a user objective that biases recommendations (e.g. "Prepare for mediation", "Draft a motion to compel").' operationId: suggest_next_steps_endpoint_platform_matters__matter_id__milestones_next_steps_get parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: stage in: query required: false schema: anyOf: - type: string - type: 'null' title: Stage - name: goal in: query required: false schema: anyOf: - type: string - type: 'null' title: Goal responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/app__modules__matters__schemas__milestones__NextStepsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/initialize: post: tags: - Platform summary: Initialize Milestones Endpoint description: Stamp out milestones from templates for the given matter type. operationId: initialize_milestones_endpoint_platform_matters__matter_id__milestones_initialize_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InitializeMilestonesRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MatterMilestonesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/phases/{phase_id}: patch: tags: - Platform summary: Update Phase Endpoint description: 'Partially update a phase — reorder (display_idx), rename, or set status. Requires edit access.' operationId: update_phase_endpoint_platform_matters__matter_id__milestones_phases__phase_id__patch parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: phase_id in: path required: true schema: type: integer title: Phase Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdatePhaseRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PhaseResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/{milestone_id}: patch: tags: - Platform summary: Update Milestone Endpoint description: Partially update a milestone. Requires edit access. operationId: update_milestone_endpoint_platform_matters__matter_id__milestones__milestone_id__patch parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateMilestoneRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MilestoneResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Milestone Endpoint description: Delete a milestone and its tasks. Requires edit access. operationId: delete_milestone_endpoint_platform_matters__matter_id__milestones__milestone_id__delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/{milestone_id}/status: patch: tags: - Platform summary: Update Milestone Status Endpoint description: 'Update only the status of a milestone. Requires view access — status updates are allowed for all users who can see the matter (intentional product decision to enable lightweight progress tracking without edit permissions).' operationId: update_milestone_status_endpoint_platform_matters__matter_id__milestones__milestone_id__status_patch parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id - name: status in: query required: true schema: $ref: '#/components/schemas/MilestoneStatus' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MilestoneResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/{milestone_id}/tasks: post: tags: - Platform summary: Create Task Endpoint description: Create a new task on a milestone. Requires edit access. operationId: create_task_endpoint_platform_matters__matter_id__milestones__milestone_id__tasks_post parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateTaskRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/{milestone_id}/tasks/{task_id}: patch: tags: - Platform summary: Update Task Endpoint description: Partially update a task. Requires edit access. operationId: update_task_endpoint_platform_matters__matter_id__milestones__milestone_id__tasks__task_id__patch parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id - name: task_id in: path required: true schema: type: integer title: Task Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateTaskRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Task Endpoint description: Delete a task. Requires edit access. operationId: delete_task_endpoint_platform_matters__matter_id__milestones__milestone_id__tasks__task_id__delete parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id - name: task_id in: path required: true schema: type: integer title: Task Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/milestones/{milestone_id}/tasks/{task_id}/status: patch: tags: - Platform summary: Update Task Status Endpoint description: 'Update task status and/or linked conversation. Requires view access — status updates are allowed for all users who can see the matter (intentional product decision to enable lightweight progress tracking without edit permissions).' operationId: update_task_status_endpoint_platform_matters__matter_id__milestones__milestone_id__tasks__task_id__status_patch parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id - name: milestone_id in: path required: true schema: type: integer title: Milestone Id - name: task_id in: path required: true schema: type: integer title: Task Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateTaskStatusRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TaskResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/matters/{matter_id}/preferences/: get: tags: - Platform summary: Get Preferences Endpoint description: Load preferences for a matter. Returns empty fields if none exist. operationId: get_preferences_endpoint_platform_matters__matter_id__preferences__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/MatterPreferencesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - Platform summary: Update Preferences Endpoint description: Create or update preferences for a matter (upsert). operationId: update_preferences_endpoint_platform_matters__matter_id__preferences__put parameters: - name: matter_id in: path required: true schema: type: string title: Matter Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateMatterPreferencesRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MatterPreferencesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/: get: tags: - Platform summary: List Skills Endpoint description: List all skills visible to the caller, with their enable/star state. operationId: list_skills_endpoint_platform_skills__get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillListResponse' post: tags: - Platform summary: Create Skill Endpoint description: Create a new skill owned by the caller. operationId: create_skill_endpoint_platform_skills__post requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateSkillRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/import-from-document: post: tags: - Platform summary: Import Skill From Document Endpoint description: Create a private skill from a skill.md file (YAML frontmatter + prompt body) stored in DocHub. operationId: import_skill_from_document_endpoint_platform_skills_import_from_document_post requestBody: content: application/json: schema: $ref: '#/components/schemas/ImportSkillFromDocumentRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/generate-short-name: post: tags: - Platform summary: Generate Skill Short Name Endpoint description: Derive a short ``short-name``-style slug from a longer descriptive name. operationId: generate_skill_short_name_endpoint_platform_skills_generate_short_name_post requestBody: content: application/json: schema: $ref: '#/components/schemas/GenerateSkillShortNameRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/GenerateSkillShortNameResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/{skill_id}: get: tags: - Platform summary: Get Skill Endpoint description: Get a single skill visible to the caller. operationId: get_skill_endpoint_platform_skills__skill_id__get parameters: - name: skill_id in: path required: true schema: type: integer title: Skill Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Platform summary: Update Skill Endpoint description: 'Create the next version of a visible skill. Skills are immutable — this always creates a new row. If the caller owns the skill, the new row supersedes it (same name, incremented version). If not, the new row is a fork owned by the caller with the date appended to its name, leaving the original skill untouched.' operationId: update_skill_endpoint_platform_skills__skill_id__patch parameters: - name: skill_id in: path required: true schema: type: integer title: Skill Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateSkillRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Platform summary: Delete Skill Endpoint description: Delete a skill the caller owns. operationId: delete_skill_endpoint_platform_skills__skill_id__delete parameters: - name: skill_id in: path required: true schema: type: integer title: Skill Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/{skill_id}/state: put: tags: - Platform summary: Set Skill State Endpoint description: Set the caller's enable/star state for a visible skill. operationId: set_skill_state_endpoint_platform_skills__skill_id__state_put parameters: - name: skill_id in: path required: true schema: type: integer title: Skill Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SetUserSkillStateRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UserSkillStateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/search: post: tags: - Platform summary: Search Skills Endpoint description: Semantic search over skills visible to the caller. operationId: search_skills_endpoint_platform_skills_search_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SkillSearchRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillSearchResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/admin/public: get: tags: - Platform summary: List Public Skills Admin Endpoint description: List public skills for the admin queue, newest versions by default. operationId: list_public_skills_admin_endpoint_platform_skills_admin_public_get parameters: - name: latest_only in: query required: false schema: type: boolean default: true title: Latest Only responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PublicSkillListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/admin/{skill_id}/review: patch: tags: - Platform summary: Mark Skill Reviewed Endpoint description: Approve a skill by setting its review status to True. operationId: mark_skill_reviewed_endpoint_platform_skills_admin__skill_id__review_patch parameters: - name: skill_id in: path required: true schema: type: integer title: Skill Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/admin/{skill_id}/hide-prompt: patch: tags: - Platform summary: Set Skill Hidden Endpoint description: 'Set whether a skill''s prompt is hidden from non-creators. Admin-only; not gated by creator — any Callidus admin can toggle it for any skill.' operationId: set_skill_hidden_endpoint_platform_skills_admin__skill_id__hide_prompt_patch parameters: - name: skill_id in: path required: true schema: type: integer title: Skill Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AdminSetSkillHiddenRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/admin/{skill_id}: patch: tags: - Platform summary: Admin Update Skill Endpoint description: Admin-only immutable update of a public skill. operationId: admin_update_skill_endpoint_platform_skills_admin__skill_id__patch parameters: - name: skill_id in: path required: true schema: type: integer title: Skill Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AdminUpdateSkillRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /platform/skills/admin/create: post: tags: - Platform summary: Admin Create Skill Endpoint description: 'Admin-only: create a public, reviewed skill owned by the system skill account.' operationId: admin_create_skill_endpoint_platform_skills_admin_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AdminCreateSkillRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ClientResponse: properties: id: type: string title: Id first_name: type: string title: First Name last_name: type: string title: Last Name email: anyOf: - type: string - type: 'null' title: Email phone: anyOf: - type: string - type: 'null' title: Phone company_name: anyOf: - type: string - type: 'null' title: Company Name role: anyOf: - type: string - type: 'null' title: Role created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At type: object required: - id - first_name - last_name - email - phone - created_at - updated_at title: ClientResponse description: Client in a matter response (with id and all fields). RetrievalBudget: properties: preset: type: string enum: - legacy - narrow - standard - wide title: Preset chunk_pool_per_uploader: type: integer title: Chunk Pool Per Uploader global_chunk_cap: anyOf: - type: integer - type: 'null' title: Global Chunk Cap docs_per_call: type: integer title: Docs Per Call result_limit_ceiling: type: integer title: Result Limit Ceiling chunks_per_doc: type: integer title: Chunks Per Doc chunk_text_chars: type: integer title: Chunk Text Chars triage_order: type: string enum: - insertion - score title: Triage Order triage_max_candidates: anyOf: - type: integer - type: 'null' title: Triage Max Candidates triage_char_budget: anyOf: - type: integer - type: 'null' title: Triage Char Budget max_escalations: type: integer title: Max Escalations additionalProperties: false type: object required: - preset - chunk_pool_per_uploader - global_chunk_cap - docs_per_call - result_limit_ceiling - chunks_per_doc - chunk_text_chars - triage_order - triage_max_candidates - triage_char_budget - max_escalations title: RetrievalBudget description: Tunable retrieval + triage knobs for one search-pipeline run. FeatureFlagCreate: properties: key: type: string title: Key value: type: string title: Value type: $ref: '#/components/schemas/FlagType' description: anyOf: - type: string - type: 'null' title: Description type: object required: - key - value - type title: FeatureFlagCreate TaskTodosResponse: properties: todos: additionalProperties: items: $ref: '#/components/schemas/TodoItem' type: array type: object title: Todos type: object required: - todos title: TaskTodosResponse description: 'Batch todos response: todo lists keyed by task_id.' TransferMatterOwnershipResponse: properties: matter_id: type: string title: Matter Id previous_owner_id: type: string title: Previous Owner Id new_owner_id: type: string title: New Owner Id type: object required: - matter_id - previous_owner_id - new_owner_id title: TransferMatterOwnershipResponse description: Response body for a successful matter ownership transfer. UpdateMatterRequest: properties: title: anyOf: - type: string minLength: 1 - type: 'null' title: Title short_description: anyOf: - type: string minLength: 1 - type: 'null' title: Short Description matter_details: anyOf: - type: string minLength: 1 - type: 'null' title: Matter Details party_role: anyOf: - type: string minLength: 1 - type: 'null' title: Party Role party_name: anyOf: - type: string - type: 'null' title: Party Name parties: anyOf: - items: $ref: '#/components/schemas/PartyEntry' type: array - type: 'null' title: Parties known_causes: anyOf: - type: string - type: 'null' title: Known Causes archived: anyOf: - type: boolean - type: 'null' title: Archived memory_enabled: anyOf: - type: boolean - type: 'null' title: Memory Enabled memory: anyOf: - additionalProperties: true type: object - type: 'null' title: Memory memory_updated_at: anyOf: - type: string format: date-time - type: 'null' title: Memory Updated At matter_type: anyOf: - type: string minLength: 1 - type: 'null' title: Matter Type court_level: anyOf: - type: string minLength: 1 - type: 'null' title: Court Level jurisdiction: anyOf: - type: string minLength: 1 - type: 'null' title: Jurisdiction court_system: anyOf: - type: string - type: 'null' title: Court System governing_jurisdiction: anyOf: - type: string - type: 'null' title: Governing Jurisdiction clients: anyOf: - items: $ref: '#/components/schemas/ClientInput' type: array - type: 'null' title: Clients add_team_member_ids: items: type: string type: array title: Add Team Member Ids remove_team_member_ids: items: type: string type: array title: Remove Team Member Ids integration_provider: anyOf: - type: string minLength: 1 - type: 'null' title: Integration Provider integration_external_id: anyOf: - type: string minLength: 1 - type: 'null' title: Integration External Id integration_external_name: anyOf: - type: string - type: 'null' title: Integration External Name integration_external_updated_at: anyOf: - type: string format: date-time - type: 'null' title: Integration External Updated At type: object title: UpdateMatterRequest description: Request body for partial update of a matter. OpposingArgument: properties: argument: type: string title: Argument description: Description of the argument or defense. default: '' severity: type: string title: Severity description: 'Severity rating: high, medium, or low.' default: medium suggested_response: type: string title: Suggested Response description: Suggested strategy to counter this argument. default: '' type: object title: OpposingArgument description: A likely opposing argument or affirmative defense. PreliminaryAnalysisResponse: properties: available: type: boolean title: Available overall_assessment: anyOf: - type: string - type: 'null' title: Overall Assessment executive_summary: anyOf: - type: string - type: 'null' title: Executive Summary strong_claims: anyOf: - items: $ref: '#/components/schemas/CauseOfActionAssessment' type: array - type: 'null' title: Strong Claims weak_claims: anyOf: - items: $ref: '#/components/schemas/CauseOfActionAssessment' type: array - type: 'null' title: Weak Claims opposing_arguments: anyOf: - items: $ref: '#/components/schemas/OpposingArgument' type: array - type: 'null' title: Opposing Arguments affirmative_defenses: anyOf: - items: $ref: '#/components/schemas/OpposingArgument' type: array - type: 'null' title: Affirmative Defenses evidence_gaps: anyOf: - items: $ref: '#/components/schemas/EvidenceGap' type: array - type: 'null' title: Evidence Gaps full_analysis_markdown: anyOf: - type: string - type: 'null' title: Full Analysis Markdown generated_at: anyOf: - type: string - type: 'null' title: Generated At type: object required: - available title: PreliminaryAnalysisResponse description: Preliminary case analysis for a matter. AnswerClaim: properties: statement: type: string title: Statement description: A single factual claim or point. citations: items: type: integer type: array title: Citations description: ref_id values from evidence blocks supporting this claim. Emit [] when none. additionalProperties: false type: object required: - statement - citations title: AnswerClaim description: A single factual claim with citations to supporting evidence blocks. UserBillableHoursAggregatesResponse: properties: total_hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Total Hours hours_this_month: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Hours This Month monthly_subscription_cost: anyOf: - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Monthly Subscription Cost total_task_count: type: integer title: Total Task Count default: 0 type: object required: - total_hours - hours_this_month title: UserBillableHoursAggregatesResponse description: Cross-matter billable hours aggregates for the authenticated user. BillableHoursEntryResponse: properties: id: type: string title: Id matter_id: type: string title: Matter Id user_id: type: string title: User Id entry_date: type: string format: date title: Entry Date hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Hours created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At user_full_name: anyOf: - type: string - type: 'null' title: User Full Name type: object required: - id - matter_id - user_id - entry_date - hours - created_at - updated_at title: BillableHoursEntryResponse description: Response model for a single billable hours entry. TaskOverrideRequest: properties: status: type: string enum: - pending - complete - failed - skipped - stopped title: Status note: anyOf: - type: string - type: 'null' title: Note type: object required: - status title: TaskOverrideRequest MatterDeleteResponse: properties: matter_deleted: type: boolean title: Matter Deleted files_queued: type: integer title: Files Queued default: 0 files_failed: items: $ref: '#/components/schemas/FailedFileDelete' type: array title: Files Failed type: object required: - matter_deleted title: MatterDeleteResponse description: 'Response body for DELETE /matters/{id} when ``delete_files=true``. Always reports ``matter_deleted=True`` on this path: the matter is removed regardless of per-file failures (see endpoint docstring). ``files_queued`` counts files handed to the background purge, which hides them immediately and finishes the delete asynchronously; ``files_failed`` carries any docs that were not queued — those remain and surface in the Unassigned view for manual retry.' TracemallocStat: properties: size_bytes: type: integer title: Size Bytes count: type: integer title: Count traceback: items: type: string type: array title: Traceback type: object required: - size_bytes - count - traceback title: TracemallocStat ContextMetadata: properties: sources: items: $ref: '#/components/schemas/SourceRef' type: array title: Sources description: All contributing sources sections: items: $ref: '#/components/schemas/SectionAttribution' type: array title: Sections description: Per-heading attribution mapping output sections to sources type: object title: ContextMetadata description: Structured provenance information for the context output. TeamMemberBillableHoursSummary: properties: user_id: type: string title: User Id user_full_name: anyOf: - type: string - type: 'null' title: User Full Name total_hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Total Hours hours_this_month: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Hours This Month last_updated: anyOf: - type: string format: date-time - type: 'null' title: Last Updated is_active_member: type: boolean title: Is Active Member default: true type: object required: - user_id - total_hours - hours_this_month title: TeamMemberBillableHoursSummary description: Billable hours summary for a single team member. MatterListItemResponse: properties: id: type: string title: Id title: type: string title: Title short_description: type: string title: Short Description matter_details: type: string title: Matter Details known_causes: anyOf: - type: string - type: 'null' title: Known Causes party_role: type: string title: Party Role party_name: anyOf: - type: string - type: 'null' title: Party Name parties: items: additionalProperties: true type: object type: array title: Parties archived: type: boolean title: Archived case_analysis_eligible: type: boolean title: Case Analysis Eligible memory_enabled: type: boolean title: Memory Enabled memory: anyOf: - additionalProperties: true type: object - type: 'null' title: Memory memory_updated_at: anyOf: - type: string format: date-time - type: 'null' title: Memory Updated At matter_type: type: string title: Matter Type court_level: anyOf: - type: string - type: 'null' title: Court Level jurisdiction: anyOf: - type: string - type: 'null' title: Jurisdiction court_system: anyOf: - type: string - type: 'null' title: Court System governing_jurisdiction: anyOf: - type: string - type: 'null' title: Governing Jurisdiction created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At user: $ref: '#/components/schemas/UserInfo' clients: items: $ref: '#/components/schemas/ClientResponse' type: array title: Clients integration_link: anyOf: - $ref: '#/components/schemas/IntegrationLinkResponse' - type: 'null' task_count: type: integer title: Task Count default: 0 total_hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Total Hours default: '0' document_count: type: integer title: Document Count default: 0 permissions: items: type: string type: array title: Permissions type: object required: - id - title - short_description - matter_details - known_causes - party_role - party_name - archived - case_analysis_eligible - memory_enabled - matter_type - court_level - jurisdiction - created_at - updated_at - user title: MatterListItemResponse description: Response model for a matter in a list, with per-object permissions. UpdateMilestoneRequest: properties: milestone_text: anyOf: - type: string - type: 'null' title: Milestone Text milestone_description: anyOf: - type: string - type: 'null' title: Milestone Description status: anyOf: - $ref: '#/components/schemas/MilestoneStatus' - type: 'null' display_idx: anyOf: - type: integer - type: 'null' title: Display Idx type: object title: UpdateMilestoneRequest description: Partial update for a matter milestone. Only supplied fields are applied. AnalysisRunDetail: properties: run_id: type: string title: Run Id workflow_name: type: string title: Workflow Name aggregate_state: type: string title: Aggregate State total_count: type: integer title: Total Count terminal_count: type: integer title: Terminal Count failed_count: type: integer title: Failed Count started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At finished_at: anyOf: - type: string format: date-time - type: 'null' title: Finished At linked_doc_count: type: integer title: Linked Doc Count type: object required: - run_id - workflow_name - aggregate_state - total_count - terminal_count - failed_count - started_at - finished_at - linked_doc_count title: AnalysisRunDetail NextStepItem: properties: task_text: type: string title: Task Text module_type: type: string title: Module Type milestone_text: type: string title: Milestone Text rationale: type: string title: Rationale recommended: type: boolean title: Recommended default: false type: object required: - task_text - module_type - milestone_text - rationale title: NextStepItem description: A single suggested next step. EnsureForLrSessionRequest: properties: session_id: type: string minLength: 1 title: Session Id description: LegalResearchSession id (same as desired Conversation id) type: object required: - session_id title: EnsureForLrSessionRequest description: Request body for ensuring a Task exists for a Legal Research session. ToolCallRecord: properties: tool: type: string title: Tool arguments: additionalProperties: true type: object title: Arguments result_preview: type: string title: Result Preview description: Truncated tool output for observability elapsed_ms: anyOf: - type: number - type: 'null' title: Elapsed Ms description: Wall-clock duration of this tool call in milliseconds. type: object required: - tool - result_preview title: ToolCallRecord description: A single tool invocation recorded during agent execution. SetUserSkillStateRequest: properties: enabled: anyOf: - type: boolean - type: 'null' title: Enabled starred: anyOf: - type: boolean - type: 'null' title: Starred type: object title: SetUserSkillStateRequest description: Partial update to a user's enable/star state for a skill. UnifiedSearchResult: properties: mode: type: string const: search title: Mode default: search matter_id: anyOf: - type: string - type: 'null' title: Matter Id description: Matter the run was scoped to. ``None`` for task-only runs against a conversation that has no linked matter. output_format: type: string enum: - md - json title: Output Format description: Echoes the requested ``SearchConfig.output_format``. default: md answer: type: string title: Answer description: Synthesized markdown answer with [N] citations when ``output_format='md'``; empty string when ``output_format='json'`` (see ``structured_answer``). structured_answer: anyOf: - $ref: '#/components/schemas/StructuredAnswer' - type: 'null' description: Strict-schema structured answer; populated only when ``output_format='json'``. Citations are integer ``ref_id`` values into ``evidence``. evidence: items: $ref: '#/components/schemas/EvidenceBlock' type: array title: Evidence description: Evidence blocks the answer is grounded in. Index aligns with [N] markers. tool_calls: items: $ref: '#/components/schemas/ToolCallRecord' type: array title: Tool Calls description: Trace of every tool invocation across all retrieval iterations. iterations: type: integer title: Iterations description: Number of retrieve→analyze cycles executed. analysis_model: type: string title: Analysis Model description: Model used for the analysis step. synthesis_model: type: string title: Synthesis Model description: Model used for the synthesis step. invalid_citations: items: type: integer type: array title: Invalid Citations description: Citation refs the LLM emitted that did not match any evidence block; stripped from answer. retrieval_budget: anyOf: - $ref: '#/components/schemas/RetrievalBudget' - type: 'null' description: Resolved retrieval budget for this run ('legacy' when the `context_engine_luna_models` flag is off, regardless of the requested preset). escalations: type: integer title: Escalations description: Number of times the retrieval budget was escalated on demonstrated (non-fallback) insufficiency. default: 0 used_fallback: type: boolean title: Used Fallback description: True if the analysis LLM call failed on any iteration and the accept-all fallback outcome was used at least once. default: false analysis_elapsed_ms_total: anyOf: - type: number - type: 'null' title: Analysis Elapsed Ms Total description: Sum of analysis LLM elapsed time across all retrieve iterations. synthesis_elapsed_ms: anyOf: - type: number - type: 'null' title: Synthesis Elapsed Ms description: Wall-clock duration of the synthesis LLM call. total_elapsed_ms: anyOf: - type: number - type: 'null' title: Total Elapsed Ms description: End-to-end pipeline wall-clock duration. additionalProperties: false type: object required: - answer - iterations - analysis_model - synthesis_model title: UnifiedSearchResult description: Response when mode is search (deterministic pipeline). HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError SourceRef: properties: id: type: string title: Id type: type: string title: Type description: 'Source kind: matter | task | legal_research | facts | discovery | assistant' type: object required: - id - type title: SourceRef description: A reference to a single source entity that contributed to the context. UpdateTaskRequest: properties: task_text: anyOf: - type: string - type: 'null' title: Task Text module_type: anyOf: - type: string - type: 'null' title: Module Type status: anyOf: - $ref: '#/components/schemas/MilestoneStatus' - type: 'null' display_idx: anyOf: - type: integer - type: 'null' title: Display Idx associated_task_id: anyOf: - type: string - type: 'null' title: Associated Task Id type: object title: UpdateTaskRequest description: Partial update for a milestone task. Only supplied fields are applied. app__modules__platform__schemas__matter__MatterListResponse: properties: matters: items: $ref: '#/components/schemas/MatterListItemResponse' type: array title: Matters type: object required: - matters title: MatterListResponse description: Response for the list matters endpoint. TaskTypeResponse: properties: id: anyOf: - type: integer - type: string title: Id value: type: string title: Value name: type: string title: Name conversation_type: type: string title: Conversation Type type: object required: - id - value - name - conversation_type title: TaskTypeResponse description: Structured representation of a task type. CaseAnalysisTaskResponse: properties: id: type: string format: uuid title: Id task_type: type: string title: Task Type status: type: string title: Status substate: anyOf: - type: string - type: 'null' title: Substate source_task_id: anyOf: - type: string - type: 'null' title: Source Task Id reference_data: anyOf: - type: string - type: 'null' title: Reference Data task_name: anyOf: - type: string - type: 'null' title: Task Name error: anyOf: - type: string - type: 'null' title: Error started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At type: object required: - id - task_type - status - substate - source_task_id - reference_data - task_name - error - started_at - completed_at title: CaseAnalysisTaskResponse EnsureForLrSessionResponse: properties: ensured: type: boolean title: Ensured description: True if a new Conversation row was created; False if the task already existed. type: object required: - ensured title: EnsureForLrSessionResponse description: 'Response for ensure-for-lr-session: whether a new Task was created.' SkillListResponse: properties: skills: items: $ref: '#/components/schemas/SkillListItem' type: array title: Skills type: object required: - skills title: SkillListResponse description: All skills visible to the caller. MilestoneSuggestionsResponse: properties: matter_id: type: string title: Matter Id suggestions: items: type: string type: array title: Suggestions type: object required: - matter_id - suggestions title: MilestoneSuggestionsResponse description: LLM-suggested milestone names for a matter. TransferOwnershipResponse: properties: task_id: type: string title: Task Id transferred: type: boolean title: Transferred type: object required: - task_id - transferred title: TransferOwnershipResponse description: Response for task ownership transfer. LinkTasksRequest: properties: tasks: items: $ref: '#/components/schemas/TaskReference' type: array minItems: 1 title: Tasks type: object required: - tasks title: LinkTasksRequest description: Request body for linking tasks to a matter. DatasetDocumentSource: type: string enum: - discovery - doc_hub title: DatasetDocumentSource description: Canonical backing-source enum for discovery vs doc-hub datasets. TodoItem: properties: title: type: string title: Title done: type: boolean title: Done default: false optional: type: boolean title: Optional default: false type: object required: - title title: TodoItem description: 'A single todo item: a title string, a done state, and an optional flag.' GenerateSkillShortNameRequest: properties: name: type: string title: Name type: object required: - name title: GenerateSkillShortNameRequest description: Request to derive a short, slug-style name from a longer descriptive name. CreditsUsedResponse: properties: credits_used: type: integer title: Credits Used credit_limit: type: integer title: Credit Limit month: type: string title: Month type: object required: - credits_used - credit_limit - month title: CreditsUsedResponse AdminCaseAnalysisArtifactsResponse: properties: analysis_id: type: string format: uuid title: Analysis Id tasks: items: $ref: '#/components/schemas/ArtifactInventoryTask' type: array title: Tasks type: object required: - analysis_id - tasks title: AdminCaseAnalysisArtifactsResponse MilestoneResponse: properties: id: type: integer title: Id phase_id: type: integer title: Phase Id milestone_template_id: anyOf: - type: integer - type: 'null' title: Milestone Template Id milestone_text: type: string title: Milestone Text milestone_description: anyOf: - type: string - type: 'null' title: Milestone Description status: $ref: '#/components/schemas/MilestoneStatus' display_idx: type: integer title: Display Idx created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At tasks: items: $ref: '#/components/schemas/TaskResponse' type: array title: Tasks type: object required: - id - phase_id - milestone_template_id - milestone_text - milestone_description - status - display_idx - created_at - updated_at - tasks title: MilestoneResponse description: A milestone with its nested tasks. SkillSearchRequest: properties: query: type: string title: Query limit: type: integer maximum: 25.0 minimum: 1.0 title: Limit default: 5 type: object required: - query title: SkillSearchRequest description: Semantic search request over skills visible to the caller. UnlinkTasksRequest: properties: tasks: items: $ref: '#/components/schemas/TaskReference' type: array minItems: 1 title: Tasks type: object required: - tasks title: UnlinkTasksRequest description: Request body for unlinking tasks from a matter. TaskItemStatus: properties: task_id: type: string title: Task Id task_type: type: string title: Task Type success: type: boolean title: Success error: anyOf: - type: string - type: 'null' title: Error type: object required: - task_id - task_type - success title: TaskItemStatus description: Per-item result for a link/unlink operation. TaskSuggestionItem: properties: task_text: type: string title: Task Text module_type: type: string title: Module Type type: object required: - task_text - module_type title: TaskSuggestionItem description: A single suggested task. MilestoneStatus: type: string enum: - not_started - in_progress - complete title: MilestoneStatus UpdateMatterPreferencesRequest: properties: highlights: anyOf: - type: string - type: 'null' title: Highlights exclusions: anyOf: - type: string - type: 'null' title: Exclusions type: object title: UpdateMatterPreferencesRequest description: Request body for updating matter preferences. Only supplied fields are applied. LinkUnlinkTasksResponse: properties: results: items: $ref: '#/components/schemas/TaskItemStatus' type: array title: Results type: object required: - results title: LinkUnlinkTasksResponse description: Response with per-item statuses for link/unlink operations. PhaseTemplate: properties: phase_name: type: string title: Phase Name milestones: items: $ref: '#/components/schemas/TemplateMilestoneItem' type: array title: Milestones type: object required: - phase_name - milestones title: PhaseTemplate description: The milestone template for a single phase. PartyEntry: properties: name: type: string title: Name default: '' roles: items: type: string type: array title: Roles client: type: boolean title: Client description: Marks this party as a client of the firm on this matter. Multiple parties may be flagged client=True to represent joint clients. The legacy party_role / party_name columns are derived from the first client-flagged party only; they are left unset (party_role='N/A', party_name=None) when no party is flagged. Consumers that need all clients should read the full parties array. default: false type: object title: PartyEntry description: A single party entry with name and roles. TemplateMilestoneItem: properties: milestone_text: type: string title: Milestone Text module_types: items: type: string type: array title: Module Types type: object required: - milestone_text - module_types title: TemplateMilestoneItem description: A milestone entry from the phase template. TeamMemberWithPermissionsListResponse: properties: team_members: items: $ref: '#/components/schemas/TeamMemberWithPermissionsResponse' type: array title: Team Members type: object required: - team_members title: TeamMemberWithPermissionsListResponse description: Response for the list team members with permissions endpoint. GenerateSkillShortNameResponse: properties: short_name: type: string title: Short Name type: object required: - short_name title: GenerateSkillShortNameResponse description: A generated ``short-name``-style slug for a skill. TeamMemberInput: properties: user_id: type: string minLength: 1 title: User Id relation: type: integer maximum: 3.0 minimum: 1.0 title: Relation description: 'Relation to grant: 1=OWNER, 2=EDITOR, 3=VIEWER' default: 2 type: object required: - user_id title: TeamMemberInput description: A single team member to add to a matter. InitializeMilestonesRequest: properties: matter_type: type: string title: Matter Type description: The matter type to load templates for. type: object required: - matter_type title: InitializeMilestonesRequest description: Request body for initializing milestones from a template. TaskCreateRequest: properties: id: type: string title: Id description: Task id; should match the linked record (e.g. LegalResearchSession.id) user_id: type: string title: User Id description: Owner user id module_type: type: string title: Module Type description: Module type string, e.g. '2' for legal research title: anyOf: - type: string - type: 'null' title: Title description: Display title (may be encrypted by caller) conversation_matter: anyOf: - type: string - type: 'null' title: Conversation Matter description: Matter/jurisdiction display (may be encrypted) matter_id: anyOf: - type: string - type: 'null' title: Matter Id description: Optional matter id when task is linked to a matter type: object required: - id - user_id - module_type title: TaskCreateRequest description: Request body for creating a Task row (e.g. parallel to LegalResearchSession). RestartRequest: properties: mode: type: string enum: - from_scratch - from_subtask - resume_from_failure - brief_only title: Mode from_task_type: anyOf: - type: string - type: 'null' title: From Task Type type: object required: - mode title: RestartRequest AdminCaseAnalysisItem: properties: analysis_id: type: string format: uuid title: Analysis Id matter_id: type: string title: Matter Id matter_name: anyOf: - type: string - type: 'null' title: Matter Name user_id: type: string title: User Id stage: type: string title: Stage error: anyOf: - type: string - type: 'null' title: Error workflow_kicked_off: type: boolean title: Workflow Kicked Off tasks_complete: type: integer title: Tasks Complete tasks_total: type: integer title: Tasks Total created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At tasks: items: $ref: '#/components/schemas/AdminCaseAnalysisTaskSummary' type: array title: Tasks type: object required: - analysis_id - matter_id - matter_name - user_id - stage - error - workflow_kicked_off - tasks_complete - tasks_total - created_at - updated_at - tasks title: AdminCaseAnalysisItem TeamMemberResponse: properties: user_id: type: string title: User Id email: anyOf: - type: string - type: 'null' title: Email name: anyOf: - type: string - type: 'null' title: Name profile_url: anyOf: - type: string - type: 'null' title: Profile Url type: object required: - user_id title: TeamMemberResponse description: Response model for a single team member (no permissions). StopRequest: properties: force: type: boolean title: Force default: false type: object title: StopRequest MatterDeleteImpactResponse: properties: file_count: type: integer title: File Count shared_file_count: type: integer title: Shared File Count other_matter_count: type: integer title: Other Matter Count type: object required: - file_count - shared_file_count - other_matter_count title: MatterDeleteImpactResponse description: 'Read-only preview for deleting a matter with ``delete_files=true``. ``shared_file_count`` of the matter''s ``file_count`` files are also attached to ``other_matter_count`` other matters; a hard delete removes them from those too.' PhaseResponse: properties: id: type: integer title: Id matter_id: type: string title: Matter Id phase_template_id: anyOf: - type: integer - type: 'null' title: Phase Template Id phase_name: type: string title: Phase Name status: $ref: '#/components/schemas/MilestoneStatus' display_idx: type: integer title: Display Idx created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At milestones: items: $ref: '#/components/schemas/MilestoneResponse' type: array title: Milestones type: object required: - id - matter_id - phase_template_id - phase_name - status - display_idx - created_at - updated_at - milestones title: PhaseResponse description: A matter phase with its nested milestones. TemporalJobProgress: properties: id: type: integer title: Id workflow_name: type: string title: Workflow Name workflow_id: type: string title: Workflow Id workflow_status: anyOf: - type: string - type: 'null' title: Workflow Status started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At finished_at: anyOf: - type: string format: date-time - type: 'null' title: Finished At error_message: anyOf: - type: string - type: 'null' title: Error Message type: object required: - id - workflow_name - workflow_id - workflow_status - started_at - finished_at - error_message title: TemporalJobProgress CreditDebugRow: properties: event_time: type: string format: date-time title: Event Time module: type: string title: Module step: type: string title: Step model: type: string title: Model input_tokens: type: integer title: Input Tokens output_tokens: type: integer title: Output Tokens cached_tokens: type: integer title: Cached Tokens thinking_tokens: type: integer title: Thinking Tokens cost_usd: anyOf: - type: number - type: 'null' title: Cost Usd credits: type: number title: Credits pricing_source: anyOf: - type: string - type: 'null' title: Pricing Source type: object required: - event_time - module - step - model - input_tokens - output_tokens - cached_tokens - thinking_tokens - cost_usd - credits - pricing_source title: CreditDebugRow description: One recorded LLM/API call and what it charged. CaseAnalysisResponse: properties: id: type: string format: uuid title: Id matter_id: type: string title: Matter Id stage: type: string title: Stage error: anyOf: - type: string - type: 'null' title: Error analysis_metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Analysis Metadata case_brief: anyOf: - additionalProperties: true type: object - type: 'null' title: Case Brief created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At tasks: items: $ref: '#/components/schemas/CaseAnalysisTaskResponse' type: array title: Tasks type: object required: - id - matter_id - stage - error - analysis_metadata - case_brief - created_at - updated_at - tasks title: CaseAnalysisResponse SmartbotDetail: properties: conversation_id: type: string title: Conversation Id message_count: type: integer title: Message Count last_message_at: anyOf: - type: string format: date-time - type: 'null' title: Last Message At type: object required: - conversation_id - message_count - last_message_at title: SmartbotDetail CreateSkillRequest: properties: name: type: string maxLength: 256 title: Name short_name: anyOf: - type: string maxLength: 256 - type: 'null' title: Short Name description: anyOf: - type: string maxLength: 1024 - type: 'null' title: Description prompt: type: string maxLength: 200000 title: Prompt shared: $ref: '#/components/schemas/SkillVisibility' default: private shared_enterprise_users: anyOf: - items: type: string type: array - type: 'null' title: Shared Enterprise Users custom: type: boolean title: Custom default: false type: object required: - name - prompt title: CreateSkillRequest description: Request body for creating a skill. AddTeamMembersResponse: properties: results: items: $ref: '#/components/schemas/TeamMemberResultStatus' type: array title: Results type: object required: - results title: AddTeamMembersResponse description: Response with per-member statuses for add team members operations. StructuredAnswer: properties: sections: items: $ref: '#/components/schemas/AnswerSection' type: array title: Sections description: Ordered answer sections. additionalProperties: false type: object required: - sections title: StructuredAnswer description: 'JSON synthesis output: a list of sections, each with cited claims.' BillableHoursAggregates: properties: hours_this_month: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Hours This Month total_hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Total Hours matter_task_count: type: integer title: Matter Task Count default: 0 type: object required: - hours_this_month - total_hours title: BillableHoursAggregates description: Aggregate billable hours stats for a user on a matter. TaskResponse: properties: id: type: integer title: Id milestone_id: type: integer title: Milestone Id task_text: type: string title: Task Text module_type: anyOf: - type: string - type: 'null' title: Module Type status: $ref: '#/components/schemas/MilestoneStatus' display_idx: type: integer title: Display Idx associated_task_id: anyOf: - type: string - type: 'null' title: Associated Task Id created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At type: object required: - id - milestone_id - task_text - module_type - status - display_idx - associated_task_id - created_at - updated_at title: TaskResponse description: A single milestone task. CreateClientRequest: properties: first_name: type: string minLength: 1 title: First Name last_name: type: string minLength: 1 title: Last Name email: anyOf: - type: string - type: 'null' title: Email phone: anyOf: - type: string - type: 'null' title: Phone company_name: anyOf: - type: string - type: 'null' title: Company Name type: object required: - first_name - last_name title: CreateClientRequest description: Create a new client contact record. ImportSkillFromDocumentRequest: properties: document_id: type: string format: uuid4 title: Document Id type: object required: - document_id title: ImportSkillFromDocumentRequest description: Request to create a skill from a skill.md file stored in DocHub. SearchModeConfig: properties: mode: type: string const: search title: Mode default: search query: type: string minLength: 1 title: Query description: Required user question for the pipeline. task_id: anyOf: - type: string - type: 'null' title: Task Id description: Optional task/conversation scope. When omitted, the engine short-circuits to matter-only markdown. search_config: anyOf: - $ref: '#/components/schemas/SearchConfig' - type: 'null' description: Pipeline configuration overrides; defaults applied when omitted. additionalProperties: false type: object required: - query title: SearchModeConfig description: 'Config for ``mode=''search''``: deterministic retrieve→analyze→synthesize pipeline.' AdminSetSkillHiddenRequest: properties: hide_prompt: type: boolean title: Hide Prompt type: object required: - hide_prompt title: AdminSetSkillHiddenRequest description: Admin request to set whether a skill's prompt is hidden from non-creators. UpdateSkillRequest: properties: name: anyOf: - type: string - type: 'null' title: Name short_name: anyOf: - type: string - type: 'null' title: Short Name description: anyOf: - type: string - type: 'null' title: Description prompt: anyOf: - type: string - type: 'null' title: Prompt shared: anyOf: - $ref: '#/components/schemas/SkillVisibility' - type: 'null' shared_enterprise_users: anyOf: - items: type: string type: array - type: 'null' title: Shared Enterprise Users type: object title: UpdateSkillRequest description: Partial update for a skill. Only supplied fields are applied. UserInfo: properties: user_id: type: string title: User Id fullname: anyOf: - type: string - type: 'null' title: Fullname email: anyOf: - type: string - type: 'null' title: Email profile_url: anyOf: - type: string - type: 'null' title: Profile Url type: object required: - user_id title: UserInfo description: Lightweight user info embedded in responses. TeamBillableHoursSummaryResponse: properties: members: items: $ref: '#/components/schemas/TeamMemberBillableHoursSummary' type: array title: Members team_total_hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Team Total Hours team_hours_this_month: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Team Hours This Month type: object required: - members - team_total_hours - team_hours_this_month title: TeamBillableHoursSummaryResponse description: Team-wide billable hours summary for a matter. TaskAuditLogCreateRequest: properties: task_id: type: string minLength: 1 title: Task Id module_type: type: string minLength: 1 title: Module Type action: type: string minLength: 1 title: Action details: additionalProperties: true type: object title: Details type: object required: - task_id - module_type - action title: TaskAuditLogCreateRequest description: Request body for creating a task audit log entry. AdminUpdateSkillRequest: properties: name: anyOf: - type: string maxLength: 256 - type: 'null' title: Name short_name: anyOf: - type: string maxLength: 256 - type: 'null' title: Short Name description: anyOf: - type: string maxLength: 1024 - type: 'null' title: Description prompt: anyOf: - type: string maxLength: 200000 - type: 'null' title: Prompt type: object title: AdminUpdateSkillRequest description: Admin partial update that creates the next immutable skill version. AdminCaseAnalysisDetailResponse: properties: analysis_id: type: string format: uuid title: Analysis Id executions: items: $ref: '#/components/schemas/WorkflowExecutionInfo' type: array title: Executions tasks: items: $ref: '#/components/schemas/TaskDetail' type: array title: Tasks type: object required: - analysis_id - executions - tasks title: AdminCaseAnalysisDetailResponse _RegenerateMemoryResponse: properties: status: type: string title: Status type: object required: - status title: _RegenerateMemoryResponse PublicSkillListResponse: properties: skills: items: $ref: '#/components/schemas/SkillResponse' type: array title: Skills type: object required: - skills title: PublicSkillListResponse description: All public skills (reviewed and unreviewed) — the admin review queue. Straggler: properties: workflow_id: anyOf: - type: string - type: 'null' title: Workflow Id doc_id: anyOf: - type: string - type: 'null' title: Doc Id started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At dataset_id: anyOf: - type: integer - type: 'null' title: Dataset Id type: object required: - workflow_id - doc_id - started_at - dataset_id title: Straggler SkillSearchResponse: properties: results: items: $ref: '#/components/schemas/SkillResponse' type: array title: Results type: object required: - results title: SkillSearchResponse description: Semantic search results over skills visible to the caller. UserSkillStateResponse: properties: enabled: anyOf: - type: boolean - type: 'null' title: Enabled starred: anyOf: - type: boolean - type: 'null' title: Starred date_added: anyOf: - type: string format: date-time - type: 'null' title: Date Added type: object required: - enabled - starred - date_added title: UserSkillStateResponse description: A user's enable/star state for a skill. None fields mean the user has never added it. AdminCreateSkillRequest: properties: name: type: string maxLength: 256 title: Name short_name: type: string maxLength: 256 title: Short Name description: type: string maxLength: 1024 title: Description prompt: type: string maxLength: 200000 title: Prompt type: object required: - name - short_name - description - prompt title: AdminCreateSkillRequest description: Admin request to create a public, reviewed skill owned by the system account. DatasetProgressResponse: properties: dataset: $ref: '#/components/schemas/DatasetProgressHeader' runs: items: $ref: '#/components/schemas/AnalysisRunProgress' type: array title: Runs temporal_jobs: items: $ref: '#/components/schemas/TemporalJobProgress' type: array title: Temporal Jobs type: object required: - dataset - runs - temporal_jobs title: DatasetProgressResponse CreateAndLinkClientRequest: properties: first_name: type: string minLength: 1 title: First Name last_name: type: string minLength: 1 title: Last Name email: anyOf: - type: string - type: 'null' title: Email phone: anyOf: - type: string - type: 'null' title: Phone company_name: anyOf: - type: string - type: 'null' title: Company Name role: anyOf: - type: string - type: 'null' title: Role type: object required: - first_name - last_name title: CreateAndLinkClientRequest description: Create a new client and link to a matter in one request. IntegrationLinkResponse: properties: provider: type: string title: Provider external_id: anyOf: - type: string - type: 'null' title: External Id external_name: anyOf: - type: string - type: 'null' title: External Name external_updated_at: anyOf: - type: string format: date-time - type: 'null' title: External Updated At last_synced_at: anyOf: - type: string format: date-time - type: 'null' title: Last Synced At type: object required: - provider title: IntegrationLinkResponse description: Integration link info returned alongside a matter. app__modules__matters__schemas__milestones__NextStepsResponse: properties: matter_id: type: string title: Matter Id stage: type: string title: Stage suggestions: items: $ref: '#/components/schemas/NextStepItem' type: array title: Suggestions phase_template: items: $ref: '#/components/schemas/PhaseTemplate' type: array title: Phase Template type: object required: - matter_id - stage - suggestions title: NextStepsResponse description: Matter-level next-step suggestions with the resolved (or inferred) stage. CauseOfActionAssessment: properties: name: type: string title: Name description: Name of the cause of action. default: '' strength: type: string title: Strength description: 'Strength rating: strong, moderate, or weak.' default: moderate summary: type: string title: Summary description: 1-2 sentence summary of the assessment. default: '' full_analysis: type: string title: Full Analysis description: Detailed analysis for the 'Read More' expansion. default: '' type: object title: CauseOfActionAssessment description: Assessment of a single cause of action. EvidenceBlock: properties: ref_id: type: integer title: Ref Id description: Sequential reference number used as [N] in the answer. source_tool: type: string title: Source Tool description: Tool name that produced this evidence. source_type: type: string enum: - matter - matter_preferences - matter_memory - task_memory - document_summary - document_chunk - conversation_message - timeline_event - deposition - tasks - caselaw - forensic_transaction title: Source Type description: Normalized taxonomy of the underlying source. Decoupled from ``source_tool`` so callers can join citations back to typed records without parsing tool names. source_id: anyOf: - type: string - type: 'null' title: Source Id description: 'Identifier of the underlying record. Semantics by source_type: matter/matter_memory -> matter_id; task_memory -> task_id; document_summary/document_chunk -> doc_id; conversation_message -> conversation_id; tasks -> None (aggregate).' chunk_id: anyOf: - type: string - type: 'null' title: Chunk Id description: Vector store node id for ``document_chunk``; None for all other source_types. page_label: anyOf: - type: string - type: 'null' title: Page Label description: Page label for document chunks; None for non-paginated sources. content: type: string title: Content description: Verbatim content excerpt the LLM may quote from. additionalProperties: false type: object required: - ref_id - source_tool - source_type - content title: EvidenceBlock description: One numbered piece of evidence presented to the synthesis step. CreateMilestoneRequest: properties: milestone_text: type: string title: Milestone Text phase_id: anyOf: - type: integer - type: 'null' title: Phase Id description: Phase to add to. Defaults to the last phase. type: object required: - milestone_text title: CreateMilestoneRequest description: Request body for creating a milestone. DeepSearchModeConfig: properties: mode: type: string const: deep_search title: Mode default: deep_search query: type: string minLength: 1 title: Query description: Required user question for the pipeline. task_id: anyOf: - type: string - type: 'null' title: Task Id description: Optional task/conversation scope. When omitted, the engine short-circuits to matter-only markdown. deep_search_config: anyOf: - $ref: '#/components/schemas/DeepSearchConfig' - type: 'null' description: Deep-search pipeline overrides; defaults applied when omitted. additionalProperties: false type: object required: - query title: DeepSearchModeConfig description: 'Config for ``mode=''deep_search''``: deterministic pipeline with deep-search budgets.' UpdateMatterClientRequest: properties: role: anyOf: - type: string - type: 'null' title: Role type: object title: UpdateMatterClientRequest description: Update the role on an existing matter-client link. FeatureFlagValueResponse: properties: key: type: string title: Key value: type: string title: Value type: object required: - key - value title: FeatureFlagValueResponse UpdateTaskStatusRequest: properties: status: anyOf: - $ref: '#/components/schemas/MilestoneStatus' - type: 'null' associated_task_id: anyOf: - type: string - type: 'null' title: Associated Task Id type: object title: UpdateTaskStatusRequest description: Request body for updating task status/linked conversation. MatterAllocationEntry: properties: matter_id: type: string title: Matter Id matter_name: type: string title: Matter Name hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Hours task_count: type: integer title: Task Count default: 0 type: object required: - matter_id - matter_name - hours title: MatterAllocationEntry description: Allocation data for a single matter in the current month. UnifiedFastResult: properties: mode: type: string const: fast title: Mode default: fast matter_id: type: string title: Matter Id markdown: type: string title: Markdown metadata: $ref: '#/components/schemas/ContextMetadata' strategy: anyOf: - type: string - type: 'null' title: Strategy description: 'Synthesis strategy: ''parallel'' | ''cached'' (served from Matter.Memory)' additionalProperties: false type: object required: - matter_id - markdown title: UnifiedFastResult description: Response when mode is fast (parallel context build). CreateBillableHoursRequest: properties: entry_date: type: string format: date title: Entry Date hours: anyOf: - type: number maximum: 24.0 exclusiveMinimum: 0.0 - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Hours type: object required: - entry_date - hours title: CreateBillableHoursRequest description: Create a new billable hours entry. TeamMemberWithPermissionsResponse: properties: user_id: type: string title: User Id email: anyOf: - type: string - type: 'null' title: Email name: anyOf: - type: string - type: 'null' title: Name profile_url: anyOf: - type: string - type: 'null' title: Profile Url permissions: items: type: string type: array title: Permissions type: object required: - user_id title: TeamMemberWithPermissionsResponse description: Response model for a team member with matter-level permissions. TaskMatterInfo: properties: id: type: string title: Id name: type: string title: Name type: object required: - id - name title: TaskMatterInfo description: Lightweight matter reference returned with each task. EvidenceGap: properties: description: type: string title: Description description: Description of the evidence gap. default: '' priority: type: string title: Priority description: 'Priority rating: critical, important, or helpful.' default: important suggested_actions: items: type: string type: array title: Suggested Actions description: Actions to address the gap. type: object title: EvidenceGap description: A specific gap in evidence that should be addressed. MemoryDebugInfo: properties: gates: additionalProperties: true type: object title: Gates matter_memory_enabled: type: boolean title: Matter Memory Enabled cache: additionalProperties: true type: object title: Cache doc_hub: anyOf: - additionalProperties: true type: object - type: 'null' title: Doc Hub task_memories: items: $ref: '#/components/schemas/TaskMemoryDebugEntry' type: array title: Task Memories routing: additionalProperties: true type: object title: Routing description: Resolved per-role LLM routing (context_engine_luna_models admin feature flag) — model + provider for analysis, synthesis, fast_synthesis, and conversation_summary. type: object required: - gates - matter_memory_enabled - cache - doc_hub title: MemoryDebugInfo description: Diagnostic snapshot for the matter memory cache, gates, and doc-hub state. CompletionChild: properties: task_index: type: integer title: Task Index workflow_id: anyOf: - type: string - type: 'null' title: Workflow Id state: type: string title: State started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At finished_at: anyOf: - type: string format: date-time - type: 'null' title: Finished At type: object required: - task_index - workflow_id - state - started_at - finished_at title: CompletionChild AddTeamMembersRequest: properties: team_members: items: $ref: '#/components/schemas/TeamMemberInput' type: array minItems: 1 title: Team Members type: object required: - team_members title: AddTeamMembersRequest description: Request body for adding team members to a matter. TaskAuditLogListResponse: properties: logs: items: $ref: '#/components/schemas/TaskAuditLogResponse' type: array title: Logs total: type: integer title: Total type: object required: - logs - total title: TaskAuditLogListResponse description: Response for listing audit log entries. AnalysisRunProgress: properties: id: type: integer title: Id run_id: type: string title: Run Id workflow_name: type: string title: Workflow Name aggregate_state: type: string title: Aggregate State total_count: type: integer title: Total Count terminal_count: type: integer title: Terminal Count failed_count: type: integer title: Failed Count started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At finished_at: anyOf: - type: string format: date-time - type: 'null' title: Finished At last_finished_at: anyOf: - type: string format: date-time - type: 'null' title: Last Finished At child_counts: items: $ref: '#/components/schemas/ChildStateCount' type: array title: Child Counts queued: type: integer title: Queued in_flight: type: integer title: In Flight real_processed: type: integer title: Real Processed real_total: type: integer title: Real Total real_percent: anyOf: - type: number - type: 'null' title: Real Percent widget_processed: type: integer title: Widget Processed widget_total: type: integer title: Widget Total widget_percent: anyOf: - type: number - type: 'null' title: Widget Percent stragglers: items: $ref: '#/components/schemas/Straggler' type: array title: Stragglers completion_children: items: $ref: '#/components/schemas/CompletionChild' type: array title: Completion Children type: object required: - id - run_id - workflow_name - aggregate_state - total_count - terminal_count - failed_count - started_at - finished_at - last_finished_at - child_counts - queued - in_flight - real_processed - real_total - real_percent - widget_processed - widget_total - widget_percent - stragglers - completion_children title: AnalysisRunProgress TaskListItemResponse: properties: id: type: string title: Id description: anyOf: - type: string - type: 'null' title: Description task_type: $ref: '#/components/schemas/TaskTypeResponse' matter_id: anyOf: - type: string - type: 'null' title: Matter Id matter: anyOf: - $ref: '#/components/schemas/TaskMatterInfo' - type: 'null' reference_data: anyOf: - type: string - type: 'null' title: Reference Data created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At user: anyOf: - $ref: '#/components/schemas/UserInfo' - type: 'null' parent_conversation_id: anyOf: - type: string - type: 'null' title: Parent Conversation Id research_id: anyOf: - type: string - type: 'null' title: Research Id status: anyOf: - type: string - type: 'null' title: Status current_step: anyOf: - type: string - type: 'null' title: Current Step case_analysis_id: anyOf: - type: string - type: 'null' title: Case Analysis Id dataset_summary: anyOf: - $ref: '#/components/schemas/DatasetSummary' - type: 'null' permissions: items: type: string type: array title: Permissions type: object required: - id - description - task_type - matter_id - reference_data - created_at - updated_at title: TaskListItemResponse description: Response model for a task in a list, with per-object permissions. MonthlyAllocationResponse: properties: month: type: string title: Month year: type: integer title: Year matters: items: $ref: '#/components/schemas/MatterAllocationEntry' type: array title: Matters total_hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Total Hours total_task_count: type: integer title: Total Task Count default: 0 type: object required: - month - year - matters - total_hours title: MonthlyAllocationResponse description: Per-matter allocation breakdown for the current month. TransferMatterOwnershipRequest: properties: transferee_user_id: type: string title: Transferee User Id reason: anyOf: - type: string - type: 'null' title: Reason type: object required: - transferee_user_id title: TransferMatterOwnershipRequest description: Request body for transferring matter ownership. ChildStateCount: properties: state: type: string title: State n: type: integer title: N with_workflow_id: type: integer title: With Workflow Id type: object required: - state - n - with_workflow_id title: ChildStateCount ArtifactInventoryTask: properties: task_type: type: string title: Task Type conversation_ids: items: type: string type: array title: Conversation Ids default: [] dataset_ids: items: type: integer type: array title: Dataset Ids default: [] research_ids: items: type: string type: array title: Research Ids default: [] orphaned_conversation_ids: items: type: string type: array title: Orphaned Conversation Ids default: [] type: object required: - task_type title: ArtifactInventoryTask FeatureFlagResponse: properties: id: type: string title: Id key: type: string title: Key value: type: string title: Value type: $ref: '#/components/schemas/FlagType' description: anyOf: - type: string - type: 'null' title: Description created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At parsed_value: title: Parsed Value type: object required: - id - key - value - type - description - created_at - updated_at title: FeatureFlagResponse CreditDebugResponse: properties: enabled: type: boolean title: Enabled rows: items: $ref: '#/components/schemas/CreditDebugRow' type: array title: Rows default: [] type: object required: - enabled title: CreditDebugResponse description: '``enabled=False`` means the caller is not allowlisted — render nothing.' LedgerCreditsResponse: properties: credits: type: integer title: Credits month: type: string title: Month type: object required: - credits - month title: LedgerCreditsResponse DatasetType: type: string enum: - contract - discovery - benchmark - facts - depositions - reliance - forensic_accounting - oral_argument_simulator title: DatasetType PendingChildInfo: properties: workflow_id: type: string title: Workflow Id run_id: type: string title: Run Id workflow_type: type: string title: Workflow Type type: object required: - workflow_id - run_id - workflow_type title: PendingChildInfo WorkflowExecutionInfo: properties: workflow_id: type: string title: Workflow Id workflow_type: type: string title: Workflow Type status: type: string title: Status start_time: anyOf: - type: string format: date-time - type: 'null' title: Start Time close_time: anyOf: - type: string format: date-time - type: 'null' title: Close Time pending_activities: items: $ref: '#/components/schemas/PendingActivityInfo' type: array title: Pending Activities default: [] pending_children: items: $ref: '#/components/schemas/PendingChildInfo' type: array title: Pending Children default: [] type: object required: - workflow_id - workflow_type - status - start_time - close_time title: WorkflowExecutionInfo SearchEventBatchRequest: properties: events: items: $ref: '#/components/schemas/SearchEventPayload' type: array maxItems: 50 minItems: 1 title: Events type: object required: - events title: SearchEventBatchRequest description: Batch of search events sent from the frontend. TaskUpdateRequest: properties: title: anyOf: - type: string - type: 'null' title: Title description: Display title (may be encrypted by caller) conversation_matter: anyOf: - type: string - type: 'null' title: Conversation Matter description: Matter/jurisdiction display (may be encrypted) matter_id: anyOf: - type: string - type: 'null' title: Matter Id description: Matter id when linking task to a matter reference_data: anyOf: - type: string - type: 'null' title: Reference Data description: Reference data e.g. dataset id (Conversation only, not synced to LRS) type: object title: TaskUpdateRequest description: Request body for updating a Task row. CreateMatterRequest: properties: title: type: string minLength: 1 title: Title short_description: type: string minLength: 1 title: Short Description matter_details: type: string minLength: 1 title: Matter Details party_role: type: string title: Party Role default: N/A party_name: anyOf: - type: string - type: 'null' title: Party Name parties: items: $ref: '#/components/schemas/PartyEntry' type: array title: Parties known_causes: anyOf: - type: string - type: 'null' title: Known Causes matter_type: type: string minLength: 1 title: Matter Type court_level: anyOf: - type: string - type: 'null' title: Court Level jurisdiction: anyOf: - type: string - type: 'null' title: Jurisdiction court_system: anyOf: - type: string - type: 'null' title: Court System governing_jurisdiction: anyOf: - type: string - type: 'null' title: Governing Jurisdiction clients: items: $ref: '#/components/schemas/ClientInput' type: array title: Clients team_member_ids: items: type: string type: array title: Team Member Ids memory_enabled: type: boolean title: Memory Enabled default: false integration_provider: anyOf: - type: string minLength: 1 - type: 'null' title: Integration Provider integration_external_id: anyOf: - type: string minLength: 1 - type: 'null' title: Integration External Id integration_external_name: anyOf: - type: string - type: 'null' title: Integration External Name integration_external_updated_at: anyOf: - type: string format: date-time - type: 'null' title: Integration External Updated At type: object required: - title - short_description - matter_details - matter_type title: CreateMatterRequest description: Request body for creating a matter. TaskSuggestionsResponse: properties: matter_id: type: string title: Matter Id milestone_id: type: integer title: Milestone Id suggestions: items: $ref: '#/components/schemas/TaskSuggestionItem' type: array title: Suggestions type: object required: - matter_id - milestone_id - suggestions title: TaskSuggestionsResponse description: LLM-suggested tasks for a milestone. PurgeWorkDataResponse: properties: user_id: type: string title: User Id postgres: additionalProperties: type: integer type: object title: Postgres blobs: additionalProperties: type: boolean type: object title: Blobs vector_tables: items: type: string type: array title: Vector Tables type: object required: - user_id - postgres - blobs - vector_tables title: PurgeWorkDataResponse description: Shape returned by ``POST /platform/admin/users/{id}/purge-work-data``. PendingActivityInfo: properties: activity_type: type: string title: Activity Type attempt: type: integer title: Attempt last_heartbeat_details: anyOf: - items: {} type: array - type: 'null' title: Last Heartbeat Details last_heartbeat_time: anyOf: - type: string format: date-time - type: 'null' title: Last Heartbeat Time last_failure: anyOf: - type: string - type: 'null' title: Last Failure type: object required: - activity_type - attempt title: PendingActivityInfo LinkClientRequest: properties: client_id: type: string minLength: 1 title: Client Id role: anyOf: - type: string - type: 'null' title: Role type: object required: - client_id title: LinkClientRequest description: Link an existing client to a matter. DeepSearchConfig: properties: tools: items: type: string type: array title: Tools description: Deep search enables both supported retrieval tools by default. doc_ids: anyOf: - items: type: string type: array - type: 'null' title: Doc Ids description: Allowlist of DocHub doc IDs the doc-search tool is restricted to. ``None`` applies no allowlist (tool searches its full default scope). An empty list yields zero retrieval candidates. include_memory: type: boolean title: Include Memory description: When False, the iteration-0 preload is skipped entirely — no MATTER_MEMORY, TASK_MEMORY, conversation messages, matter markdown, or doc summaries. Synthesis grounds purely on retrieval results. Used by the task-only path to enforce no matter-level context leakage. default: true retrieval_preset: type: string enum: - legacy - narrow - standard - wide title: Retrieval Preset description: Deep search defaults to the 'wide' retrieval-budget preset (see SearchConfig.retrieval_preset). default: wide retrieval_budget: anyOf: - $ref: '#/components/schemas/RetrievalBudget' - type: 'null' description: Explicit retrieval budget override, e.g. for evals/debug. Takes precedence over `retrieval_preset` when the `context_engine_luna_models` flag is on; ignored (like `retrieval_preset`) when it is off. analysis_model: type: string title: Analysis Model description: OpenAI model used for combined relevance/sufficiency/refinement analysis. default: gpt-4.1-mini synthesis_model: type: string title: Synthesis Model description: Gemini model used to synthesize the grounded answer with numbered citations. default: gemini-3-flash-preview min_iterations: type: integer maximum: 10.0 minimum: 1.0 title: Min Iterations default: 3 max_iterations: type: integer maximum: 10.0 minimum: 1.0 title: Max Iterations default: 6 max_output_tokens: type: integer maximum: 32000.0 minimum: 256.0 title: Max Output Tokens default: 24000 output_format: type: string enum: - md - json title: Output Format description: Synthesis output format. ``md`` (default) returns a markdown answer with inline ``[N]`` citations; ``json`` returns a strict-schema ``StructuredAnswer`` populated under ``structured_answer`` with an empty ``answer`` string. default: md include_evidence: type: boolean title: Include Evidence description: When True (default), the response includes the numbered evidence blocks that ground the answer and synthesis is instructed to cite them. When False, evidence is still used internally for grounding but the response ``evidence`` field is ``[]``, the synthesis prompt does NOT instruct citation usage, and any leaked citation markers are stripped from the answer. default: true additionalProperties: false type: object title: DeepSearchConfig description: 'SearchConfig tuned for exhaustive retrieval. Same deterministic retrieve->analyze->synthesize pipeline as SearchConfig, with both supported tools enabled by default and larger iteration/output budgets (including a higher default minimum iteration count).' TracemallocStatusResponse: properties: is_tracing: type: boolean title: Is Tracing type: object required: - is_tracing title: TracemallocStatusResponse LegalResearchDetail: properties: research_id: type: string title: Research Id status: anyOf: - type: string - type: 'null' title: Status phase_type: anyOf: - type: string - type: 'null' title: Phase Type updated_at: anyOf: - type: string format: date-time - type: 'null' title: Updated At child_workflow: anyOf: - $ref: '#/components/schemas/WorkflowExecutionInfo' - type: 'null' type: object required: - research_id - status - phase_type - updated_at title: LegalResearchDetail 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 TransferTask: properties: task_id: type: string minLength: 1 title: Task Id task_type: type: string enum: - conversation - legal_research_session title: Task Type transferee_user_id: type: string minLength: 1 title: Transferee User Id reason: anyOf: - type: string - type: 'null' title: Reason type: object required: - task_id - task_type - transferee_user_id title: TransferTask description: Request body for transferring ownership of a task. SearchConfig: properties: tools: items: type: string type: array title: Tools description: Names of tools to invoke during the retrieval step. doc_ids: anyOf: - items: type: string type: array - type: 'null' title: Doc Ids description: Allowlist of DocHub doc IDs the doc-search tool is restricted to. ``None`` applies no allowlist (tool searches its full default scope). An empty list yields zero retrieval candidates. include_memory: type: boolean title: Include Memory description: When False, the iteration-0 preload is skipped entirely — no MATTER_MEMORY, TASK_MEMORY, conversation messages, matter markdown, or doc summaries. Synthesis grounds purely on retrieval results. Used by the task-only path to enforce no matter-level context leakage. default: true retrieval_preset: type: string enum: - legacy - narrow - standard - wide title: Retrieval Preset description: Named retrieval-budget preset controlling document/chunk recall width and evidence triage (see budgets.py). Only takes effect when the `context_engine_luna_models` admin flag is on — the flag-off path always resolves to the fixed 'legacy' behavior regardless of this field. Defaults to 'narrow' (legacy-equivalent width) so existing callers stay cheap; interactive Q&A callers should request 'standard' explicitly. default: narrow retrieval_budget: anyOf: - $ref: '#/components/schemas/RetrievalBudget' - type: 'null' description: Explicit retrieval budget override, e.g. for evals/debug. Takes precedence over `retrieval_preset` when the `context_engine_luna_models` flag is on; ignored (like `retrieval_preset`) when it is off. analysis_model: type: string title: Analysis Model description: OpenAI model used for combined relevance/sufficiency/refinement analysis. default: gpt-4.1-mini synthesis_model: type: string title: Synthesis Model description: Gemini model used to synthesize the grounded answer with numbered citations. default: gemini-3-flash-preview min_iterations: type: integer maximum: 10.0 minimum: 1.0 title: Min Iterations description: Minimum retrieve→analyze loop iterations before early exit on sufficient evidence or missing refined queries. default: 1 max_iterations: type: integer maximum: 10.0 minimum: 1.0 title: Max Iterations description: Maximum retrieve→analyze loop iterations before forcing synthesis. default: 3 max_output_tokens: type: integer maximum: 32000.0 minimum: 256.0 title: Max Output Tokens description: Upper bound on synthesized answer tokens. default: 8000 output_format: type: string enum: - md - json title: Output Format description: Synthesis output format. ``md`` (default) returns a markdown answer with inline ``[N]`` citations; ``json`` returns a strict-schema ``StructuredAnswer`` populated under ``structured_answer`` with an empty ``answer`` string. default: md include_evidence: type: boolean title: Include Evidence description: When True (default), the response includes the numbered evidence blocks that ground the answer and synthesis is instructed to cite them. When False, evidence is still used internally for grounding but the response ``evidence`` field is ``[]``, the synthesis prompt does NOT instruct citation usage, and any leaked citation markers are stripped from the answer. default: true additionalProperties: false type: object title: SearchConfig description: 'Caller-controlled configuration for the deterministic search pipeline. All fields have sensible defaults so a minimal request only needs ``query``.' SkillVisibility: type: string enum: - private - enterprise - public title: SkillVisibility description: Visibility scope for a smartbot skill (matters.skills.shared). UpdateClientRequest: properties: first_name: anyOf: - type: string minLength: 1 - type: 'null' title: First Name last_name: anyOf: - type: string minLength: 1 - type: 'null' title: Last Name email: anyOf: - type: string - type: 'null' title: Email phone: anyOf: - type: string - type: 'null' title: Phone company_name: anyOf: - type: string - type: 'null' title: Company Name type: object title: UpdateClientRequest description: Partial update of a client record. Only included fields are changed. Body_upload_profile_photo_endpoint_platform_profile_photo__user_id__post: properties: file: type: string contentMediaType: application/octet-stream title: File type: object required: - file title: Body_upload_profile_photo_endpoint_platform_profile_photo__user_id__post TaskAuditLogResponse: properties: id: type: integer title: Id conversation_id: anyOf: - type: string - type: 'null' title: Conversation Id lr_session_id: anyOf: - type: string - type: 'null' title: Lr Session Id module_type: type: string title: Module Type user_id: type: string title: User Id action: type: string title: Action details: additionalProperties: true type: object title: Details created_at: type: string format: date-time title: Created At type: object required: - id - module_type - user_id - action - details - created_at title: TaskAuditLogResponse description: Response model for a single audit log entry. SkillResponse: properties: id: type: integer title: Id name: type: string title: Name short_name: anyOf: - type: string - type: 'null' title: Short Name description: anyOf: - type: string - type: 'null' title: Description prompt: anyOf: - type: string - type: 'null' title: Prompt shared: $ref: '#/components/schemas/SkillVisibility' shared_enterprise_users: anyOf: - items: type: string type: array - type: 'null' title: Shared Enterprise Users creator_id: type: string title: Creator Id custom: type: boolean title: Custom reviewed: type: boolean title: Reviewed hide_prompt: type: boolean title: Hide Prompt date_created: type: string format: date-time title: Date Created version: type: integer title: Version previous_version_id: anyOf: - type: integer - type: 'null' title: Previous Version Id type: object required: - id - name - short_name - description - prompt - shared - shared_enterprise_users - creator_id - custom - reviewed - hide_prompt - date_created - version - previous_version_id title: SkillResponse description: A skill definition. Excludes the internal embedding vector. SectionAttribution: properties: heading: type: string title: Heading description: Heading text from the output markdown sources: items: $ref: '#/components/schemas/SourceRef' type: array title: Sources type: object required: - heading - sources title: SectionAttribution description: Maps an output markdown heading to the source(s) that produced it. TaskTodosRequest: properties: task_ids: items: type: string type: array title: Task Ids type: object required: - task_ids title: TaskTodosRequest description: Request body for the batch todos endpoint. FailedFileDelete: properties: id: type: string format: uuid title: Id reason: type: string title: Reason type: object required: - id - reason title: FailedFileDelete description: 'One per-file failure entry in :class:`MatterDeleteResponse`. Locally-defined (not imported from ``document.api.schemas``) to keep the platform schemas free of a runtime dep on document schemas — that edge would close a cycle through ``legal_research.external``.' TaskListResponse: properties: tasks: items: $ref: '#/components/schemas/TaskListItemResponse' type: array title: Tasks total: type: integer title: Total page: anyOf: - type: integer - type: 'null' title: Page page_size: anyOf: - type: integer - type: 'null' title: Page Size type: object required: - tasks - total title: TaskListResponse description: 'Response for the list tasks endpoint. When task_type is provided, page and page_size reflect the applied pagination. When task_type is None, pagination is not applied and page/page_size are None.' StartCaseAnalysisResponse: properties: case_analysis_id: type: string title: Case Analysis Id type: object required: - case_analysis_id title: StartCaseAnalysisResponse AdminCaseAnalysisTaskSummary: properties: task_type: type: string title: Task Type status: type: string title: Status error: anyOf: - type: string - type: 'null' title: Error started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At type: object required: - task_type - status - error - started_at - completed_at title: AdminCaseAnalysisTaskSummary FeatureFlagUpdate: properties: value: anyOf: - type: string - type: 'null' title: Value description: anyOf: - type: string - type: 'null' title: Description type: object title: FeatureFlagUpdate TaskReference: properties: task_id: type: string minLength: 1 title: Task Id task_type: type: string title: Task Type description: Must be "conversation" or "legal_research_session" type: object required: - task_id - task_type title: TaskReference description: A single task to link or unlink. DatasetProgressHeader: properties: id: type: integer title: Id name: type: string title: Name dataset_type: type: string title: Dataset Type file_count: type: integer title: File Count created_on: anyOf: - type: string format: date-time - type: 'null' title: Created On user_id: type: string title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email user_full_name: anyOf: - type: string - type: 'null' title: User Full Name type: object required: - id - name - dataset_type - file_count - created_on - user_id - user_email - user_full_name title: DatasetProgressHeader DatasetSummary: properties: id: type: integer title: Id name: type: string title: Name context: anyOf: - type: string - type: 'null' title: Context dataset_type: $ref: '#/components/schemas/DatasetType' created_on: type: string format: date-time title: Created On file_count: type: integer title: File Count import_count: type: integer title: Import Count linked_datasets: items: $ref: '#/components/schemas/LinkedDatasetInfo' type: array title: Linked Datasets linked_dataset_count: type: integer title: Linked Dataset Count default: 0 parent: anyOf: - $ref: '#/components/schemas/LinkedDatasetInfo' - type: 'null' capabilities: items: type: string type: array title: Capabilities reliance_file_count: type: integer title: Reliance File Count default: 0 type: object required: - id - name - dataset_type - created_on - file_count - import_count title: DatasetSummary description: 'The slice of a Dataset that task-list cards render. Exists so a landing page can paint its cards from the task list alone. The alternative is GET /discovery/dataset/{id} per visible card, which is a detail endpoint: it eager-loads every Document row, sums token counts, backfills import counts (a write during a GET) and computes a doc-review processing snapshot, none of which a card displays. Scoped deliberately to what the shared card and the landing pages read. Anything a card does not render stays off this model.' UpdatePhaseRequest: properties: phase_name: anyOf: - type: string - type: 'null' title: Phase Name status: anyOf: - $ref: '#/components/schemas/MilestoneStatus' - type: 'null' display_idx: anyOf: - type: integer - type: 'null' title: Display Idx type: object title: UpdatePhaseRequest description: Partial update for a matter phase. Only supplied fields are applied. FileUploadDetail: properties: doc_counts_by_status: additionalProperties: type: integer type: object title: Doc Counts By Status active_ingest_counts_by_status: additionalProperties: type: integer type: object title: Active Ingest Counts By Status type: object required: - doc_counts_by_status - active_ingest_counts_by_status title: FileUploadDetail TeamMemberResultStatus: properties: user_id: type: string title: User Id success: type: boolean title: Success error: anyOf: - type: string - type: 'null' title: Error type: object required: - user_id - success title: TeamMemberResultStatus description: Per-member result for an add operation. SuggestedTaskTitleResponse: properties: label: type: string title: Label count: type: integer title: Count type: object required: - label - count title: SuggestedTaskTitleResponse description: 'Inputs for a new task''s auto-filled title. The client composes ``[Matter Name] - {label} {count + 1}`` (dropping the matter prefix when no matter is linked). The matter name is encrypted at rest and only decrypted in the API proxy layer, so the title is assembled client-side; the backend returns the label and the existing-task ``count``.' LinkedDatasetInfo: properties: id: type: integer title: Id name: type: string title: Name dataset_type: $ref: '#/components/schemas/DatasetType' document_source: anyOf: - $ref: '#/components/schemas/DatasetDocumentSource' - type: 'null' type: object required: - id - name - dataset_type title: LinkedDatasetInfo description: Basic information about a linked dataset ClientInput: properties: first_name: type: string minLength: 1 title: First Name last_name: type: string minLength: 1 title: Last Name email: anyOf: - type: string - type: 'null' title: Email phone: anyOf: - type: string - type: 'null' title: Phone company_name: anyOf: - type: string - type: 'null' title: Company Name role: anyOf: - type: string - type: 'null' title: Role type: object required: - first_name - last_name title: ClientInput description: Client input for matter creation (no id). TracemallocSnapshotResponse: properties: was_tracing: type: boolean title: Was Tracing traced_current_bytes: type: integer title: Traced Current Bytes traced_peak_bytes: type: integer title: Traced Peak Bytes key_type: type: string title: Key Type limit: type: integer title: Limit top_stats: items: $ref: '#/components/schemas/TracemallocStat' type: array title: Top Stats type: object required: - was_tracing - traced_current_bytes - traced_peak_bytes - key_type - limit - top_stats title: TracemallocSnapshotResponse FlagType: type: string enum: - boolean - string - string_list - json title: FlagType description: 'Storage type for a feature flag value. boolean — "true" | "false" string — plain text value string_list — JSON array of strings, e.g. ''["a@b.com", "c@d.com"]'' json — arbitrary JSON object or array' TeamMemberListResponse: properties: team_members: items: $ref: '#/components/schemas/TeamMemberResponse' type: array title: Team Members type: object required: - team_members title: TeamMemberListResponse description: Response for the list team members endpoint. TaskDetail: properties: task_type: type: string title: Task Type file_upload: anyOf: - $ref: '#/components/schemas/FileUploadDetail' - type: 'null' analysis_run: anyOf: - $ref: '#/components/schemas/AnalysisRunDetail' - type: 'null' legal_research: anyOf: - $ref: '#/components/schemas/LegalResearchDetail' - type: 'null' smartbot: anyOf: - $ref: '#/components/schemas/SmartbotDetail' - type: 'null' type: object required: - task_type title: TaskDetail SearchEventPayload: properties: session_id: type: string title: Session Id event_type: type: string enum: - click - paginate - sort - filter - thumbs_up - thumbs_down - add_to_matter - remove_from_matter title: Event Type case_id: anyOf: - type: string - type: 'null' title: Case Id case_rank: anyOf: - type: integer - type: 'null' title: Case Rank page_number: anyOf: - type: integer - type: 'null' title: Page Number sort_option: anyOf: - type: string - type: 'null' title: Sort Option filter_state: anyOf: - additionalProperties: true type: object - type: 'null' title: Filter State metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata client_timestamp: anyOf: - type: string format: date-time - type: 'null' title: Client Timestamp type: object required: - session_id - event_type title: SearchEventPayload description: A single search interaction event. AdminCaseAnalysisOverviewResponse: properties: items: items: $ref: '#/components/schemas/AdminCaseAnalysisItem' type: array title: Items total: type: integer title: Total page: type: integer title: Page page_size: type: integer title: Page Size type: object required: - items - total - page - page_size title: AdminCaseAnalysisOverviewResponse MatterMilestonesResponse: properties: matter_id: type: string title: Matter Id phases: items: $ref: '#/components/schemas/PhaseResponse' type: array title: Phases type: object required: - matter_id - phases title: MatterMilestonesResponse description: Full milestone hierarchy for a matter. FastModeConfig: properties: mode: type: string const: fast title: Mode default: fast query: anyOf: - type: string - type: 'null' title: Query description: Optional focus string for synthesis. task_id: anyOf: - type: string - type: 'null' title: Task Id description: Optional task/conversation scope. When omitted, the engine short-circuits to matter-only markdown. additionalProperties: false type: object title: FastModeConfig description: 'Config for ``mode=''fast''``: parallel synthesis of matter memory.' AnswerSection: properties: heading: anyOf: - type: string - type: 'null' title: Heading description: Section heading, or null for a flat answer with no heading. claims: items: $ref: '#/components/schemas/AnswerClaim' type: array title: Claims description: Ordered claims within this section. additionalProperties: false type: object required: - claims title: AnswerSection description: A grouped set of claims under an optional heading. CreateTaskRequest: properties: task_text: type: string title: Task Text module_type: anyOf: - type: string - type: 'null' title: Module Type type: object required: - task_text title: CreateTaskRequest description: Request body for creating a task. MatterPreferencesResponse: properties: matter_id: type: string title: Matter Id highlights: anyOf: - type: string - type: 'null' title: Highlights exclusions: anyOf: - type: string - type: 'null' title: Exclusions type: object required: - matter_id title: MatterPreferencesResponse description: Response for matter preferences. BillableHoursListResponse: properties: entries: items: $ref: '#/components/schemas/BillableHoursEntryResponse' type: array title: Entries aggregates: $ref: '#/components/schemas/BillableHoursAggregates' type: object required: - entries - aggregates title: BillableHoursListResponse description: Response for listing billable hours entries with aggregates. UpdateBillableHoursRequest: properties: entry_date: anyOf: - type: string format: date - type: 'null' title: Entry Date hours: anyOf: - type: number maximum: 24.0 exclusiveMinimum: 0.0 - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Hours type: object title: UpdateBillableHoursRequest description: Partial update of a billable hours entry. Only included fields are changed. SkillListItem: properties: skill: $ref: '#/components/schemas/SkillResponse' state: $ref: '#/components/schemas/UserSkillStateResponse' type: object required: - skill - state title: SkillListItem description: A visible skill paired with the caller's state for it. TaskMemoryDebugEntry: properties: task_id: type: string title: Task Id generated_at: anyOf: - type: string - type: 'null' title: Generated At type: object required: - task_id - generated_at title: TaskMemoryDebugEntry MatterResponse: properties: id: type: string title: Id title: type: string title: Title short_description: type: string title: Short Description matter_details: type: string title: Matter Details known_causes: anyOf: - type: string - type: 'null' title: Known Causes party_role: type: string title: Party Role party_name: anyOf: - type: string - type: 'null' title: Party Name parties: items: additionalProperties: true type: object type: array title: Parties archived: type: boolean title: Archived case_analysis_eligible: type: boolean title: Case Analysis Eligible memory_enabled: type: boolean title: Memory Enabled memory: anyOf: - additionalProperties: true type: object - type: 'null' title: Memory memory_updated_at: anyOf: - type: string format: date-time - type: 'null' title: Memory Updated At matter_type: type: string title: Matter Type court_level: anyOf: - type: string - type: 'null' title: Court Level jurisdiction: anyOf: - type: string - type: 'null' title: Jurisdiction court_system: anyOf: - type: string - type: 'null' title: Court System governing_jurisdiction: anyOf: - type: string - type: 'null' title: Governing Jurisdiction created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At user: $ref: '#/components/schemas/UserInfo' clients: items: $ref: '#/components/schemas/ClientResponse' type: array title: Clients integration_link: anyOf: - $ref: '#/components/schemas/IntegrationLinkResponse' - type: 'null' task_count: type: integer title: Task Count default: 0 total_hours: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Total Hours default: '0' document_count: type: integer title: Document Count default: 0 type: object required: - id - title - short_description - matter_details - known_causes - party_role - party_name - archived - case_analysis_eligible - memory_enabled - matter_type - court_level - jurisdiction - created_at - updated_at - user title: MatterResponse description: Response model for a single Matter.