{"openapi":"3.1.0","info":{"title":"Citera API","version":"0.1.0","description":"Content in; every atomic claim back with a verdict and a character-verified receipt. Includes the Citation Verification profile (defendant motion → cited-opinion checks)."},"servers":[{"url":"/"}],"tags":[{"name":"Jobs","description":"Generic document-vs-document verification"},{"name":"Cases","description":"Citation Verification profile — cases over a motion"},{"name":"Citations","description":"Citations within a case + source mapping"},{"name":"Verification","description":"Trigger + stream citation verification"},{"name":"Sources","description":"Archived source display artifacts"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/jobs":{"post":{"tags":["Jobs"],"summary":"Create a verification job","description":"Multipart form. Two source modes:\n\n- **user_provided** (default): supply content AND a source. Each slot accepts exactly one input method — content via `content` (file or text) or `content_url`; source via `source` (file), `source_text`, or `source_url`. URLs are fetched once behind an SSRF guard and archived; grounding uses the snapshot.\n- **web** (`source_mode=web`): supply ONLY content. The worker generates search queries, finds sources on the web (SSRF-guarded fetch + archive), and grounds against them. Spend is capped per job and per tenant; `stats.web` reports searches/fetches/sources used and whether the budget cap was hit.\n\nHonors `Idempotency-Key`.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"source_mode":{"description":"source acquisition mode (default 'user_provided')","type":"string","enum":["user_provided","web"]},"content":{"description":"content as a file part OR a pasted-text field","type":"string"},"content_url":{"description":"content as a URL to fetch","type":"string"},"source":{"description":"source as a file part (user_provided mode)","type":"string"},"source_text":{"description":"source as pasted text (user_provided mode)","type":"string"},"source_url":{"description":"source as a URL to fetch (user_provided mode)","type":"string"}}}}}},"responses":{"200":{"description":"Idempotent replay — original job returned","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["jobId"],"additionalProperties":false}}}},"201":{"description":"Job created","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["jobId"],"additionalProperties":false}}}},"400":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"401":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"413":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"415":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"422":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"429":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Fetch a verification job","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"The full job with claims, verdicts, and receipts","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenantId":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","extracting","acquiring_sources","decomposing","grounding","judging","complete","failed","canceled"]},"sourceMode":{"default":"user_provided","type":"string","enum":["user_provided","web"]},"contentText":{"type":"string"},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["supplied","web","resolved"]},"origin":{"type":"string","enum":["upload","paste","url","web_search","user_url","system"]},"fetchStatus":{"type":"string","enum":["ok","fetch_failed","filtered_out"]},"fetchError":{"anyOf":[{"type":"string"},{"type":"null"}]},"addedBy":{"type":"string","enum":["system","user"]},"title":{"type":"string"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"displayUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta":{"type":"object","properties":{"mimeType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"pages":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceUrl":{"type":"string"},"fetchedAt":{"type":"string"},"fetchVia":{"type":"string","enum":["direct","proxy","scrapingbee"]},"screenshotUrl":{"type":"string"},"screenshotHighlightedUrl":{"type":"string"},"screenshotCapturedAt":{"type":"string"},"mergedSources":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filename","pages","startOffset","endOffset"],"additionalProperties":false}}},"required":["mimeType","bytes","pages","sha256"],"additionalProperties":false}},"required":["id","kind","origin","fetchStatus","fetchError","addedBy","title","uri","text","displayUri","meta"],"additionalProperties":false}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"type":"string"},"startIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"endIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"category":{"anyOf":[{"type":"string","enum":["DATE","NUMBER","NAME","QUOTE","EVENT","CLAIM"]},{"type":"null"}]}},"required":["id","jobId","text","startIndex","endIndex","category"],"additionalProperties":false}},"verdicts":{"type":"array","items":{"type":"object","properties":{"claimId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["supported","partial","unsupported","contradicted","could_not_verify"]},"confidence":{"type":"number","minimum":0,"maximum":1},"explanation":{"type":"string"},"sanitized":{"type":"boolean"},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"claimId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"citedText":{"type":"string"},"srcStart":{"type":"integer","minimum":0,"maximum":9007199254740991},"srcEnd":{"type":"integer","minimum":0,"maximum":9007199254740991},"stance":{"type":"string","enum":["supports","contradicts"]},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["id","claimId","sourceId","citedText","srcStart","srcEnd","stance","confidence"],"additionalProperties":false}},"corroborationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"suggestedFix":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["claimId","status","confidence","explanation","sanitized","evidence","corroborationCount","suggestedFix"],"additionalProperties":false}},"stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"supported":{"type":"integer","minimum":0,"maximum":9007199254740991},"partial":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsupported":{"type":"integer","minimum":0,"maximum":9007199254740991},"contradicted":{"type":"integer","minimum":0,"maximum":9007199254740991},"couldNotVerify":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"sanitizedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"gradeEscalations":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"type":"number","minimum":0,"maximum":100},"incomplete":{"type":"boolean"},"web":{"type":"object","properties":{"searches":{"type":"integer","minimum":0,"maximum":9007199254740991},"fetches":{"type":"integer","minimum":0,"maximum":9007199254740991},"proxyFetches":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"scrapingBeeFetches":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"sources":{"type":"integer","minimum":0,"maximum":9007199254740991},"escalations":{"type":"integer","minimum":0,"maximum":9007199254740991},"screenshotsCaptured":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"screenshotsHighlighted":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"searchProvider":{"type":"string","enum":["anthropic","gemini","grok"]},"budgetHit":{"type":"boolean"}},"required":["searches","fetches","proxyFetches","scrapingBeeFetches","sources","escalations","screenshotsCaptured","screenshotsHighlighted","budgetHit"],"additionalProperties":false},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheCreationInputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheReadInputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedCostUsd":{"type":"number","minimum":0}},"required":["inputTokens","outputTokens","cacheCreationInputTokens","cacheReadInputTokens","totalTokens","calls","estimatedCostUsd"],"additionalProperties":false},"extractionGranularity":{"type":"string","enum":["sentence","fact","both"]},"verificationMode":{"type":"string","enum":["independent","source_grounded"]},"grounding":{"type":"object","properties":{"provider":{"type":"string","const":"groq"},"model":{"type":"string"},"miniGraded":{"type":"integer","minimum":0,"maximum":9007199254740991},"compoundGraded":{"type":"integer","minimum":0,"maximum":9007199254740991},"fuzzyRecovered":{"type":"integer","minimum":0,"maximum":9007199254740991},"dropped":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsHumanReview":{"type":"integer","minimum":0,"maximum":9007199254740991},"avgSimilarity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["provider","model","miniGraded","compoundGraded","fuzzyRecovered","dropped","needsHumanReview","avgSimilarity"],"additionalProperties":false},"chunking":{"type":"object","properties":{"applied":{"type":"boolean"},"chunkCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentPages":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["applied","chunkCount","contentPages"],"additionalProperties":false}},"required":["total","supported","partial","unsupported","contradicted","couldNotVerify","sanitizedCount","gradeEscalations","score"],"additionalProperties":false},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","tenantId","status","sourceMode","contentText","contentSha256","sources","claims","verdicts","stats","error","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/jobs/{id}/events":{"get":{"tags":["Jobs"],"summary":"Server-Sent Events stream of stage transitions and per-claim verdicts","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"text/event-stream"},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/cases":{"post":{"tags":["Cases"],"summary":"Create a citation-verification case","description":"The citing document (motion) as exactly one of: a `motion` file part, a `motion_text` pasted-text field, or a `motion_url` URL. Extracts citations.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"motion":{"description":"the motion as a file part","type":"string"},"motion_text":{"description":"the motion as pasted text","type":"string"},"motion_url":{"description":"the motion as a URL to fetch","type":"string"},"title":{"description":"case title","type":"string"}}}}}},"responses":{"201":{"description":"Case created; citation extraction enqueued","content":{"application/json":{"schema":{"type":"object","properties":{"caseId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["caseId"],"additionalProperties":false}}}},"400":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"401":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"413":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"415":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"422":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}},"get":{"tags":["Cases"],"summary":"List cases","parameters":[{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"number"}}],"responses":{"200":{"description":"Cases","content":{"application/json":{"schema":{"type":"object","properties":{"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"status":{"type":"string","enum":["queued","extracting_citations","awaiting_source_mapping","analyzing","verifying","relevance","complete","failed"]},"stats":{"type":"object","properties":{"citations":{"type":"integer","minimum":0,"maximum":9007199254740991},"fully":{"type":"integer","minimum":0,"maximum":9007199254740991},"partially":{"type":"integer","minimum":0,"maximum":9007199254740991},"not":{"type":"integer","minimum":0,"maximum":9007199254740991},"contradicting":{"type":"integer","minimum":0,"maximum":9007199254740991},"vague":{"type":"integer","minimum":0,"maximum":9007199254740991},"mapped":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmapped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["citations","fully","partially","not","contradicting","vague","mapped","unmapped"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","title","status","stats","createdAt"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["cases","total"],"additionalProperties":false}}}}}}},"/v1/cases/{id}":{"get":{"tags":["Cases"],"summary":"Fetch a case (citations, statements, results, stats)","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"The full case aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenantId":{"type":"string","minLength":1},"title":{"type":"string"},"motionDocumentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","extracting_citations","awaiting_source_mapping","analyzing","verifying","relevance","complete","failed"]},"stats":{"type":"object","properties":{"citations":{"type":"integer","minimum":0,"maximum":9007199254740991},"fully":{"type":"integer","minimum":0,"maximum":9007199254740991},"partially":{"type":"integer","minimum":0,"maximum":9007199254740991},"not":{"type":"integer","minimum":0,"maximum":9007199254740991},"contradicting":{"type":"integer","minimum":0,"maximum":9007199254740991},"vague":{"type":"integer","minimum":0,"maximum":9007199254740991},"mapped":{"type":"integer","minimum":0,"maximum":9007199254740991},"unmapped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["citations","fully","partially","not","contradicting","vague","mapped","unmapped"],"additionalProperties":false},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"motion":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["supplied","web","resolved"]},"origin":{"type":"string","enum":["upload","paste","url","web_search","user_url","system"]},"fetchStatus":{"type":"string","enum":["ok","fetch_failed","filtered_out"]},"fetchError":{"anyOf":[{"type":"string"},{"type":"null"}]},"addedBy":{"type":"string","enum":["system","user"]},"title":{"type":"string"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"displayUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta":{"type":"object","properties":{"mimeType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"pages":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceUrl":{"type":"string"},"fetchedAt":{"type":"string"},"fetchVia":{"type":"string","enum":["direct","proxy","scrapingbee"]},"screenshotUrl":{"type":"string"},"screenshotHighlightedUrl":{"type":"string"},"screenshotCapturedAt":{"type":"string"},"mergedSources":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filename","pages","startOffset","endOffset"],"additionalProperties":false}}},"required":["mimeType","bytes","pages","sha256"],"additionalProperties":false}},"required":["id","kind","origin","fetchStatus","fetchError","addedBy","title","uri","text","displayUri","meta"],"additionalProperties":false},{"type":"null"}]},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["supplied","web","resolved"]},"origin":{"type":"string","enum":["upload","paste","url","web_search","user_url","system"]},"fetchStatus":{"type":"string","enum":["ok","fetch_failed","filtered_out"]},"fetchError":{"anyOf":[{"type":"string"},{"type":"null"}]},"addedBy":{"type":"string","enum":["system","user"]},"title":{"type":"string"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"displayUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta":{"type":"object","properties":{"mimeType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"pages":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceUrl":{"type":"string"},"fetchedAt":{"type":"string"},"fetchVia":{"type":"string","enum":["direct","proxy","scrapingbee"]},"screenshotUrl":{"type":"string"},"screenshotHighlightedUrl":{"type":"string"},"screenshotCapturedAt":{"type":"string"},"mergedSources":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filename","pages","startOffset","endOffset"],"additionalProperties":false}}},"required":["mimeType","bytes","pages","sha256"],"additionalProperties":false}},"required":["id","kind","origin","fetchStatus","fetchError","addedBy","title","uri","text","displayUri","meta"],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"caseId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"citationString":{"type":"string"},"normalizedName":{"type":"string"},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"mappingStatus":{"type":"string","enum":["unmapped","mapped"]},"statements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"citationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"defendantStatement":{"type":"string"},"whatYouSaid":{"type":"string"},"detailedPurpose":{"type":"string"},"startIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"endIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"caseProposition":{"anyOf":[{"type":"string"},{"type":"null"}]},"analysisGroundedRefs":{"type":"array","items":{"type":"object","properties":{"citedText":{"type":"string"},"startCharIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"endCharIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"documentTitle":{"type":"string"}},"required":["citedText","startCharIndex","endCharIndex","documentTitle"],"additionalProperties":false}},"result":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"citationStatementId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"classification":{"type":"string","enum":["fully_supported","partially_supported","not_supported","contradicting","vague_insufficient"]},"confidence":{"type":"number","minimum":0,"maximum":1},"explanation":{"type":"string"},"groundedExcerpts":{"type":"array","items":{"type":"object","properties":{"citedText":{"type":"string"},"startCharIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"endCharIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"documentTitle":{"type":"string"}},"required":["citedText","startCharIndex","endCharIndex","documentTitle"],"additionalProperties":false}},"needsHumanReview":{"type":"boolean"},"firstPassClassification":{"anyOf":[{"type":"string","enum":["fully_supported","partially_supported","not_supported","contradicting","vague_insufficient"]},{"type":"null"}]},"relevance":{"anyOf":[{"type":"object","properties":{"isRelevantToDispute":{"type":"boolean"},"relevanceScore":{"type":"number","minimum":0,"maximum":1},"explanation":{"type":"string"}},"required":["isRelevantToDispute","relevanceScore","explanation"],"additionalProperties":false},{"type":"null"}]}},"required":["id","citationStatementId","classification","confidence","explanation","groundedExcerpts","needsHumanReview","firstPassClassification","relevance"],"additionalProperties":false},{"type":"null"}]}},"required":["id","citationId","defendantStatement","whatYouSaid","detailedPurpose","startIndex","endIndex","caseProposition","analysisGroundedRefs","result"],"additionalProperties":false}}},"required":["id","caseId","citationString","normalizedName","sourceDocumentId","mappingStatus","statements"],"additionalProperties":false}}},"required":["id","tenantId","title","motionDocumentId","status","stats","error","createdAt","updatedAt","motion","sources","citations"],"additionalProperties":false}}}},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/cases/{id}/citations":{"get":{"tags":["Citations"],"summary":"List a case’s citations + mapping status","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"Citations","content":{"application/json":{"schema":{"type":"object","properties":{"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"caseId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"citationString":{"type":"string"},"normalizedName":{"type":"string"},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"mappingStatus":{"type":"string","enum":["unmapped","mapped"]}},"required":["id","caseId","citationString","normalizedName","sourceDocumentId","mappingStatus"],"additionalProperties":false}}},"required":["citations"],"additionalProperties":false}}}},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/cases/{id}/citations/{citationId}/source":{"post":{"tags":["Citations"],"summary":"Attach + map a cited opinion to a citation","description":"The cited opinion as exactly one of: a `source` file part, a `source_text` pasted-text field, or a `source_url` URL.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"citationId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"source":{"description":"the cited opinion as a file part","type":"string"},"source_text":{"description":"the cited opinion as pasted text","type":"string"},"source_url":{"description":"the cited opinion as a URL to fetch","type":"string"}}}}}},"responses":{"200":{"description":"Mapped","content":{"application/json":{"schema":{"type":"object","properties":{"mapped":{"type":"boolean"}},"required":["mapped"],"additionalProperties":false}}}},"400":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"413":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"415":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}},"422":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/cases/{id}/verify":{"post":{"tags":["Verification"],"summary":"Trigger verification for mapped citations","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"202":{"description":"Verification enqueued","content":{"application/json":{"schema":{"type":"object","properties":{"mapped":{"type":"number"},"unmapped":{"type":"number"}},"required":["mapped","unmapped"],"additionalProperties":false}}}},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/cases/{id}/events":{"get":{"tags":["Verification"],"summary":"SSE stream of case stage transitions and per-citation results","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"text/event-stream"},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}},"/v1/sources/{id}/display":{"get":{"tags":["Sources"],"summary":"Short-lived presigned URL for a source display artifact","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"Presigned URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresIn":{"type":"number"}},"required":["url","expiresIn"],"additionalProperties":false}}}},"404":{"description":"RFC 7807 problem","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","enum":["VALIDATION","UNSUPPORTED_MEDIA","PAYLOAD_TOO_LARGE","DOCUMENT_TOO_LARGE","UNSAFE_URL","URL_FETCH_FAILED","PROXY_FETCH_FAILED","SCRAPINGBEE_FETCH_FAILED","WEB_BUDGET_EXCEEDED","PROVIDER_ERROR","PROVIDER_TIMEOUT","PROVIDER_OUT_OF_CREDITS","NOT_FOUND","RATE_LIMITED","INTERNAL"]},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"}},"required":["type","title","status","code"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}}}