> ## Documentation Index
> Fetch the complete documentation index at: https://docs.courtrules.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Document

> Run deterministic compliance checks against a federal court filing, checking page limits, formatting, required sections, and judge-specific standing order rules

<ParamField body="judge_slug" type="string" required>
  Judge slug identifier (e.g. `gary-r-brown`)
</ParamField>

<ParamField body="district_id" type="string" required>
  District identifier (e.g. `edny`)
</ParamField>

<ParamField body="document_scope" type="string" required>
  Document type. One of: `brief_support`, `brief_reply`, `brief_opposition`,
  `reconsideration_support`, `reconsideration_reply`, `letter`, `discovery_letter`,
  `proposed_findings`, `affidavit`, `settlement_statement`, `objection_response`,
  `rule_56_1_statement`
</ParamField>

<ParamField body="motion_type" type="string">
  Motion type. One of: `Rule_12`, `Rule_56`, `Rule_50`, `Rule_59`, `Rule_60`, `Daubert`, `TRO`,
  `preliminary_injunction`, `reconsideration`, `discovery`, `motion_to_amend`, `motion_in_limine`,
  `general`
</ParamField>

<ParamField body="is_pro_se" type="boolean" required>
  Whether the filing party is pro se
</ParamField>

<ParamField body="pmc_completed" type="boolean" required>
  Whether a pre-motion conference has been completed for this motion
</ParamField>

<ParamField body="opposing_party_pro_se" type="boolean" required>
  Whether the opposing party is pro se (triggers additional notice requirements)
</ParamField>

<ParamField body="filing_role" type="string" required>
  Filing role. One of: `movant`, `opponent`, `reply`
</ParamField>

