Extract case context from a filing

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
POST /ai/cases/{caseId}/context/extract-filing

Queues extraction of case context from one of the case files (a complaint, petition or other filing) and answers 202 with the queued extraction; list the extractions to follow it. Returns 404 when the file is not an active file of the case. Requires owner or admin access to the case and an active plan (403 otherwise); not available to opposing counsel.

Path parameters

  • caseId string Required
application/json

Body Required

  • caseFileId string Required

    Id of the CaseFile to extract from

Responses

  • 202 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • _id string
      • case string
      • organization string
      • caseFile string
      • status string

        Values are queued, running, completed, or failed.

      • rawExtraction object | null

        The model output, kept as returned.

      • appliedAt string(date-time) | null
      • appliedBy string | null
      • appliedFields array[string]
      • modelVersion string | null
      • promptVersion string | null
      • errorMessage string | null
      • createdAt string(date-time) | null
      • updatedAt string(date-time) | null
    • statusCode number Required
    • timestamp string(date-time) Required
POST /ai/cases/{caseId}/context/extract-filing
curl \
 --request POST 'http://api.example.com/ai/cases/{caseId}/context/extract-filing' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "caseFileId": "string"
}'
Request examples
{
  "caseFileId": "string"
}
Response examples (202)
{
  "data": {
    "_id": "65a1b2c3d4e5f6a7b8c9d0e1",
    "case": "65a1b2c3d4e5f6a7b8c9d0e2",
    "organization": "65a1b2c3d4e5f6a7b8c9d0e3",
    "caseFile": "65a1b2c3d4e5f6a7b8c9d0e5",
    "status": "completed",
    "rawExtraction": {},
    "appliedAt": "2026-01-15T10:15:00.000Z",
    "appliedBy": "65a1b2c3d4e5f6a7b8c9d0e4",
    "appliedFields": [
      "caseType",
      "legalClaims"
    ],
    "modelVersion": "string",
    "promptVersion": "case_context_filing_extraction.v1",
    "errorMessage": "string",
    "createdAt": "2026-01-15T10:15:00.000Z",
    "updatedAt": "2026-01-15T10:15:00.000Z"
  },
  "statusCode": 202,
  "timestamp": "2026-01-15T10:15:00.000Z"
}