Reset the AI data of a case

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}/reset

Cancels the case AI jobs, then deletes its AI pipeline data (chunks, summaries, snippets, processing state, tag suggestion cache, filing extractions and message embeddings) while keeping attorney work: attorney-stated and confirmed context fields, attorney notes and evidentiary map overrides. With dryRun: true it only counts what would be removed. 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

  • dryRun boolean

    When true, return the counts that would have been deleted without actually deleting anything.

    Default value is false.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • case string
      • dryRun boolean
      • cancelledJobs object
        Hide cancelledJobs attributes Show cancelledJobs attributes object
        • case string
        • cancelled object

          Jobs removed per AI queue, by job state.

          Hide cancelled attribute Show cancelled attribute object
          • * object Additional properties
            Hide * attributes Show * attributes object
            • waiting number
            • delayed number
            • paused number
            • active number
        • totalCancelled number
      • deleted object

        Documents deleted per collection (counted only on a dry run).

        Hide deleted attributes Show deleted attributes object
        • chunks number
        • periodSummaries number
        • conversationSummaries number
        • evidenceSnippets number
        • processingStates number
        • tagSuggestionCacheEntries number
        • contextExtractions number
      • messagesEmbeddingsCleared number
      • caseSummaryReset boolean
      • evidentiaryMapEntriesPreserved number
      • contextFieldsCleared array[string]
      • preserved array[string]
    • statusCode number Required
    • timestamp string(date-time) Required
POST /ai/cases/{caseId}/reset
curl \
 --request POST 'http://api.example.com/ai/cases/{caseId}/reset' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "dryRun": false
}'
Request examples
{
  "dryRun": false
}
Response examples (200)
{
  "data": {
    "case": "65a1b2c3d4e5f6a7b8c9d0e2",
    "dryRun": false,
    "cancelledJobs": {
      "case": "65a1b2c3d4e5f6a7b8c9d0e2",
      "cancelled": {
        "ai-embedding-jobs": {
          "waiting": 4,
          "delayed": 0,
          "paused": 0,
          "active": 1
        }
      },
      "totalCancelled": 5
    },
    "deleted": {
      "chunks": 42.0,
      "periodSummaries": 42.0,
      "conversationSummaries": 42.0,
      "evidenceSnippets": 42.0,
      "processingStates": 42.0,
      "tagSuggestionCacheEntries": 42.0,
      "contextExtractions": 42.0
    },
    "messagesEmbeddingsCleared": 1200,
    "caseSummaryReset": true,
    "evidentiaryMapEntriesPreserved": 2,
    "contextFieldsCleared": [
      "keyDates"
    ],
    "preserved": [
      "string"
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}