<ParamField body="document" type="object" required>
  Document metadata. Only `page_count` and `word_count` are required. See [Document Structure](/concepts/document-structure) for all optional fields.

  <Expandable title="Required fields">
    <ParamField body="document.page_count" type="integer" required>
      Total page count (must be >= 1)
    </ParamField>

    <ParamField body="document.word_count" type="integer" required>
      Total word count (must be >= 0)
    </ParamField>
  </Expandable>

  <Expandable title="Optional sections">
    <ParamField body="document.caption" type="object">
      Caption analysis results
    </ParamField>

    <ParamField body="document.signature_block" type="object">
      Signature block analysis results
    </ParamField>

    <ParamField body="document.sections" type="object">
      Document section analysis results
    </ParamField>

    <ParamField body="document.format" type="object">
      Formatting analysis results (font size, margins, spacing)
    </ParamField>

    <ParamField body="document.privacy" type="object">
      Privacy/PII analysis results
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash Minimal theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://api.courtrules.app/api/v1/check \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "judge_slug": "gary-r-brown",
      "district_id": "edny",
      "document_scope": "brief_support",
      "motion_type": "Rule_56",
      "is_pro_se": false,
      "pmc_completed": true,
      "opposing_party_pro_se": false,
      "filing_role": "movant",
      "document": {
        "page_count": 22,
        "word_count": 7200
      }
    }'
  ```

  ```bash Full theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://api.courtrules.app/api/v1/check \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "judge_slug": "gary-r-brown",
      "district_id": "edny",
      "document_scope": "brief_support",
      "motion_type": "Rule_56",
      "is_pro_se": false,
      "pmc_completed": true,
      "opposing_party_pro_se": false,
      "filing_role": "movant",
      "document": {
        "page_count": 18,
        "word_count": 7200,
        "caption": {
          "present": true,
          "has_court_name": true,
          "has_case_title": true,
          "has_docket_number": true,
          "has_document_designation": true
        },
        "signature_block": {
          "present": true,
          "has_attorney_name": true,
          "has_firm_name": true,
          "has_address": true,
          "has_email": true,
          "has_phone": true,
          "is_electronic_signature": true
        },
        "sections": {
          "has_toc": true,
          "has_toa": true,
          "has_certificate_of_compliance": true,
          "certificate_word_count": 7200,
          "has_certificate_of_service": true,
          "has_numbered_paragraphs": true,
          "has_56_1_statement": true,
          "has_56_1_counterstatement": false,
          "has_proposed_amended_pleading": false,
          "has_verbatim_discovery_text": false,
          "has_conferral_certification": false,
          "has_notice_of_motion": true,
          "has_memorandum_of_law": true,
          "has_supporting_affidavits": true,
          "has_pro_se_sj_notice": false
        },
        "format": {
          "primary_font_size_pt": 12,
          "footnote_font_size_pt": 10,
          "margin_inches": 1.0,
          "line_spacing": "double"
        },
        "privacy": {
          "contains_full_ssn": false,
          "contains_full_dob": false,
          "contains_minor_full_name": false,
          "contains_full_financial_account": false
        }
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "judge": {
      "slug": "gary-r-brown",
      "name": "Gary R. Brown"
    },
    "summary": {
      "status": "NON_COMPLIANT",
      "failures": 1,
      "warnings": 0,
      "passes": 1,
      "action_items": 3
    },
    "results": [
      {
        "severity": "CRITICAL",
        "category": "PAGE_LIMIT",
        "message": "22 pages exceeds 20-page limit",
        "source": "Brown SO §2.B",
        "status": "FAIL"
      },
      {
        "severity": "INFO",
        "category": "WORD_LIMIT",
        "message": "7,200 words within 8,750-word limit",
        "source": "EDNY LR 7.1(c)",
        "status": "PASS"
      },
      {
        "severity": "WARNING",
        "category": "COURTESY_COPY",
        "message": "Courtesy copy required",
        "source": "Brown SO §1",
        "status": "ACTION_REQUIRED"
      },
      {
        "severity": "INFO",
        "category": "PMC",
        "message": "Pre-motion conference completed",
        "source": "Brown SO §3.A",
        "status": "PASS"
      },
      {
        "severity": "WARNING",
        "category": "BUNDLING",
        "message": "Do NOT file until motion is fully briefed",
        "source": "Brown SO §3.B",
        "status": "ACTION_REQUIRED"
      }
    ],
    "meta": {
      "checks_run": 5,
      "checks_skipped": 16
    }
  }
  ```
</ResponseExample>

## Response fields

<ResponseField name="summary" type="object">
  <Expandable title="Summary">
    <ResponseField name="status" type="string">
      Overall compliance status: - `COMPLIANT`: No failures, no action items - `REVIEW`: No
      failures, but action items require attention - `NON_COMPLIANT`: At least one rule violation
    </ResponseField>

    <ResponseField name="failures" type="integer">
      Count of FAIL results
    </ResponseField>

    <ResponseField name="warnings" type="integer">
      Count of WARNING-severity failures
    </ResponseField>

    <ResponseField name="passes" type="integer">
      Count of PASS results
    </ResponseField>

    <ResponseField name="action_items" type="integer">
      Count of ACTION\_REQUIRED results
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="results" type="array">
  Individual check results

  <Expandable title="LintResult">
    <ResponseField name="severity" type="string">
      `CRITICAL`, `WARNING`, or `INFO`
    </ResponseField>

    <ResponseField name="category" type="string">
      Check category (e.g. `PAGE_LIMIT`, `WORD_LIMIT`, `CAPTION`, `PMC`, `FORMAT`)
    </ResponseField>

    <ResponseField name="message" type="string">
      Human-readable explanation
    </ResponseField>

    <ResponseField name="source" type="string">
      Rule citation (e.g. `FRCP 10(a)`, `EDNY LR 7.1(c)`, `Brown SO §2.B`)
    </ResponseField>

    <ResponseField name="status" type="string">
      `FAIL`, `PASS`, or `ACTION_REQUIRED`
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  <Expandable title="Meta">
    <ResponseField name="checks_run" type="integer">
      Total number of checks that produced results
    </ResponseField>

    <ResponseField name="checks_skipped" type="integer">
      Checks skipped due to missing optional document sections
    </ResponseField>
  </Expandable>
</ResponseField>
