Cancel the AI jobs 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}/jobs/cancel

Removes the waiting, delayed, paused and active AI jobs of the case from every AI queue and reports how many were removed per queue and state. A job already running may still finish its current step. Requires owner or admin access to the case and an active plan (403 otherwise); not available to opposing counsel.

Path parameters

  • caseId string Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data 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
    • statusCode number Required
    • timestamp string(date-time) Required
POST /ai/cases/{caseId}/jobs/cancel
curl \
 --request POST 'http://api.example.com/ai/cases/{caseId}/jobs/cancel' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "case": "65a1b2c3d4e5f6a7b8c9d0e2",
    "cancelled": {
      "ai-embedding-jobs": {
        "waiting": 4,
        "delayed": 0,
        "paused": 0,
        "active": 1
      }
    },
    "totalCancelled": 5
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}