Request a zip of conversation attachments

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

Queues a zip of the attachments in the given conversations. The job runs in the background; listen on the case socket or poll GET /case/:caseId/export for the file.

Headers

  • organization string Required

    id of the selected (active) organization

Path parameters

  • caseId string Required

    Id of the case

application/json

Body Required

  • conversationIds array[array] 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
      • 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
POST /case/{caseId}/download-attachments
curl \
 --request POST 'http://api.example.com/case/{caseId}/download-attachments' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "organization: string" \
 --data '{
  "conversationIds": [
    []
  ]
}'
Request examples
# Headers
organization: string

# Payload
{
  "conversationIds": [
    []
  ]
}
Response examples (200)
{
  "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"
}