Apply a filing extraction

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/extractions/{extractionId}/apply

Copies a completed extraction into the case context, all fields or only those in fieldsToApply, marking them as AI-extracted, and returns the extraction with appliedAt, appliedBy and appliedFields. Applying it again returns it unchanged. Returns 400 when the extraction is not completed and 404 when it does not exist or belongs to another 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
  • extractionId string Required
application/json

Body Required

  • fieldsToApply array[string]

    Optional whitelist of fields to apply (e.g. ["legalClaims","keyParties"]). Defaults to all extractable fields.

Responses

  • 200 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/extractions/{extractionId}/apply
curl \
 --request POST 'http://api.example.com/ai/cases/{caseId}/context/extractions/{extractionId}/apply' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "fieldsToApply": [
    "string"
  ]
}'
Request examples
{
  "fieldsToApply": [
    "string"
  ]
}
Response examples (200)
{
  "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": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}