Start a LinkedIn import (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 /linkedin/{caseId}/import

Creates an import job for an uploaded LinkedIn data export file (optionally limited to some data types or conversations), marks the case's LinkedIn data source as pending, and queues the import (201). If the file was already imported into this case, the request either fails with 400 or, when incremental re-import is enabled and it would add nothing new, returns 200 with imported set to false and no job created. Not available to opposing counsel.

Path parameters

  • caseId string Required
application/json

Body Required

  • fileId string Required

    UserFile ID of the uploaded zip

  • extractionCode string

    Extraction code string (optional)

  • selectedDataTypes array[string]

    Selected data types to import (optional)

  • selectedConversationIds array[string]

    Specific conversation IDs to import (omit to import all)

Responses

  • 200 application/json

    The selected data has already been imported; no job was created

    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • imported boolean Required

        Always false for a no-op

        Value is false.

      • message string Required
    • statusCode number Required
    • timestamp string(date-time) Required
  • 201 application/json

    Import job created and queued

    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
      • case object | null Required

        Not loaded by any route, so always null.

      • extractionCode object | null Required

        Not loaded by any route, so always null.

      • file object | null Required

        Not loaded by any route, so always null.

      • createdBy object | null Required

        Not loaded by any route, so always null.

      • status string Required

        Values are not_started, in_progress, completed, or failed.

      • startedAt string(date-time) | null Required
      • completedAt string(date-time) | null Required
      • failedAt string(date-time) | null Required
      • message string | null Required
      • linkedInUserProvider object | null Required

        Not loaded by any route, so always null.

      • selectedDataTypes array[string] Required
      • selectedConversationIds array[string] Required

        LinkedIn conversation ids the import was limited to; empty means all conversations.

      • stats object Required
    • statusCode number Required
    • timestamp string(date-time) Required
POST /linkedin/{caseId}/import
curl \
 --request POST 'http://api.example.com/linkedin/{caseId}/import' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "fileId": "string",
  "extractionCode": "string",
  "selectedDataTypes": [
    "string"
  ],
  "selectedConversationIds": [
    "string"
  ]
}'
Request examples
{
  "fileId": "string",
  "extractionCode": "string",
  "selectedDataTypes": [
    "string"
  ],
  "selectedConversationIds": [
    "string"
  ]
}
Response examples (200)
{
  "data": {
    "imported": false,
    "message": "string"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}
Response examples (201)
{
  "data": {
    "createdAt": "2026-01-15T14:30:00.000Z",
    "updatedAt": "2026-01-15T14:30:00.000Z",
    "id": "507f1f77bcf86cd799439011",
    "case": {},
    "extractionCode": {},
    "file": {},
    "createdBy": {},
    "status": "not_started",
    "startedAt": "2026-01-15T14:25:00.000Z",
    "completedAt": "2026-01-15T14:30:00.000Z",
    "failedAt": "2026-05-04T09:42:00Z",
    "message": "Import failed",
    "linkedInUserProvider": {},
    "selectedDataTypes": [
      "messages",
      "connections"
    ],
    "selectedConversationIds": [
      "2-ZGVmYXVsdA=="
    ],
    "stats": {
      "conversations": 14,
      "messages": 320,
      "connections": 250,
      "comments": 12,
      "richMedia": 3,
      "savedItems": 5,
      "savedJobAlerts": 1,
      "savedJobs": 2,
      "jobApplications": 4
    }
  },
  "statusCode": 201,
  "timestamp": "2026-01-15T10:15:00.000Z"
}