List case exports

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 /case/{caseId}/export

Lists the case's export jobs with their status, progress and file.

Headers

  • organization string Required

    id of the selected (active) organization

Path parameters

  • caseId string Required

    Id of the case

Query parameters

  • page number

    Default value is 1.

  • perPage number

    Default value is 10.

  • skip number

    If skip/limit not provided, page/perPage will take precedence

  • limit number

    If skip/limit not provided, page/perPage will take precedence

  • sortOrder string

    Values are asc or desc. Default value is asc.

  • source string

    Values are conversation, browser-history, emails, case-files, case-attachments, financial, linkedin, ai-chat, or contacts.

  • type string

    Values are doc, text, csv, pdf, goodfact, rsmf, eml, or files-zip.

  • exportId string
  • exportedBy string
  • sortBy string

    Values are createdAt or exportedAt. Default value is createdAt.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • total number Required
      • page number
      • perPage number
      • skip number
      • limit number
      • totalPages number Required
      • nextPage number | null Required
      • previousPage number | null Required
      • data array[object]
        Hide data attributes Show data attributes object
        • createdAt string(date-time) Required
        • updatedAt string(date-time) Required
        • id string Required
        • organization object | null Required

          Not loaded by any route, so always null.

        • device object | null Required

          Not loaded by any route, so always null.

        • type string Required

          Values are doc, text, csv, pdf, goodfact, rsmf, eml, or files-zip.

        • source string Required

          Values are conversation, browser-history, emails, case-files, case-attachments, financial, linkedin, ai-chat, or contacts.

        • chunkType string Required

          Values are none, day, week, month, or year.

        • exportedBy string | null Required

          Id of the user who requested the export

        • tags array[object] | null Required

          Not loaded by any route, so always null or an empty list.

        • emails array[string] Required
        • caseFileIds array[string]

          Snapshot of CaseFile ids resolved at request time (only set when source = case-files)

        • fileName string | null Required
        • file object Required

          The full record on routes that load it; null (or an empty list) on routes that do not.

          Hide file attributes Show file attributes object
          • createdAt string(date-time) Required
          • updatedAt string(date-time) Required
          • id string Required
          • name string Required
          • providerId string Required
          • convertedName string | null Required
          • convertedProviderId string Required
          • provider string Required
          • size number Required

            Size in bytes

          • transferState number | null Required
        • sortBy string Required

          Values are old-to-new or new-to-old.

        • size number Required

          Size in bytes

        • errorMessage string | null Required
        • totalMessages number Required
        • messagesProcessed number Required
        • totalConversations number Required
        • conversationsProcessed number Required
        • status string Required

          Values are not-started, inprogress, completed, failed, or cancelled.

        • jobId string | null Required
        • totalJobs number Required

          Number of chunk jobs this export was split into

        • emailData array[array] Required
        • metadata object | null
        • failedThreadsCount number

          Email threads this export could not render

        • cmpSyncStatus string | null

          CMP delivery status when this export was sent to a provider (pending/processing/completed/failed/…). Null when the export was not sent to a CMP — i.e. a plain download-to-computer export.

          Values are pending, processing, completed, failed, disabled, or skipped.

        • progress number Required
        • conversationNames array[string] Required
        • caseName string Required
    • statusCode number Required
    • timestamp string(date-time) Required
GET /case/{caseId}/export
curl \
 --request GET 'http://api.example.com/case/{caseId}/export' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "organization: string"
Response examples (200)
{
  "data": {
    "total": 42,
    "page": 1,
    "perPage": 20,
    "skip": 0,
    "limit": 20,
    "totalPages": 3,
    "nextPage": 2,
    "previousPage": 42.0,
    "data": [
      {
        "createdAt": "2026-01-15T14:30:00.000Z",
        "updatedAt": "2026-01-15T14:30:00.000Z",
        "id": "507f1f77bcf86cd799439011",
        "organization": {},
        "device": {},
        "type": "doc",
        "source": "conversation",
        "chunkType": "none",
        "exportedBy": "507f1f77bcf86cd799439011",
        "tags": [
          {}
        ],
        "emails": [
          "jane.doe@example.com"
        ],
        "caseFileIds": [
          "507f1f77bcf86cd799439015"
        ],
        "fileName": "doe-v-example-export.pdf",
        "file": {
          "createdAt": "2026-01-15T14:30:00.000Z",
          "updatedAt": "2026-01-15T14:30:00.000Z",
          "id": "507f1f77bcf86cd799439011",
          "name": "photo.heic",
          "providerId": "uploads/507f1f77bcf86cd799439011/photo.heic",
          "convertedName": "photo.jpg",
          "convertedProviderId": "uploads/507f1f77bcf86cd799439011/photo.jpg",
          "provider": "s3",
          "size": 204800,
          "transferState": 42.0
        },
        "sortBy": "old-to-new",
        "size": 1048576,
        "errorMessage": "string",
        "totalMessages": 1200,
        "messagesProcessed": 600,
        "totalConversations": 12,
        "conversationsProcessed": 6,
        "status": "not-started",
        "jobId": "job-1234",
        "totalJobs": 1,
        "emailData": [
          [
            {}
          ]
        ],
        "metadata": {},
        "failedThreadsCount": 0,
        "cmpSyncStatus": "pending",
        "progress": 100,
        "conversationNames": [
          "Jane Doe"
        ],
        "caseName": "Doe v. Example Corp"
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}