{"openapi":"3.1.0","info":{"title":"Court Rules API","description":"Filing rules for federal and state courts and their judges, each with the court's own wording and a link to its source, plus court holidays, official rulebooks, and compliance checks for filings in the Eastern District of New York","version":"0.1.0"},"servers":[{"url":"https://api.courtrules.app","description":"Production"},{"url":"http://localhost:3001","description":"Local development"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key provided in the console dashboard (e.g. crm_prod_...)"}},"schemas":{"CourtHoliday":{"type":"object","properties":{"district_id":{"type":"string","description":"Court identifier","example":"edny"},"calendar_year":{"type":"integer","description":"Calendar year","example":2026},"holiday_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Holiday date in YYYY-MM-DD format","example":"2026-01-01"},"holiday_name":{"type":"string","description":"Court holiday or closure name","example":"New Year's Day"},"source_url":{"type":"string","format":"uri","description":"Official source URL for the holiday schedule","example":"https://www.nyed.uscourts.gov/holiday-schedule"},"last_checked_at":{"type":"string","description":"Timestamp when Court Rules last checked the source","example":"2026-05-13T12:00:00.000Z"}},"required":["district_id","calendar_year","holiday_date","holiday_name","source_url","last_checked_at"]},"CourtHolidaysResponse":{"type":"object","properties":{"holidays":{"type":"array","items":{"$ref":"#/components/schemas/CourtHoliday"},"description":"Court holidays and closure dates"},"meta":{"type":"object","properties":{"total":{"type":"integer","description":"Number of holidays returned","example":12},"district_id":{"type":"string","description":"District filter applied to the response","example":"edny"},"year":{"type":"integer","description":"Calendar year filter applied to the response","example":2026},"date_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Lower date bound applied to the response","example":"2026-01-01"},"date_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Upper date bound applied to the response","example":"2026-01-01"},"limit":{"type":"integer","description":"Maximum number of holidays requested","example":100}},"required":["total","limit"]}},"required":["holidays","meta"]},"RateLimitError":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"suggestion":{"type":"string","example":"Wait 30 seconds before retrying. See rate limit headers for usage details."},"docs_url":{"type":"string","example":"https://docs.courtrules.app/api-reference/rate-limits"},"contact":{"type":"string","example":"api@courtrules.app"}},"required":["error","suggestion","docs_url","contact"]},"CourtInfo":{"type":"object","properties":{"district_id":{"type":"string","description":"Short court identifier","example":"edny"},"name":{"type":"string","description":"Full court name","example":"Eastern District of New York"},"circuit":{"type":"string","nullable":true,"description":"Federal circuit. Null for state and local courts.","example":"2nd Circuit"},"state":{"type":"string","nullable":true,"description":"State or territory. Null for courts not tied to one state.","example":"New York"},"status":{"type":"string","enum":["live","coming_soon"],"description":"live = rules are available for this court, coming_soon = the court is mapped but has no rules yet"},"judges_mapped":{"type":"integer","description":"Number of current judges and courtrooms on the court's roster"},"judges_profiled":{"type":"integer","description":"Number of judges with compliance profiles used by /check. Present only for courts with compliance profiles."}},"required":["district_id","name","circuit","state","status","judges_mapped"]},"ExtractedRuleLogicType":{"type":"string","enum":["CourtesyCopyRule","PageWordLimitRule","PreMotionConferenceRule","AdjournmentRequirementRule","BundlingRule","FormatConstraint","DocumentRequirement","CommunicationRule","SealingProcedure","ElectronicFilingRule","FilingTimingRule","ServiceRule","FilingFeeRule","JuniorLawyerIncentive"],"description":"Structured filing rule type"},"ExtractedRuleWorkflowPhase":{"type":"string","enum":["FILING","CASE_INITIATION","MOTION_PRACTICE","TRIAL_PREP","POST_JUDGMENT"],"description":"Litigation workflow phase"},"ExtractedRuleCaseType":{"type":"string","enum":["civil","criminal","habeas","prisoner","social_security","bankruptcy","pro_se","general","family","probate","small_claims","unlawful_detainer","traffic","juvenile","mental_health","limited_civil","unlimited_civil","civil_limited","civil_unlimited","complex_civil","chancery","law","municipal","domestic_relations","domestic_violence","county","commercial","foreclosure"],"description":"Case type named by the source rule"},"ExtractedRuleCitationSource":{"type":"object","properties":{"page":{"type":"number","description":"Source page when available"},"section":{"type":"string","description":"Source section when available"},"paragraph":{"type":"string","description":"Source paragraph when available"},"sentence":{"type":"string","description":"Source sentence when available"}}},"ExtractedRuleContent":{"type":"object","properties":{"source_text":{"type":"string","description":"Verbatim source text supporting the extracted rule"},"summary":{"type":"string","description":"Plain-English summary of the rule"},"document_type":{"type":"string","description":"Document type named by the source rule"},"case_type_applicability":{"type":"array","items":{"$ref":"#/components/schemas/ExtractedRuleCaseType"},"description":"Case types explicitly named by the source rule"},"rule_tags":{"type":"array","items":{"type":"string"},"description":"Short filing workflow tags"},"workflow_phase":{"$ref":"#/components/schemas/ExtractedRuleWorkflowPhase"},"visual_severity":{"type":"string","enum":["CRITICAL","WARNING","INFO"],"description":"Operational importance of the rule"},"structured_data":{"type":"object","properties":{"logic_type":{"$ref":"#/components/schemas/ExtractedRuleLogicType"}},"required":["logic_type"],"description":"Structured rule payload. Shape depends on logic_type. Omitted fields are not stated in the source quote; they do not imply defaults or negative values."},"citation_source":{"$ref":"#/components/schemas/ExtractedRuleCitationSource"}},"required":["source_text","summary","rule_tags","workflow_phase","visual_severity","structured_data"]},"AiUseTopicFields":{"type":"object","properties":{"req_disclose":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule asks the filer to tell the court or the other parties that AI was used, for example in a disclosure, a notice, a label or a statement. A duty that applies only if the court asks does not count."},"req_certify_review":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule asks the filer to certify that a person reviewed or checked the content that AI generated."},"req_certify_citations":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule asks the filer to certify that the citations or legal authorities were checked and are real."},"req_certify_nonuse":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule asks for a statement about AI from every filer, including a filer who did not use AI, such as a certificate that says whether AI was used. A certificate owed only when AI was used does not count."},"req_name_tool":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule asks the filer to name the AI tool that was used, in the filing or in a certificate. A duty to name it only if the court asks does not count."},"req_mark_parts":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule asks the filer to identify which parts of a filing AI drafted. A duty to keep records, or to identify the parts only if the court asks, does not count."},"req_confidentiality":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule asks the filer to certify that confidential, privileged or sealed information was kept out of an AI tool, or forbids putting it in."},"req_not_allowed":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule forbids a use of AI, such as drafting filings, creating or altering evidence, or recording or transcribing proceedings."},"no_requirement":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule adds no duty about AI: it says disclosure is not required, or it only reminds filers of duties they already have, such as checking their own work."},"court_own_use":{"type":"string","enum":["yes","no","unknown"],"description":"Whether the rule is about how the court, its judges or its staff may use AI, such as an internal policy. It asks nothing of filers."},"applies_when":{"type":"string","enum":["only_if_ai_used","every_filing","not_stated","unknown"],"description":"When the filer owes the disclosure, certificate or statement. only_if_ai_used: only when AI was used to prepare the filing. every_filing: on every filing, whether or not AI was used. not_stated: the rule does not say, or asks for no statement."},"stage":{"type":"string","enum":["any_filing","pleadings_motions_briefs","discovery","evidence_trial","expert","proposed_orders","hearings_recordings","not_stated","unknown"],"description":"Which documents or stage of the case the rule covers. any_filing: filings in general. pleadings_motions_briefs: pleadings, motions, briefs and memoranda. discovery: discovery requests, responses and document review. evidence_trial: exhibits and other evidence at trial. expert: expert reports, opinions and testimony. proposed_orders: proposed orders and judgments. hearings_recordings: hearings, depositions, recordings, transcripts and note-taking tools. not_stated: the rule does not say, or is not about a document or stage."},"binds":{"type":"string","enum":["lawyers","self_represented","lawyers_and_parties","experts","not_stated","unknown"],"description":"Who must follow the rule. lawyers: lawyers only. self_represented: parties without a lawyer only. lawyers_and_parties: lawyers and parties without a lawyer. experts: expert witnesses. not_stated: the rule does not say."},"how":{"type":"string","enum":["separate_document","in_the_filing","signature_block","by_signing","court_form","not_stated","unknown"],"description":"How the filer complies. separate_document: a separate certificate, declaration, affidavit, notice or letter. in_the_filing: a statement in the filing itself. signature_block: a statement in or just above the signature block. by_signing: signing or filing the paper is itself the certification. court_form: a form the court provides. not_stated: the rule does not say, or asks for no statement."},"exempt":{"type":"string","enum":["research_tools","basic_tools","research_and_basic","none_stated","unknown"],"description":"Which tools the rule exempts. research_tools: legal research services and search engines. basic_tools: spelling, grammar and other tools that do not generate text. research_and_basic: both. none_stated: the rule names no exemption."},"consequence":{"type":"string","enum":["struck","sanctions","none_stated","unknown"],"description":"What the rule says happens when a filer does not comply. struck: the filing may be struck, rejected or not considered. sanctions: sanctions, contempt, fees or discipline, including a referral to the bar. none_stated: the rule names no consequence."}},"required":["req_disclose","req_certify_review","req_certify_citations","req_certify_nonuse","req_name_tool","req_mark_parts","req_confidentiality","req_not_allowed","no_requirement","court_own_use","applies_when","stage","binds","how","exempt","consequence"],"additionalProperties":false,"description":"The answers about the rule. A yes or no field says whether the rule says the thing described. A field that lists values holds one of them. In every field, unknown means the answer was not confirmed: read the court's document."},"AiUseTopic":{"type":"object","properties":{"label":{"type":"string","enum":["disclosure","certification","verification","prohibition","evidence","other_ai"],"description":"What the rule is mainly about. Use kind and fields, not the label, to decide what a rule asks of a filer. disclosure: The rule asks the filer to say that AI was used, or to say whether it was. certification: The rule asks for a signed certificate that a person reviewed or verified content that AI generated. verification: The rule holds the filer responsible for checking AI-generated text, citations or quotations, and asks for no disclosure or certificate. prohibition: The rule bans or limits a use of AI. evidence: The rule covers AI in evidence or in proceedings, such as exhibits made or changed by AI, experts who rely on AI, or AI transcription of hearings. other_ai: The rule is mainly about AI but fits none of the other labels, such as a general AI policy or permission to use AI."},"kind":{"type":"string","enum":["court_internal","reminder_only","requirement","other"],"description":"What the rule is. A rule has one kind. When more than one could apply, the first in this order wins: court_internal, reminder_only, requirement, other. court_internal: A court's policy for its own judges and staff. It asks nothing of filers. reminder_only: A reminder that adds no duty. The rule restates duties filers already have, or says no disclosure is needed. requirement: An order that asks something of the filer, such as a disclosure, a certificate or a ban on a use of AI. other: A rule that mentions AI where no requirement was confirmed."},"fields":{"$ref":"#/components/schemas/AiUseTopicFields"}},"required":["label","kind","fields"],"description":"Rules in which a court or judge says something about artificial intelligence (AI) in filings and proceedings, whether or not they ask something of the filer."},"ExtractedRuleTopics":{"type":"object","properties":{"ai_use":{"$ref":"#/components/schemas/AiUseTopic"}},"additionalProperties":false,"description":"What the rule is about, keyed by topic. Absent when the rule has no topic. A rule shows a topic once the document it comes from was read for that topic."},"ExtractedRule":{"type":"object","properties":{"rule_id":{"type":"string","format":"uuid","description":"Stable identifier of the rule"},"district_id":{"type":"string","description":"Court identifier","example":"il-cook-circuit"},"judge_slug":{"type":"string","description":"Court, judge, calendar, department, or courtroom slug. Court-level rules use \"court\".","example":"il-cook-reilly-eve-m"},"source_url":{"type":"string","format":"uri","description":"Official source URL for this rule"},"source_url_key":{"type":"string","description":"Stable key for the source address"},"document_version_id":{"type":"string","format":"uuid","description":"The version of the source document the rule was read from"},"doc_kind":{"type":"string","nullable":true,"description":"Classified document kind, such as local rules or standing order"},"logic_type":{"$ref":"#/components/schemas/ExtractedRuleLogicType"},"workflow_phase":{"$ref":"#/components/schemas/ExtractedRuleWorkflowPhase"},"content":{"$ref":"#/components/schemas/ExtractedRuleContent"},"topics":{"$ref":"#/components/schemas/ExtractedRuleTopics"}},"required":["rule_id","district_id","judge_slug","source_url","source_url_key","document_version_id","doc_kind","logic_type","workflow_phase","content"]},"ExtractedRulesResponse":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/ExtractedRule"}},"meta":{"type":"object","properties":{"total":{"type":"integer","description":"Number of rules matching the filters, across all pages","example":253},"returned":{"type":"integer","description":"Number of rules in this page","example":100},"limit":{"type":"integer","description":"Maximum number of rules requested per page","example":100},"offset":{"type":"integer","description":"Number of matching rules skipped","example":0},"next_offset":{"type":"integer","nullable":true,"description":"Offset of the next page, or null when this is the last page","example":100},"district_id":{"type":"string","description":"Court filter applied to the response","example":"il-cook-circuit"},"judge_slug":{"type":"string","description":"Judge or court unit filter applied to the response","example":"il-cook-reilly-eve-m"},"include_court_rules":{"type":"boolean","description":"Whether court-level rules with judge_slug \"court\" were included","example":true},"logic_type":{"$ref":"#/components/schemas/ExtractedRuleLogicType"},"workflow_phase":{"$ref":"#/components/schemas/ExtractedRuleWorkflowPhase"},"case_type":{"$ref":"#/components/schemas/ExtractedRuleCaseType"},"q":{"type":"string","description":"Full-text filter applied to summary and source text"},"topic":{"type":"string","enum":["ai_use"],"description":"Topic filter applied to the response","example":"ai_use"}},"required":["total","returned","limit","offset","next_offset","include_court_rules"]}},"required":["rules","meta"]},"RulebookRuleReference":{"type":"object","properties":{"rulebook_id":{"type":"string","description":"The rulebook","example":"california-rules-of-court"},"number":{"type":"string","description":"Number of the rule the requirement was read from","example":"3.1113"},"citation":{"type":"string","description":"How to cite that rule","example":"Cal. Rules of Court, rule 3.1113"},"revision_id":{"type":"string","format":"uuid","description":"The version of the rule the requirement was read from. It equals the rule's revision_id while that version is current."},"site_url":{"type":"string","format":"uri","description":"The rule's page on courtrules.app","example":"https://www.courtrules.app/rules/california-rules-of-court/3.1113"}},"required":["rulebook_id","number","citation","revision_id","site_url"],"description":"The rulebook rule this was read from"},"RulebookExtractedRule":{"type":"object","properties":{"rule_id":{"type":"string","format":"uuid","description":"Stable identifier of this extracted rule"},"logic_type":{"$ref":"#/components/schemas/ExtractedRuleLogicType"},"workflow_phase":{"$ref":"#/components/schemas/ExtractedRuleWorkflowPhase"},"content":{"$ref":"#/components/schemas/ExtractedRuleContent"},"topics":{"$ref":"#/components/schemas/ExtractedRuleTopics"},"rulebook_rule":{"$ref":"#/components/schemas/RulebookRuleReference"}},"required":["rule_id","logic_type","workflow_phase","content","rulebook_rule"]},"RulebookExtractedRulesResponse":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/RulebookExtractedRule"}},"meta":{"type":"object","properties":{"total":{"type":"integer","description":"Number of rules matching the filters, across all pages","example":253},"returned":{"type":"integer","description":"Number of rules in this page","example":100},"limit":{"type":"integer","description":"Maximum number of rules requested per page","example":100},"offset":{"type":"integer","description":"Number of matching rules skipped","example":0},"next_offset":{"type":"integer","nullable":true,"description":"Offset of the next page, or null when this is the last page","example":100},"rulebook_id":{"type":"string","description":"Rulebook filter applied to the response","example":"california-rules-of-court"},"rule_number":{"type":"string","description":"Rule number filter applied to the response","example":"3.1113"},"logic_type":{"$ref":"#/components/schemas/ExtractedRuleLogicType"},"workflow_phase":{"$ref":"#/components/schemas/ExtractedRuleWorkflowPhase"},"case_type":{"$ref":"#/components/schemas/ExtractedRuleCaseType"},"q":{"type":"string","description":"Full-text filter applied to summary and source text"}},"required":["total","returned","limit","offset","next_offset","rulebook_id"]}},"required":["rules","meta"]},"JudgeSummary":{"type":"object","properties":{"slug":{"type":"string","description":"URL-safe judge identifier","example":"nicholas-g-garaufis"},"name":{"type":"string","description":"Full display name","example":"Nicholas G. Garaufis"}},"required":["slug","name"]},"DisplayRule":{"type":"object","properties":{"rule_key":{"type":"string","description":"Unique rule identifier","example":"FormatConstraint:caption"},"citation":{"type":"string","description":"Formal citation to the source rule","example":"FRCP 10(a)"},"label":{"type":"string","description":"Human-readable source name","example":"Federal Rules of Civil Procedure"},"summary":{"type":"string","description":"Plain-language description of the requirement","example":"Every pleading must include a caption with court name, case title, docket number, and document designation."},"severity":{"type":"string","enum":["CRITICAL","WARNING","INFO"],"description":"How strictly the rule is enforced"},"url":{"type":"string","description":"Link to the full rule text"},"applies_to":{"type":"array","items":{"type":"string"},"description":"Document scopes this rule applies to"}},"required":["rule_key","citation","label","summary","severity"]},"StandingOrderRule":{"type":"object","properties":{"category":{"type":"string","description":"Rule category from the judge's standing order","example":"PAGE_LIMIT"},"summary":{"type":"string","description":"Plain-language description of the requirement","example":"Support briefs limited to 25 pages"},"source":{"type":"string","description":"Citation to the standing order section","example":"Garaufis SO §IV.B"}},"required":["category","summary","source"]},"ComplianceRuleSet":{"type":"object","properties":{"judge":{"$ref":"#/components/schemas/JudgeSummary"},"rules":{"type":"object","properties":{"frcp":{"type":"array","items":{"$ref":"#/components/schemas/DisplayRule"}},"local_rules":{"type":"array","items":{"$ref":"#/components/schemas/DisplayRule"}},"standing_order":{"type":"array","items":{"$ref":"#/components/schemas/StandingOrderRule"}}},"required":["frcp","local_rules"]},"meta":{"type":"object","properties":{"total_rules":{"type":"integer"}},"required":["total_rules"]}},"required":["judge","rules","meta"]},"JudgeExtractedRules":{"type":"object","properties":{"judge":{"type":"object","properties":{"slug":{"type":"string","example":"judge-teresa-a-beaudet"},"name":{"type":"string","example":"Teresa A. Beaudet"},"status":{"type":"string","nullable":true,"enum":["active","coming_soon","inactive","retired"],"description":"Roster status. inactive or retired means the judge is no longer on the court roster, so there are no current rules. Null for judge_slug \"court\"."}},"required":["slug","name","status"]},"district_id":{"type":"string","example":"ca-los-angeles-superior"},"rules":{"type":"object","properties":{"court":{"type":"array","items":{"$ref":"#/components/schemas/ExtractedRule"},"description":"Court-wide rules that apply in every courtroom of this court"},"judge":{"type":"array","items":{"$ref":"#/components/schemas/ExtractedRule"},"description":"The judge's own rules: standing orders, individual practices, courtroom rules"}},"required":["court","judge"]},"meta":{"type":"object","properties":{"total_rules":{"type":"integer","example":253},"court_rules":{"type":"integer","example":188},"judge_rules":{"type":"integer","example":65}},"required":["total_rules","court_rules","judge_rules"]}},"required":["judge","district_id","rules","meta"]},"DocumentScope":{"type":"string","enum":["brief_support","brief_reply","brief_opposition","reconsideration_support","reconsideration_reply","letter","discovery_letter","proposed_findings","affidavit","settlement_statement","objection_response","rule_56_1_statement"],"description":"Filter rules relevant to this document type"},"MotionType":{"type":"string","enum":["Rule_12","Rule_56","Rule_50","Rule_59","Rule_60","Daubert","TRO","preliminary_injunction","reconsideration","discovery","motion_to_amend","motion_in_limine","general"],"description":"Filter rules relevant to this motion type"},"JudgeProfile":{"type":"object","properties":{"judge_slug":{"type":"string"},"profile":{"type":"object","additionalProperties":{"nullable":true}},"baseline":{"type":"boolean","description":"True when judge has no individual standing order"}},"required":["judge_slug","profile","baseline"]},"LintResult":{"type":"object","properties":{"severity":{"type":"string","enum":["CRITICAL","WARNING","INFO"],"description":"Impact level of this check result"},"category":{"type":"string","description":"Check category (e.g. PAGE_LIMIT, WORD_LIMIT, CAPTION, SIGNATURE, PMC, FORMAT)","example":"PAGE_LIMIT"},"message":{"type":"string","description":"Human-readable result explaining the pass, fail, or action needed","example":"22pp exceeds 25pp limit"},"source":{"type":"string","description":"Rule citation this check is based on","example":"Garaufis SO §IV.B"},"status":{"type":"string","enum":["FAIL","PASS","ACTION_REQUIRED"],"description":"Whether the document passed this check"}},"required":["severity","category","message","source","status"]},"CheckRequest":{"type":"object","properties":{"judge_slug":{"type":"string","description":"URL-safe judge identifier","example":"nicholas-g-garaufis"},"district_id":{"type":"string","description":"Federal district identifier","example":"edny"},"document_scope":{"allOf":[{"$ref":"#/components/schemas/DocumentScope"},{"description":"Type of document being filed"}]},"motion_type":{"allOf":[{"$ref":"#/components/schemas/MotionType"},{"description":"Omit if the filing is not motion-related"}]},"is_pro_se":{"type":"boolean","description":"Whether the filing party is self-represented"},"pmc_completed":{"type":"boolean","description":"Whether a pre-motion conference was held or waived for this motion"},"opposing_party_pro_se":{"type":"boolean","description":"Whether the opposing party is self-represented (affects Rule 56 notice requirements)"},"filing_role":{"type":"string","enum":["movant","opponent","reply"],"description":"Filer's role in the motion sequence"},"document":{"type":"object","properties":{"page_count":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Number of body pages, excluding the cover, tables of contents and authorities, signature page and certificates"},"word_count":{"type":"integer","minimum":0,"description":"Total word count of the filed document"},"caption":{"type":"object","properties":{"present":{"type":"boolean","description":"Whether the document includes a caption block"},"has_court_name":{"type":"boolean","description":"Caption includes full court name"},"has_case_title":{"type":"boolean","description":"Caption includes case title (parties)"},"has_docket_number":{"type":"boolean","description":"Caption includes docket/case number"},"has_document_designation":{"type":"boolean","description":"Caption includes document type designation"}},"required":["present","has_court_name","has_case_title","has_docket_number","has_document_designation"],"description":"Caption details, for checks under Federal Rule of Civil Procedure 10(a)"},"signature_block":{"type":"object","properties":{"present":{"type":"boolean","description":"Whether the document includes a signature block"},"has_attorney_name":{"type":"boolean","description":"Signature block includes attorney name"},"has_firm_name":{"type":"boolean","description":"Signature block includes firm name"},"has_address":{"type":"boolean","description":"Signature block includes mailing address"},"has_email":{"type":"boolean","description":"Signature block includes email address"},"has_phone":{"type":"boolean","description":"Signature block includes phone number"},"is_electronic_signature":{"type":"boolean","description":"Signature is /s/ electronic format"}},"required":["present","has_attorney_name","has_firm_name","has_address","has_email","has_phone","is_electronic_signature"],"description":"Signature block details, for checks under Federal Rule of Civil Procedure 11"},"sections":{"type":"object","properties":{"has_toc":{"type":"boolean","description":"Document includes a table of contents"},"has_toa":{"type":"boolean","description":"Document includes a table of authorities"},"has_certificate_of_compliance":{"type":"boolean","description":"Includes word count certificate of compliance"},"certificate_word_count":{"type":"number","description":"Word count stated in the certificate"},"has_certificate_of_service":{"type":"boolean","description":"Includes certificate of service"},"has_numbered_paragraphs":{"type":"boolean","description":"Uses numbered paragraphs"},"has_56_1_statement":{"type":"boolean","description":"Includes Rule 56.1 statement of material facts"},"has_56_1_counterstatement":{"type":"boolean","description":"Includes Rule 56.1 counterstatement"},"has_proposed_amended_pleading":{"type":"boolean","description":"Includes proposed amended pleading as exhibit"},"has_verbatim_discovery_text":{"type":"boolean","description":"Includes verbatim text of disputed discovery"},"has_conferral_certification":{"type":"boolean","description":"Includes good-faith conferral certification"},"has_notice_of_motion":{"type":"boolean","description":"Includes notice of motion"},"has_memorandum_of_law":{"type":"boolean","description":"Includes memorandum of law"},"has_supporting_affidavits":{"type":"boolean","description":"Includes supporting declarations or affidavits"},"has_pro_se_sj_notice":{"type":"boolean","description":"Includes Rand/Local Rule 56.2 notice to pro se opposing party"}},"required":["has_toc","has_toa","has_certificate_of_compliance","has_certificate_of_service","has_numbered_paragraphs","has_56_1_statement","has_56_1_counterstatement","has_proposed_amended_pleading","has_verbatim_discovery_text","has_conferral_certification","has_notice_of_motion","has_memorandum_of_law","has_supporting_affidavits","has_pro_se_sj_notice"],"description":"Required and optional document sections"},"format":{"type":"object","properties":{"primary_font_size_pt":{"type":"number","description":"Body text font size in points"},"footnote_font_size_pt":{"type":"number","description":"Footnote font size in points"},"margin_inches":{"type":"number","description":"Page margin width in inches"},"line_spacing":{"type":"string","enum":["single","1.5","double"],"description":"Line spacing setting"}},"required":["primary_font_size_pt","margin_inches","line_spacing"],"description":"Document formatting details"},"privacy":{"type":"object","properties":{"contains_full_ssn":{"type":"boolean","description":"Document contains an unredacted Social Security number"},"contains_full_dob":{"type":"boolean","description":"Document contains a full date of birth"},"contains_minor_full_name":{"type":"boolean","description":"Document contains an unredacted minor's name"},"contains_full_financial_account":{"type":"boolean","description":"Document contains a full financial account number"}},"required":["contains_full_ssn","contains_full_dob","contains_minor_full_name","contains_full_financial_account"],"description":"Unredacted personal identifiers, for checks under Federal Rule of Civil Procedure 5.2"}},"required":["page_count","word_count"],"description":"Measured properties of the draft. Within this object, only page_count and word_count are required. The caption, signature_block, sections, format, and privacy blocks are optional, and each block must be filled in completely or left out entirely. When a block is left out, its checks are skipped."}},"required":["judge_slug","district_id","document_scope","is_pro_se","pmc_completed","opposing_party_pro_se","filing_role","document"]},"ClassifyResponse":{"type":"object","properties":{"classification":{"type":"object","properties":{"document_scope":{"allOf":[{"$ref":"#/components/schemas/DocumentScope"},{"description":"Type of filing detected. Omitted when the document is not a supported federal court filing."}]},"motion_type":{"allOf":[{"$ref":"#/components/schemas/MotionType"},{"description":"Federal Rule governing the motion"}]},"confidence":{"type":"string","enum":["high","medium","low"],"description":"Confidence in the classification"},"supported":{"type":"boolean","description":"Whether the document is a supported federal court filing. False for state court forms, templates, or non-legal documents."},"reasoning":{"type":"string","description":"Brief explanation of how the document was classified"}},"required":["confidence","supported","reasoning"],"description":"Automated document classification"},"document":{"type":"object","properties":{"page_count":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Number of body pages, excluding the cover, tables of contents and authorities, signature page and certificates"},"word_count":{"type":"integer","minimum":0,"description":"Total word count of the filed document"},"caption":{"type":"object","properties":{"present":{"type":"boolean","description":"Whether the document includes a caption block"},"has_court_name":{"type":"boolean","description":"Caption includes full court name"},"has_case_title":{"type":"boolean","description":"Caption includes case title (parties)"},"has_docket_number":{"type":"boolean","description":"Caption includes docket/case number"},"has_document_designation":{"type":"boolean","description":"Caption includes document type designation"}},"required":["present","has_court_name","has_case_title","has_docket_number","has_document_designation"],"description":"Caption details, for checks under Federal Rule of Civil Procedure 10(a)"},"signature_block":{"type":"object","properties":{"present":{"type":"boolean","description":"Whether the document includes a signature block"},"has_attorney_name":{"type":"boolean","description":"Signature block includes attorney name"},"has_firm_name":{"type":"boolean","description":"Signature block includes firm name"},"has_address":{"type":"boolean","description":"Signature block includes mailing address"},"has_email":{"type":"boolean","description":"Signature block includes email address"},"has_phone":{"type":"boolean","description":"Signature block includes phone number"},"is_electronic_signature":{"type":"boolean","description":"Signature is /s/ electronic format"}},"required":["present","has_attorney_name","has_firm_name","has_address","has_email","has_phone","is_electronic_signature"],"description":"Signature block details, for checks under Federal Rule of Civil Procedure 11"},"sections":{"type":"object","properties":{"has_toc":{"type":"boolean","description":"Document includes a table of contents"},"has_toa":{"type":"boolean","description":"Document includes a table of authorities"},"has_certificate_of_compliance":{"type":"boolean","description":"Includes word count certificate of compliance"},"certificate_word_count":{"type":"number","description":"Word count stated in the certificate"},"has_certificate_of_service":{"type":"boolean","description":"Includes certificate of service"},"has_numbered_paragraphs":{"type":"boolean","description":"Uses numbered paragraphs"},"has_56_1_statement":{"type":"boolean","description":"Includes Rule 56.1 statement of material facts"},"has_56_1_counterstatement":{"type":"boolean","description":"Includes Rule 56.1 counterstatement"},"has_proposed_amended_pleading":{"type":"boolean","description":"Includes proposed amended pleading as exhibit"},"has_verbatim_discovery_text":{"type":"boolean","description":"Includes verbatim text of disputed discovery"},"has_conferral_certification":{"type":"boolean","description":"Includes good-faith conferral certification"},"has_notice_of_motion":{"type":"boolean","description":"Includes notice of motion"},"has_memorandum_of_law":{"type":"boolean","description":"Includes memorandum of law"},"has_supporting_affidavits":{"type":"boolean","description":"Includes supporting declarations or affidavits"},"has_pro_se_sj_notice":{"type":"boolean","description":"Includes Rand/Local Rule 56.2 notice to pro se opposing party"}},"required":["has_toc","has_toa","has_certificate_of_compliance","has_certificate_of_service","has_numbered_paragraphs","has_56_1_statement","has_56_1_counterstatement","has_proposed_amended_pleading","has_verbatim_discovery_text","has_conferral_certification","has_notice_of_motion","has_memorandum_of_law","has_supporting_affidavits","has_pro_se_sj_notice"],"description":"Required and optional document sections"},"format":{"type":"object","properties":{"primary_font_size_pt":{"type":"number","description":"Body text font size in points"},"footnote_font_size_pt":{"type":"number","description":"Footnote font size in points"},"margin_inches":{"type":"number","description":"Page margin width in inches"},"line_spacing":{"type":"string","enum":["single","1.5","double"],"description":"Line spacing setting"}},"required":["primary_font_size_pt","margin_inches","line_spacing"],"description":"Document formatting details"},"privacy":{"type":"object","properties":{"contains_full_ssn":{"type":"boolean","description":"Document contains an unredacted Social Security number"},"contains_full_dob":{"type":"boolean","description":"Document contains a full date of birth"},"contains_minor_full_name":{"type":"boolean","description":"Document contains an unredacted minor's name"},"contains_full_financial_account":{"type":"boolean","description":"Document contains a full financial account number"}},"required":["contains_full_ssn","contains_full_dob","contains_minor_full_name","contains_full_financial_account"],"description":"Unredacted personal identifiers, for checks under Federal Rule of Civil Procedure 5.2"}},"required":["page_count","word_count"],"description":"Extracted document metadata"},"check_request":{"type":"object","properties":{"judge_slug":{"type":"string","description":"URL-safe judge identifier"},"district_id":{"type":"string","description":"Federal district identifier"},"document_scope":{"allOf":[{"$ref":"#/components/schemas/DocumentScope"},{"description":"Type of document being filed"}]},"motion_type":{"allOf":[{"$ref":"#/components/schemas/MotionType"},{"description":"Federal Rule governing the motion"}]},"document":{"type":"object","properties":{"page_count":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Number of body pages, excluding the cover, tables of contents and authorities, signature page and certificates"},"word_count":{"type":"integer","minimum":0,"description":"Total word count of the filed document"},"caption":{"type":"object","properties":{"present":{"type":"boolean","description":"Whether the document includes a caption block"},"has_court_name":{"type":"boolean","description":"Caption includes full court name"},"has_case_title":{"type":"boolean","description":"Caption includes case title (parties)"},"has_docket_number":{"type":"boolean","description":"Caption includes docket/case number"},"has_document_designation":{"type":"boolean","description":"Caption includes document type designation"}},"required":["present","has_court_name","has_case_title","has_docket_number","has_document_designation"],"description":"Caption details, for checks under Federal Rule of Civil Procedure 10(a)"},"signature_block":{"type":"object","properties":{"present":{"type":"boolean","description":"Whether the document includes a signature block"},"has_attorney_name":{"type":"boolean","description":"Signature block includes attorney name"},"has_firm_name":{"type":"boolean","description":"Signature block includes firm name"},"has_address":{"type":"boolean","description":"Signature block includes mailing address"},"has_email":{"type":"boolean","description":"Signature block includes email address"},"has_phone":{"type":"boolean","description":"Signature block includes phone number"},"is_electronic_signature":{"type":"boolean","description":"Signature is /s/ electronic format"}},"required":["present","has_attorney_name","has_firm_name","has_address","has_email","has_phone","is_electronic_signature"],"description":"Signature block details, for checks under Federal Rule of Civil Procedure 11"},"sections":{"type":"object","properties":{"has_toc":{"type":"boolean","description":"Document includes a table of contents"},"has_toa":{"type":"boolean","description":"Document includes a table of authorities"},"has_certificate_of_compliance":{"type":"boolean","description":"Includes word count certificate of compliance"},"certificate_word_count":{"type":"number","description":"Word count stated in the certificate"},"has_certificate_of_service":{"type":"boolean","description":"Includes certificate of service"},"has_numbered_paragraphs":{"type":"boolean","description":"Uses numbered paragraphs"},"has_56_1_statement":{"type":"boolean","description":"Includes Rule 56.1 statement of material facts"},"has_56_1_counterstatement":{"type":"boolean","description":"Includes Rule 56.1 counterstatement"},"has_proposed_amended_pleading":{"type":"boolean","description":"Includes proposed amended pleading as exhibit"},"has_verbatim_discovery_text":{"type":"boolean","description":"Includes verbatim text of disputed discovery"},"has_conferral_certification":{"type":"boolean","description":"Includes good-faith conferral certification"},"has_notice_of_motion":{"type":"boolean","description":"Includes notice of motion"},"has_memorandum_of_law":{"type":"boolean","description":"Includes memorandum of law"},"has_supporting_affidavits":{"type":"boolean","description":"Includes supporting declarations or affidavits"},"has_pro_se_sj_notice":{"type":"boolean","description":"Includes Rand/Local Rule 56.2 notice to pro se opposing party"}},"required":["has_toc","has_toa","has_certificate_of_compliance","has_certificate_of_service","has_numbered_paragraphs","has_56_1_statement","has_56_1_counterstatement","has_proposed_amended_pleading","has_verbatim_discovery_text","has_conferral_certification","has_notice_of_motion","has_memorandum_of_law","has_supporting_affidavits","has_pro_se_sj_notice"],"description":"Required and optional document sections"},"format":{"type":"object","properties":{"primary_font_size_pt":{"type":"number","description":"Body text font size in points"},"footnote_font_size_pt":{"type":"number","description":"Footnote font size in points"},"margin_inches":{"type":"number","description":"Page margin width in inches"},"line_spacing":{"type":"string","enum":["single","1.5","double"],"description":"Line spacing setting"}},"required":["primary_font_size_pt","margin_inches","line_spacing"],"description":"Document formatting details"},"privacy":{"type":"object","properties":{"contains_full_ssn":{"type":"boolean","description":"Document contains an unredacted Social Security number"},"contains_full_dob":{"type":"boolean","description":"Document contains a full date of birth"},"contains_minor_full_name":{"type":"boolean","description":"Document contains an unredacted minor's name"},"contains_full_financial_account":{"type":"boolean","description":"Document contains a full financial account number"}},"required":["contains_full_ssn","contains_full_dob","contains_minor_full_name","contains_full_financial_account"],"description":"Unredacted personal identifiers, for checks under Federal Rule of Civil Procedure 5.2"}},"required":["page_count","word_count"],"description":"Measured properties of the draft. Within this object, only page_count and word_count are required. The caption, signature_block, sections, format, and privacy blocks are optional, and each block must be filled in completely or left out entirely. When a block is left out, its checks are skipped."}},"required":["judge_slug","district_id","document_scope","document"],"description":"Partial request body for POST /api/v1/check. Present only when supported is true. Add is_pro_se, pmc_completed, opposing_party_pro_se, and filing_role before sending."},"page_count_analysis":{"type":"object","properties":{"total_pdf_pages":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Total pages in the PDF"},"front_matter_pages":{"type":"integer","minimum":0,"description":"Pages of front matter (cover, TOC, TOA) excluded from body count"},"back_matter_pages":{"type":"integer","minimum":0,"description":"Pages of back matter (cert of service, cert of compliance, exhibits list) excluded from body count"},"body_page_count":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Effective body page count used for limit checks (total - front - back)"},"method":{"type":"string","enum":["llm_structural_analysis"],"description":"How body page count was determined"}},"required":["total_pdf_pages","front_matter_pages","back_matter_pages","body_page_count","method"],"description":"Breakdown of total vs body page count, showing front/back matter exclusions"},"format_detection":{"type":"object","properties":{"confidence":{"type":"string","enum":["high","medium","low"],"description":"Confidence in the extracted format data. high = format checks run normally, medium = format checks run with caveats, low = format checks skipped"},"confidence_reason":{"type":"string","description":"Why the confidence level was assigned"},"warning":{"type":"string","nullable":true,"description":"Human-readable warning when format checks will be skipped or uncertain"},"font_family":{"type":"string","nullable":true,"description":"Cleaned font family name (e.g. TimesNewRoman). Null when extraction failed"},"font_name_raw":{"type":"string","nullable":true,"description":"Raw font name from the PDF before cleaning. Null when extraction failed"},"margins_per_side":{"type":"object","nullable":true,"properties":{"top":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"},"right":{"type":"number"}},"required":["top","bottom","left","right"],"description":"Margin measurements per side in inches. Null when extraction failed"},"line_spacing_pt":{"type":"number","nullable":true,"description":"Median line spacing in points. Null when extraction failed"}},"required":["confidence","confidence_reason","warning","font_family","font_name_raw","margins_per_side","line_spacing_pt"],"description":"Format detection metadata from direct PDF analysis"},"warnings":{"type":"array","items":{"type":"string"},"description":"Conditions that may affect result quality. Present only when something noteworthy occurred during analysis."}},"required":["classification","document","page_count_analysis","format_detection"]},"ClassifyRequest":{"type":"object","properties":{"judge_slug":{"type":"string","description":"URL-safe judge identifier","example":"nicholas-g-garaufis"},"district_id":{"type":"string","description":"Federal district identifier","example":"edny"},"pdf_base64":{"type":"string","minLength":1,"description":"Base64-encoded PDF file"},"filename":{"type":"string","description":"Original filename of the PDF. Recommended: always include if available","example":"motion_for_summary_judgment.pdf"}},"required":["judge_slug","district_id","pdf_base64"]},"RulebookJurisdiction":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","DC","US"],"description":"Where the rulebook applies: a two-letter state code, DC for the District of Columbia, or US for national federal rules","example":"CA"},"RulebookScope":{"type":"string","enum":["national","statewide","court"],"description":"national: rules that apply across the country. statewide: rules that apply across one state, such as the California Rules of Court. court: rules for the courts listed in governed_court_ids.","example":"statewide"},"RulebookKind":{"type":"string","enum":["court_rules","statute","administrative_code"],"description":"court_rules: rules adopted by a court or court system. statute: a code enacted by a legislature. administrative_code: regulations adopted by a government agency.","example":"court_rules"},"Rulebook":{"type":"object","properties":{"id":{"type":"string","description":"Rulebook identifier. If the official name changes, the name changes and the id stays.","example":"california-rules-of-court"},"name":{"type":"string","description":"Official name","example":"California Rules of Court"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other names and abbreviations readers use for the rulebook","example":["CRC","Cal. Rules of Court","Cal. Rules Ct."]},"jurisdiction":{"$ref":"#/components/schemas/RulebookJurisdiction"},"scope":{"$ref":"#/components/schemas/RulebookScope"},"kind":{"$ref":"#/components/schemas/RulebookKind"},"governed_court_ids":{"type":"array","items":{"type":"string"},"description":"Court identifiers (see GET /api/v1/courts) of the courts a court-level rulebook names. Empty for statewide and national rulebooks: they apply across their jurisdiction and name no courts, and each rule says which courts it covers.","example":[]},"issuer":{"type":"string","description":"The body that adopts and publishes the rules","example":"Judicial Council of California"},"official_url":{"type":"string","format":"uri","description":"The issuer's official page for the rulebook","example":"https://courts.ca.gov/forms-rules/rules-court"},"rule_count":{"type":"integer","description":"Rules in force that the official source still lists. Repealed, reserved and removed rules are not counted.","example":1489},"last_checked_at":{"type":"string","nullable":true,"description":"When Court Rules last read the official source. Null before the first read.","example":"2026-10-20T16:05:12.481209+00:00"},"site_url":{"type":"string","format":"uri","description":"The rulebook's page on courtrules.app","example":"https://www.courtrules.app/rules/california-rules-of-court"}},"required":["id","name","aliases","jurisdiction","scope","kind","governed_court_ids","issuer","official_url","rule_count","last_checked_at","site_url"]},"RulebooksResponse":{"type":"object","properties":{"rulebooks":{"type":"array","items":{"$ref":"#/components/schemas/Rulebook"}},"meta":{"type":"object","properties":{"total":{"type":"integer","description":"Number of rulebooks returned. The full list comes in one response.","example":1},"jurisdiction":{"$ref":"#/components/schemas/RulebookJurisdiction"},"scope":{"$ref":"#/components/schemas/RulebookScope"},"district_id":{"type":"string","description":"Court filter applied to the response"},"q":{"type":"string","description":"Search applied to the response"}},"required":["total"]}},"required":["rulebooks","meta"]},"ApiError":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong","example":"Invalid request"},"suggestion":{"type":"string","description":"How to fix the request"},"docs_url":{"type":"string","description":"Documentation for the endpoint"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The parameter that failed","example":"limit"},"message":{"type":"string","description":"Why it failed"}},"required":["path","message"]},"description":"The parameters that failed validation, each with a message"}},"required":["error"]},"RuleOutlineEntry":{"type":"object","properties":{"label":{"type":"string","description":"The level as the rulebook prints it: \"Title Three\", \"Division 11\", \"Chapter 2\"","example":"Division 11"},"heading":{"type":"string","description":"The level's heading","example":"Law and Motion"}},"required":["label","heading"]},"RuleLegalStatus":{"type":"string","enum":["in_force","repealed","reserved"],"description":"in_force: the rule is in effect. repealed: the rulebook lists the number as repealed. reserved: the number is held and no rule is assigned to it.","example":"in_force"},"RuleExtractionStatus":{"type":"string","enum":["pending","succeeded","failed","skipped"],"description":"Whether requirements have been read from the rule's current text. pending: not read yet, so requirement_count is 0 for now. succeeded: read, and requirement_count is final for this text (0 means the text states none of the requirements that are read: limits, deadlines, formats, copies, filing, service, fees, sealing and contact with the court). failed: the requirements could not be read, so requirement_count is 0. skipped: nothing is read from this rule, because it has no operative text (a repealed or reserved rule) or is too long to process.","example":"succeeded"},"RulebookRuleSummary":{"type":"object","properties":{"number":{"type":"string","description":"Official rule number without the word Rule, exactly as the rulebook prints it. Numbers can hold dots, colons, hyphens and letters.","example":"3.1113"},"slug":{"type":"string","description":"URL form of the number, as used in site_url","example":"3.1113"},"citation":{"type":"string","description":"How to cite the rule","example":"Cal. Rules of Court, rule 3.1113"},"revision_id":{"type":"string","format":"uuid","description":"Identifier of this version of the rule. It changes when the rule's heading, place in the rulebook, text, status or effective date changes."},"heading":{"type":"string","description":"The rule's heading","example":"Memorandum"},"outline":{"type":"array","items":{"$ref":"#/components/schemas/RuleOutlineEntry"},"description":"Where the rule sits in the rulebook, from the top level down"},"legal_status":{"$ref":"#/components/schemas/RuleLegalStatus"},"effective_from":{"type":"string","nullable":true,"description":"Date the current text took effect, as the official source states it (YYYY-MM-DD). Null when the source gives no date.","example":"2017-01-01"},"observed_at":{"type":"string","description":"When Court Rules first saw this version of the rule on the official source","example":"2026-10-20T16:00:03.512907+00:00"},"removed":{"type":"boolean","description":"True when the official source no longer lists the rule. A removed rule keeps the heading, status and text it had when it was last listed, and it has no requirements."},"requirement_count":{"type":"integer","description":"Requirements read from the rule's current text: the number of results GET /api/v1/extracted-rules returns for this rule. Check extraction_status before reading 0 as none.","example":8},"extraction_status":{"$ref":"#/components/schemas/RuleExtractionStatus"},"site_url":{"type":"string","format":"uri","description":"The rule's page on courtrules.app","example":"https://www.courtrules.app/rules/california-rules-of-court/3.1113"}},"required":["number","slug","citation","revision_id","heading","outline","legal_status","effective_from","observed_at","removed","requirement_count","extraction_status","site_url"]},"RulebookRulesResponse":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/RulebookRuleSummary"},"description":"Rules in rulebook order"},"meta":{"type":"object","properties":{"total":{"type":"integer","description":"Number of rules matching the filters, across all pages","example":253},"returned":{"type":"integer","description":"Number of rules in this page","example":100},"limit":{"type":"integer","description":"Maximum number of rules requested per page","example":100},"offset":{"type":"integer","description":"Number of matching rules skipped","example":0},"next_offset":{"type":"integer","nullable":true,"description":"Offset of the next page, or null when this is the last page","example":100},"rulebook_id":{"type":"string","description":"The rulebook listed","example":"california-rules-of-court"},"q":{"type":"string","description":"Search applied to the response"},"legal_status":{"$ref":"#/components/schemas/RuleLegalStatus"},"has_requirements":{"type":"boolean","description":"Requirements filter applied to the response"}},"required":["total","returned","limit","offset","next_offset","rulebook_id"]}},"required":["rules","meta"]},"RuleParagraphBlock":{"type":"object","properties":{"type":{"type":"string","enum":["paragraph"]},"text":{"type":"string","description":"Paragraph text"}},"required":["type","text"],"description":"A paragraph of rule text"},"RuleItemBlock":{"type":"object","properties":{"type":{"type":"string","enum":["item"]},"label":{"type":"string","description":"The label as printed: \"(d)\", \"(1)\", \"(A)\"","example":"(d)"},"heading":{"type":"string","description":"The item's heading, when it has one","example":"Length of memorandum"},"text":{"type":"string","description":"Text printed after the label, when there is any"},"children":{"type":"array","items":{"$ref":"#/components/schemas/RuleBlock"},"description":"Blocks inside the item, in order"}},"required":["type","label"],"description":"A labeled part of the rule: a subdivision such as (d) with its heading, or a numbered paragraph such as (1) with its text"},"RuleTableCell":{"type":"object","properties":{"text":{"type":"string","description":"Cell text"},"header":{"type":"boolean","description":"True for a header cell"},"colspan":{"type":"integer","description":"Columns the cell spans, when more than one"},"rowspan":{"type":"integer","description":"Rows the cell spans, when more than one"}},"required":["text"]},"RuleTableRow":{"type":"object","properties":{"cells":{"type":"array","items":{"$ref":"#/components/schemas/RuleTableCell"},"description":"Cells, left to right"}},"required":["cells"]},"RuleTableBlock":{"type":"object","properties":{"type":{"type":"string","enum":["table"]},"rows":{"type":"array","items":{"$ref":"#/components/schemas/RuleTableRow"},"description":"Rows, top to bottom"}},"required":["type","rows"],"description":"A table printed in the rule"},"RuleNoteBlock":{"type":"object","properties":{"type":{"type":"string","enum":["note"]},"role":{"type":"string","enum":["history","comment","editor"],"description":"history: when the rule or one of its parts was adopted or amended. comment: a committee comment. editor: an editor's note."},"title":{"type":"string","description":"Title printed above the note","example":"Advisory Committee Comment"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/RuleBlock"},"description":"The note's text"}},"required":["type","role","blocks"],"description":"Text printed with the rule that is not part of it. Notes are left out of plain_text, and requirements are never read from them."},"RuleBlock":{"oneOf":[{"$ref":"#/components/schemas/RuleParagraphBlock"},{"$ref":"#/components/schemas/RuleItemBlock"},{"$ref":"#/components/schemas/RuleTableBlock"},{"$ref":"#/components/schemas/RuleNoteBlock"}],"discriminator":{"propertyName":"type","mapping":{"paragraph":"#/components/schemas/RuleParagraphBlock","item":"#/components/schemas/RuleItemBlock","table":"#/components/schemas/RuleTableBlock","note":"#/components/schemas/RuleNoteBlock"}},"description":"One block of a rule's official text"},"RulebookRuleText":{"type":"object","nullable":true,"properties":{"revision_id":{"type":"string","format":"uuid","description":"Identifier of this version of the rule. It changes when the rule's heading, place in the rulebook, text, status or effective date changes."},"heading":{"type":"string","description":"The rule's heading in this version","example":"Memorandum"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/RuleBlock"},"description":"The official text as structured blocks, in document order"},"plain_text":{"type":"string","description":"The operative text as plain lines: every paragraph, item and table row in order, with item labels. History notes and committee comments are left out."},"source_url":{"type":"string","format":"uri","description":"The official page the text was read from","example":"https://courts.ca.gov/cms/rules/index/three/rule3_1113"},"captured_at":{"type":"string","description":"When Court Rules fetched that page for this version","example":"2026-10-20T16:00:01.874312+00:00"}},"required":["revision_id","heading","blocks","plain_text","source_url","captured_at"],"description":"The rule's latest official text, or null when none is available. For a removed rule, this is the text it had when it was last listed."},"RulebookRule":{"type":"object","properties":{"number":{"type":"string","description":"Official rule number without the word Rule, exactly as the rulebook prints it. Numbers can hold dots, colons, hyphens and letters.","example":"3.1113"},"slug":{"type":"string","description":"URL form of the number, as used in site_url","example":"3.1113"},"citation":{"type":"string","description":"How to cite the rule","example":"Cal. Rules of Court, rule 3.1113"},"revision_id":{"type":"string","format":"uuid","description":"Identifier of this version of the rule. It changes when the rule's heading, place in the rulebook, text, status or effective date changes."},"heading":{"type":"string","description":"The rule's heading","example":"Memorandum"},"outline":{"type":"array","items":{"$ref":"#/components/schemas/RuleOutlineEntry"},"description":"Where the rule sits in the rulebook, from the top level down"},"legal_status":{"$ref":"#/components/schemas/RuleLegalStatus"},"effective_from":{"type":"string","nullable":true,"description":"Date the current text took effect, as the official source states it (YYYY-MM-DD). Null when the source gives no date.","example":"2017-01-01"},"observed_at":{"type":"string","description":"When Court Rules first saw this version of the rule on the official source","example":"2026-10-20T16:00:03.512907+00:00"},"removed":{"type":"boolean","description":"True when the official source no longer lists the rule. A removed rule keeps the heading, status and text it had when it was last listed, and it has no requirements."},"requirement_count":{"type":"integer","description":"Requirements read from the rule's current text: the number of results GET /api/v1/extracted-rules returns for this rule. Check extraction_status before reading 0 as none.","example":8},"extraction_status":{"$ref":"#/components/schemas/RuleExtractionStatus"},"site_url":{"type":"string","format":"uri","description":"The rule's page on courtrules.app","example":"https://www.courtrules.app/rules/california-rules-of-court/3.1113"},"current":{"$ref":"#/components/schemas/RulebookRuleText"}},"required":["number","slug","citation","revision_id","heading","outline","legal_status","effective_from","observed_at","removed","requirement_count","extraction_status","site_url","current"]}},"parameters":{}},"paths":{"/api/v1/courts/{district_id}/holidays":{"get":{"operationId":"getCourtHolidays","summary":"Get holidays for a court","description":"Returns court holidays and closure dates for a single court. Filter by calendar year or date range.","parameters":[{"schema":{"type":"string","description":"Court identifier","example":"edny"},"required":true,"description":"Court identifier","name":"district_id","in":"path"},{"schema":{"type":"integer","minimum":1900,"maximum":2200,"description":"Calendar year","example":2026},"required":false,"description":"Calendar year","name":"year","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only include holidays on or after this date","example":"2026-01-01"},"required":false,"description":"Only include holidays on or after this date","name":"date_from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only include holidays on or before this date","example":"2026-12-31"},"required":false,"description":"Only include holidays on or before this date","name":"date_to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Maximum number of holidays to return","example":100},"required":false,"description":"Maximum number of holidays to return","name":"limit","in":"query"}],"responses":{"200":{"description":"Court holidays for the requested district","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourtHolidaysResponse"}}}},"400":{"description":"Invalid query parameters"},"404":{"description":"District not found"},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Failed to fetch holiday data"}}}},"/api/v1/courts":{"get":{"operationId":"listCourts","summary":"List all courts","description":"Returns every court we map, with its circuit, state, status, and roster size. Courts with status live have rules you can read with /rules and /extracted-rules. The full list is returned in one response.","responses":{"200":{"description":"Court list","content":{"application/json":{"schema":{"type":"object","properties":{"courts":{"type":"array","items":{"$ref":"#/components/schemas/CourtInfo"}},"meta":{"type":"object","properties":{"total_districts":{"type":"integer","description":"Number of courts in the list","example":3},"districts_with_data":{"type":"integer","description":"Number of courts with rules (status live)","example":2},"total_judges_mapped":{"type":"integer","description":"Sum of judges_mapped across all courts","example":174}},"required":["total_districts","districts_with_data","total_judges_mapped"]}},"required":["courts","meta"]}}}},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/courts/{district_id}":{"get":{"operationId":"getCourt","summary":"Get court details","description":"Returns details for one court: circuit, state, status, and roster size.","parameters":[{"schema":{"type":"string","description":"Court identifier (e.g. edny, sdny, ca-los-angeles-superior)","example":"edny"},"required":true,"description":"Court identifier (e.g. edny, sdny, ca-los-angeles-superior)","name":"district_id","in":"path"}],"responses":{"200":{"description":"Court details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourtInfo"}}}},"404":{"description":"Court not found"},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/holidays":{"get":{"operationId":"listCourtHolidays","summary":"List court holidays","description":"Returns court holidays and closure dates. Filter by court, calendar year, or date range.","parameters":[{"schema":{"type":"string","description":"Court identifier","example":"edny"},"required":false,"description":"Court identifier","name":"district_id","in":"query"},{"schema":{"type":"integer","minimum":1900,"maximum":2200,"description":"Calendar year","example":2026},"required":false,"description":"Calendar year","name":"year","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only include holidays on or after this date","example":"2026-01-01"},"required":false,"description":"Only include holidays on or after this date","name":"date_from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only include holidays on or before this date","example":"2026-12-31"},"required":false,"description":"Only include holidays on or before this date","name":"date_to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Maximum number of holidays to return","example":100},"required":false,"description":"Maximum number of holidays to return","name":"limit","in":"query"}],"responses":{"200":{"description":"Court holidays","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourtHolidaysResponse"}}}},"400":{"description":"Invalid query parameters"},"404":{"description":"District not found"},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Failed to fetch holiday data"}}}},"/api/v1/extracted-rules":{"get":{"operationId":"listExtractedRules","summary":"Search extracted filing rules","description":"Returns validated extracted filing rules from active source documents, newest first. Use this for e-filing, service, fee, timing, courtesy copy, and courtroom preference rules in any court we cover. Results are paged: meta.total is the number of matching rules, and meta.next_offset is the offset of the next page (null on the last page). Searches with q or case_type examine at most 10,000 candidate rules, which covers any single court; narrow broader searches with district_id, judge_slug, logic_type, or workflow_phase. A rule that belongs to a topic, such as the rules about the use of artificial intelligence, carries a topics field. Pass topic to keep only the rules of that topic; it applies before the count and the paging, so meta.total and the pages are those of the topic's rules, and it combines with the other filters. Pass rulebook_id, and optionally rule_number, to read the requirements of an official rulebook instead: each result names the rulebook rule it was read from, and results are ordered by rule number. A request cannot name a rulebook together with a court, a judge or a topic.","parameters":[{"schema":{"type":"string","description":"Court identifier","example":"il-cook-circuit"},"required":false,"description":"Court identifier","name":"district_id","in":"query"},{"schema":{"type":"string","description":"Judge, calendar, department, or courtroom slug. Court-level rules use \"court\".","example":"il-cook-reilly-eve-m"},"required":false,"description":"Judge, calendar, department, or courtroom slug. Court-level rules use \"court\".","name":"judge_slug","in":"query"},{"schema":{"type":"boolean","default":true,"description":"When judge_slug is supplied, also include court-level rules where judge_slug is \"court\".","example":true},"required":false,"description":"When judge_slug is supplied, also include court-level rules where judge_slug is \"court\".","name":"include_court_rules","in":"query"},{"schema":{"type":"string","enum":["CourtesyCopyRule","PageWordLimitRule","PreMotionConferenceRule","AdjournmentRequirementRule","BundlingRule","FormatConstraint","DocumentRequirement","CommunicationRule","SealingProcedure","ElectronicFilingRule","FilingTimingRule","ServiceRule","FilingFeeRule","JuniorLawyerIncentive"],"description":"Filter by structured filing rule type","example":"ElectronicFilingRule"},"required":false,"description":"Filter by structured filing rule type","name":"logic_type","in":"query"},{"schema":{"type":"string","enum":["FILING","CASE_INITIATION","MOTION_PRACTICE","TRIAL_PREP","POST_JUDGMENT"],"description":"Filter by workflow phase","example":"FILING"},"required":false,"description":"Filter by workflow phase","name":"workflow_phase","in":"query"},{"schema":{"type":"string","enum":["civil","criminal","habeas","prisoner","social_security","bankruptcy","pro_se","general","family","probate","small_claims","unlawful_detainer","traffic","juvenile","mental_health","limited_civil","unlimited_civil","civil_limited","civil_unlimited","complex_civil","chancery","law","municipal","domestic_relations","domestic_violence","county","commercial","foreclosure"],"description":"Filter by case type. General rules and rules without a case-type limit are included.","example":"civil"},"required":false,"description":"Filter by case type. General rules and rules without a case-type limit are included.","name":"case_type","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Search summary, source text, tags, and structured data","example":"rejected cure"},"required":false,"description":"Search summary, source text, tags, and structured data","name":"q","in":"query"},{"schema":{"type":"string","enum":["ai_use"],"description":"Only rules that have this topic. ai_use: Rules in which a court or judge says something about artificial intelligence (AI) in filings and proceedings, whether or not they ask something of the filer. Cannot be combined with rulebook_id.","example":"ai_use"},"required":false,"description":"Only rules that have this topic. ai_use: Rules in which a court or judge says something about artificial intelligence (AI) in filings and proceedings, whether or not they ask something of the filer. Cannot be combined with rulebook_id.","name":"topic","in":"query"},{"schema":{"type":"string","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Rulebook identifier from GET /api/v1/rulebooks. Returns the requirements read from that rulebook's current rules instead of a court's documents. Cannot be combined with district_id, judge_slug, include_court_rules or topic.","example":"california-rules-of-court"},"required":false,"description":"Rulebook identifier from GET /api/v1/rulebooks. Returns the requirements read from that rulebook's current rules instead of a court's documents. Cannot be combined with district_id, judge_slug, include_court_rules or topic.","name":"rulebook_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":40,"description":"With rulebook_id: only the requirements read from this rule, by its official number. Requires rulebook_id.","example":"3.1113"},"required":false,"description":"With rulebook_id: only the requirements read from this rule, by its official number. Requires rulebook_id.","name":"rule_number","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Maximum number of rules to return in this page","example":100},"required":false,"description":"Maximum number of rules to return in this page","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991,"default":0,"description":"Number of matching rules to skip. Use meta.next_offset to fetch the next page.","example":0},"required":false,"description":"Number of matching rules to skip. Use meta.next_offset to fetch the next page.","name":"offset","in":"query"}],"responses":{"200":{"description":"Extracted filing rules with source provenance, or with rulebook_id, the requirements of a rulebook","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExtractedRulesResponse"},{"$ref":"#/components/schemas/RulebookExtractedRulesResponse"}]}}}},"400":{"description":"Invalid query parameters, rule_number without rulebook_id, or rulebook_id with district_id, judge_slug, include_court_rules or topic"},"404":{"description":"District, rulebook, or rule not found"},"422":{"description":"A q or case_type search matched too many candidate rules; add filters"},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/judges":{"get":{"operationId":"listJudges","summary":"List judges","description":"Returns the current judges (and, in some state courts, departments or courtrooms) for a court. Use a judge's slug with /rules and /extracted-rules.","parameters":[{"schema":{"type":"string","description":"Court identifier","example":"ca-los-angeles-superior"},"required":true,"description":"Court identifier","name":"district_id","in":"query"}],"responses":{"200":{"description":"Judge list","content":{"application/json":{"schema":{"type":"object","properties":{"district_id":{"type":"string"},"judges":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","example":"nicholas-g-garaufis"},"name":{"type":"string","example":"Nicholas G. Garaufis"},"has_profile":{"type":"boolean","description":"Whether this judge has a compliance profile used by /check"},"has_rules":{"type":"boolean","description":"Whether we hold this judge's own rules (standing orders, individual practices)"},"status":{"type":"string","nullable":true,"enum":["active","coming_soon"],"description":"active = on the court's current roster, coming_soon = on the roster but none of the judge's own documents are processed yet. Null when the roster has no record for the judge."},"judge_type":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"chambers":{"type":"string","nullable":true},"profile_url":{"type":"string","nullable":true}},"required":["slug","name","has_profile","has_rules","status","judge_type","bio","chambers","profile_url"]}},"meta":{"type":"object","properties":{"total":{"type":"integer","description":"Number of judges returned"},"profiled":{"type":"integer","description":"Judges with compliance profiles"},"with_rules":{"type":"integer","description":"Judges whose own rules we hold"},"court_level_rules":{"type":"boolean","description":"Whether the court has court-wide rules, served under judge_slug \"court\" by /extracted-rules"}},"required":["total","profiled","with_rules","court_level_rules"]}},"required":["district_id","judges","meta"]}}}},"400":{"description":"Missing or invalid district_id"},"404":{"description":"Court not found"},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/rules":{"get":{"operationId":"getRules","summary":"Get rules for a judge","description":"Returns the rules that apply to a judge. For courts with compliance profiles (edny today), returns the hierarchical rule set (FRCP, Local Rules, Standing Order), optionally filtered by document scope and motion type. For every other court, returns the court-wide rules and the judge's own rules with their source quotes; document_scope and motion_type do not apply there.","parameters":[{"schema":{"type":"string","description":"Judge slug identifier","example":"nicholas-g-garaufis"},"required":true,"description":"Judge slug identifier","name":"judge_slug","in":"query"},{"schema":{"type":"string","description":"District identifier","example":"edny"},"required":true,"description":"District identifier","name":"district_id","in":"query"},{"schema":{"$ref":"#/components/schemas/DocumentScope"},"required":false,"description":"Filter rules relevant to this document type","name":"document_scope","in":"query"},{"schema":{"$ref":"#/components/schemas/MotionType"},"required":false,"description":"Filter rules relevant to this motion type","name":"motion_type","in":"query"}],"responses":{"200":{"description":"ComplianceRuleSet for courts with compliance profiles, JudgeExtractedRules for every other court","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ComplianceRuleSet"},{"$ref":"#/components/schemas/JudgeExtractedRules"}]}}}},"400":{"description":"Missing required parameters, or document_scope or motion_type sent for a court without compliance profiles"},"404":{"description":"Court or judge not found"},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/profile":{"get":{"operationId":"getProfile","summary":"Get judge profile with citations","description":"For courts with compliance profiles (edny today), returns the judge's full compliance profile, including verbatim source citations from standing order PDFs. For every other court, returns the court-wide rules and the judge's own rules with their source quotes, the same data as /rules.","parameters":[{"schema":{"type":"string","description":"Judge URL slug","example":"carol-bagley-amon"},"required":true,"description":"Judge URL slug","name":"judge_slug","in":"query"},{"schema":{"type":"string","description":"Court identifier","example":"edny"},"required":true,"description":"Court identifier","name":"district_id","in":"query"}],"responses":{"200":{"description":"JudgeProfile for courts with compliance profiles, JudgeExtractedRules for every other court","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JudgeProfile"},{"$ref":"#/components/schemas/JudgeExtractedRules"}]}}}},"400":{"description":"Missing required query parameters"},"404":{"description":"Court or judge not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/documents":{"get":{"operationId":"listDocuments","summary":"List source documents for a judge","description":"Returns the current source documents (standing orders, individual practices, court rules pages) for a judge, with metadata and document version IDs. Use judge_slug \"court\" for a court's court-wide documents. Documents with mime_type application/pdf can be downloaded from /documents/{id}/pdf; read other formats at their source_url.","parameters":[{"schema":{"type":"string","description":"Judge URL slug","example":"carol-bagley-amon"},"required":true,"description":"Judge URL slug","name":"judge_slug","in":"query"},{"schema":{"type":"string","description":"Court identifier","example":"edny"},"required":true,"description":"Court identifier","name":"district_id","in":"query"}],"responses":{"200":{"description":"Document list (empty when we hold no current documents for the judge)","content":{"application/json":{"schema":{"type":"object","properties":{"judge_slug":{"type":"string"},"district_id":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Document version ID (use for /documents/:id/pdf)"},"doc_kind":{"type":"string","nullable":true},"content_hash":{"type":"string"},"fetched_at":{"type":"string","nullable":true},"document_date":{"type":"string","nullable":true},"mime_type":{"type":"string","nullable":true,"description":"File type of the stored document, e.g. application/pdf or text/html"},"source_url":{"type":"string"},"source_url_key":{"type":"string"}},"required":["id","doc_kind","content_hash","fetched_at","document_date","mime_type","source_url","source_url_key"]}}},"required":["judge_slug","district_id","documents"]}}}},"404":{"description":"Court not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/documents/{id}/pdf":{"get":{"operationId":"getDocumentPdf","summary":"Get source PDF","description":"Returns the stored PDF for a document version. Documents stored in another format (HTML pages, Word files) return 415 with the source_url to read instead.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Document version ID"},"required":true,"description":"Document version ID","name":"id","in":"path"}],"responses":{"200":{"description":"PDF file content","content":{"application/pdf":{"schema":{"type":"string"}}}},"404":{"description":"Document not found"},"415":{"description":"The document is not a PDF; read it at source_url"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/api/v1/documents/reference/{key}/pdf":{"get":{"operationId":"getReferencePdf","summary":"Get reference PDF (FRCP or local rules)","description":"Returns a reference PDF (Federal Rules of Civil Procedure or district local rules).","parameters":[{"schema":{"type":"string","enum":["frcp","edny-local"],"description":"Reference document key"},"required":true,"description":"Reference document key","name":"key","in":"path"}],"responses":{"200":{"description":"PDF file content","content":{"application/pdf":{"schema":{"type":"string"}}}},"404":{"description":"Reference document not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/api/v1/check":{"post":{"operationId":"checkDocument","summary":"Check document compliance","description":"Runs the deterministic lint engine against the provided document metadata and filing context.\nReturns structured compliance results with per-rule pass/fail status.\n\nOnly `page_count` and `word_count` are required in the document object.\nOmitted optional sections cause their corresponding checks to be silently skipped.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}}},"responses":{"200":{"description":"Compliance check results","content":{"application/json":{"schema":{"type":"object","properties":{"judge":{"$ref":"#/components/schemas/JudgeSummary"},"summary":{"type":"object","properties":{"status":{"type":"string","enum":["COMPLIANT","REVIEW","NON_COMPLIANT"],"description":"Overall compliance status"},"failures":{"type":"integer"},"warnings":{"type":"integer"},"passes":{"type":"integer"},"action_items":{"type":"integer"}},"required":["status","failures","warnings","passes","action_items"]},"results":{"type":"array","items":{"$ref":"#/components/schemas/LintResult"}},"meta":{"type":"object","properties":{"checks_run":{"type":"integer"},"checks_skipped":{"type":"integer"}},"required":["checks_run","checks_skipped"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Conditions that may affect result completeness. Present only when something noteworthy occurred."}},"required":["judge","summary","results","meta"]}}}},"400":{"description":"Invalid request body"},"404":{"description":"Court or judge not found"},"422":{"description":"The court has no compliance profile yet; read its rules with /rules or /extracted-rules"},"429":{"description":"Rate limit exceeded (60 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"A temporary problem on our side. Retry the request."}}}},"/api/v1/classify":{"post":{"operationId":"classifyDocument","summary":"Classify a PDF document for compliance checking","description":"Upload a PDF and receive document classification (scope, motion type) plus a partial request body for POST /check. The response includes a `supported` boolean: `true` for classifiable federal court filings, `false` (with `confidence: \"low\"`) for state court forms, blank templates, or non-legal documents. The check_request includes judge, district, scope, and document metadata; you must add is_pro_se, pmc_completed, opposing_party_pro_se, and filing_role before sending to /check.\n\nMay take 10 to 30 seconds to respond.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}}},"responses":{"200":{"description":"Classification results with partial check request (add filing context fields before sending to /check)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyResponse"}}}},"400":{"description":"Invalid request body"},"404":{"description":"Court not found"},"413":{"description":"The PDF is larger than 10 MB. Split a larger filing and classify the parts."},"422":{"description":"The court has no compliance profile yet (read its rules with /rules or /extracted-rules), or the PDF could not be read: it is password-protected, is not a valid PDF, or has scanned pages that text recognition rejected. `scanned_pages` lists the 1-based page numbers that needed text recognition."},"429":{"description":"Rate limit exceeded (5 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"The PDF could not be read. Retry the request."},"502":{"description":"Document classification service temporarily unavailable"},"503":{"description":"The PDF has scanned pages and text recognition is unavailable. Text-based PDFs are not affected. `scanned_pages` lists the 1-based page numbers that needed it."}}}},"/api/v1/rulebooks":{"get":{"operationId":"listRulebooks","summary":"List rulebooks","description":"Returns the official rulebooks you can read, such as the California Rules of Court. A rulebook is an official set of numbered rules published as one book. Filter by jurisdiction, scope, a court the rulebook names, or words in its name. The full list comes in one response. Read a rulebook's rules with /rulebooks/{rulebook_id}/rules.","parameters":[{"schema":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","DC","US"],"description":"Only rulebooks that apply in this jurisdiction: a state code, DC, or US","example":"CA"},"required":false,"description":"Only rulebooks that apply in this jurisdiction: a state code, DC, or US","name":"jurisdiction","in":"query"},{"schema":{"type":"string","enum":["national","statewide","court"],"description":"Only rulebooks of this scope: national, statewide or court","example":"statewide"},"required":false,"description":"Only rulebooks of this scope: national, statewide or court","name":"scope","in":"query"},{"schema":{"type":"string","description":"Court identifier. Returns the court-level rulebooks that name this court in governed_court_ids. Statewide and national rulebooks name no courts, so find them with jurisdiction and scope.","example":"ca-los-angeles-superior"},"required":false,"description":"Court identifier. Returns the court-level rulebooks that name this court in governed_court_ids. Statewide and national rulebooks name no courts, so find them with jurisdiction and scope.","name":"district_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Words to find in a rulebook's name, abbreviations, identifier or issuer. Every word must appear.","example":"CRC"},"required":false,"description":"Words to find in a rulebook's name, abbreviations, identifier or issuer. Every word must appear.","name":"q","in":"query"}],"responses":{"200":{"description":"Rulebooks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulebooksResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"district_id names a court we do not map","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Failed to fetch rulebooks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/rulebooks/{rulebook_id}":{"get":{"operationId":"getRulebook","summary":"Get a rulebook","description":"Returns one rulebook: its name, abbreviations, jurisdiction, issuer, official page, the number of rules in force, and when Court Rules last read the official source.","parameters":[{"schema":{"type":"string","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Rulebook identifier from GET /api/v1/rulebooks","example":"california-rules-of-court"},"required":true,"description":"Rulebook identifier from GET /api/v1/rulebooks","name":"rulebook_id","in":"path"}],"responses":{"200":{"description":"Rulebook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rulebook"}}}},"400":{"description":"Invalid rulebook identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Rulebook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Failed to fetch the rulebook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/rulebooks/{rulebook_id}/rules":{"get":{"operationId":"listRulebookRules","summary":"List the rules of a rulebook","description":"Returns the rules of one rulebook in rulebook order, without their text. Search by number, heading or text, filter by status or by whether a rule has requirements, and page with limit and offset: meta.total is the number of matching rules, and meta.next_offset is the offset of the next page (null on the last page). Read one rule's text with /rulebooks/{rulebook_id}/rules/{number}, and its requirements with /extracted-rules.","parameters":[{"schema":{"type":"string","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Rulebook identifier from GET /api/v1/rulebooks","example":"california-rules-of-court"},"required":true,"description":"Rulebook identifier from GET /api/v1/rulebooks","name":"rulebook_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Words to find in a rule's number, heading or operative text. Every word must appear. History notes and committee comments are not searched.","example":"opening memorandum"},"required":false,"description":"Words to find in a rule's number, heading or operative text. Every word must appear. History notes and committee comments are not searched.","name":"q","in":"query"},{"schema":{"type":"string","enum":["in_force","repealed","reserved"],"description":"Only rules with this status: in_force, repealed or reserved","example":"in_force"},"required":false,"description":"Only rules with this status: in_force, repealed or reserved","name":"legal_status","in":"query"},{"schema":{"type":"boolean","description":"true: only rules whose current text has at least one requirement. false: only rules with none, including rules whose requirements have not been read yet.","example":true},"required":false,"description":"true: only rules whose current text has at least one requirement. false: only rules with none, including rules whose requirements have not been read yet.","name":"has_requirements","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Maximum number of rules to return in this page","example":100},"required":false,"description":"Maximum number of rules to return in this page","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991,"default":0,"description":"Number of matching rules to skip. Use meta.next_offset to fetch the next page.","example":0},"required":false,"description":"Number of matching rules to skip. Use meta.next_offset to fetch the next page.","name":"offset","in":"query"}],"responses":{"200":{"description":"Rules of the rulebook, one page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulebookRulesResponse"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Rulebook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Failed to fetch the rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/rulebooks/{rulebook_id}/rules/{number}":{"get":{"operationId":"getRulebookRule","summary":"Get a rule of a rulebook","description":"Returns one rule with its official text as structured blocks and as plain text. The number must match the rulebook's own number exactly, such as 3.1113 or 4:46-2, and must be URL-encoded. History notes and committee comments come in blocks and are left out of plain_text. Read the rule's requirements with /extracted-rules?rulebook_id=...&rule_number=....","parameters":[{"schema":{"type":"string","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Rulebook identifier from GET /api/v1/rulebooks","example":"california-rules-of-court"},"required":true,"description":"Rulebook identifier from GET /api/v1/rulebooks","name":"rulebook_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":40,"description":"Official rule number, exactly as the rulebook prints it and without the word Rule. URL-encode it: numbers can hold dots, colons, hyphens and spaces. Leading and trailing spaces are not allowed.","example":"3.1113"},"required":true,"description":"Official rule number, exactly as the rulebook prints it and without the word Rule. URL-encode it: numbers can hold dots, colons, hyphens and spaces. Leading and trailing spaces are not allowed.","name":"number","in":"path"}],"responses":{"200":{"description":"The rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulebookRule"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Rulebook or rule not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (300 requests per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Failed to fetch the rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}