Get an email import job

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
GET /email-data/{caseId}/import-jobs/{jobId}

Returns one import job with its status and imported counts. Clients poll this while an import runs.

Path parameters

  • caseId string Required
  • jobId string Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • createdAt string(date-time) Required
      • updatedAt string(date-time) Required
      • id string Required
      • emailDataProvider object | null Required

        Not loaded by any route, so always null.

      • extractionCode object | null Required

        Not loaded by any route, so always null.

      • case object | null Required

        Not loaded by any route, so always null.

      • notificationEmails array[string] Required
      • status string Required

        Values are not_started, in_progress, completed, or failed.

      • type string Required

        Values are by_thread, by_search, import_all, or by_multi_query.

      • startedAt string(date-time) | null Required
      • completedAt string(date-time) | null Required
      • failedAt string(date-time) | null Required
      • message string | null Required
      • jobData object | null Required
      • importedThreadsCount number Required
      • importedEmailsCount number Required
      • totalThreadsCount number Required
      • totalEmailsCount number Required
      • isCancelled boolean Required
      • scheduledFor string(date-time) | null
    • statusCode number Required
    • timestamp string(date-time) Required
GET /email-data/{caseId}/import-jobs/{jobId}
curl \
 --request GET 'http://api.example.com/email-data/{caseId}/import-jobs/{jobId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "createdAt": "2026-01-15T14:30:00.000Z",
    "updatedAt": "2026-01-15T14:30:00.000Z",
    "id": "507f1f77bcf86cd799439011",
    "emailDataProvider": {},
    "extractionCode": {},
    "case": {},
    "notificationEmails": [
      "jane.doe@example.com"
    ],
    "status": "not_started",
    "type": "by_thread",
    "startedAt": "2026-01-15T14:30:00.000Z",
    "completedAt": "2026-05-04T09:42:00Z",
    "failedAt": "2026-05-04T09:42:00Z",
    "message": "Importing threads",
    "jobData": {
      "providerId": "65a1b2c3d4e5f6a7b8c9d0e1"
    },
    "importedThreadsCount": 120,
    "importedEmailsCount": 348,
    "totalThreadsCount": 400,
    "totalEmailsCount": 1150,
    "isCancelled": false,
    "scheduledFor": "2026-05-04T09:42:00Z"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}