Cancel an export (internal)

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 /admin/exports/{id}/cancel

Records a cancel request: an export that has not started is cancelled at once and its queue job removed, and a running export stops at its next conversation boundary. Repeating it on a cancelled export succeeds. Only conversation PDF exports can be cancelled; other exports and completed or failed ones return 400, an unknown export 404, and 403 while export cancellation is turned off. Super admin only.

Path parameters

  • id string Required

    Id of the export to cancel

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • exportId string Required
      • cancelRequested boolean Required

        Always true on a successful response: the cancel request is recorded (or was already recorded by an earlier call).

      • jobRemoved boolean Required

        True only when a live queued job was found for this export and removed outright. Read "effectiveAt", not this, to tell whether the cancellation took effect immediately: a not-yet-started export whose job was already absent is cancelled immediately with nothing to remove, and reports false here.

      • effectiveAt string Required

        When the cancellation actually takes effect. "immediately" when the export had not started yet, so it is marked cancelled on the spot and will never run. A RUNNING export always stops at its next conversation boundary — cancellation is cooperative, never an instant stop.

        Values are immediately, next-conversation-boundary, or already-cancelled.

      • message string Required

        Plain-English summary of what happened, safe to show as-is.

    • statusCode number Required
    • timestamp string(date-time) Required
POST /admin/exports/{id}/cancel
curl \
 --request POST 'http://api.example.com/admin/exports/{id}/cancel' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "exportId": "65a1b2c3d4e5f6a7b8c9d0f1",
    "cancelRequested": true,
    "jobRemoved": false,
    "effectiveAt": "next-conversation-boundary",
    "message": "Cancellation requested; the export stops at its next conversation boundary."
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}