Record device activity (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 /device-activity-log

Desktop plumbing: records a device activity event (plugged in, backup started or finished, upload progress). A repeat of the same event within a short window is skipped.

application/json

Body Required

  • messageSelectionReport object
    Hide messageSelectionReport attributes Show messageSelectionReport attributes object
    • version number Required
    • uploadAttemptId string Required
    • phase object Required
    • platformImportAccepted boolean Required
    • coverage string Required
    • eligibleScope string Required
    • conversations array[object] Required
      Hide conversations attributes Show conversations attributes object
      • app string Required

        Values are message, whatsapp, voicemail, call_log, facebook_dump, instagram_dump, or threads_dump.

      • conversationId number Required
      • mode string Required
      • selectedMessageCount number Required
      • eligibleMessageCount number | null Required
      • includedMessageCount number Required
      • omittedEligibleMessageCount number | null Required
      • selectedNotIncludedCount number Required
      • totalMessageCount number | null
  • systemId string Required
  • deviceId string Required
  • deviceType string Required

    Values are unknown, android, ios, facebook_dump, instagram_dump, threads_dump, or email.

  • type string Required

    Values are plugged-in, unplugged, backup-started, backup-completed, backup-failed, resync-started, resync-completed, resync-failed, conversation-upload-started, conversation-upload-completed, conversation-upload-failed, conversation-search, device-hash-saved, device-hash-matched, device-hash-not-matched, device-backup-deleted, case-export, conversation-added-to-case, conversation-removed-from-case, device-message-added-to-collection, device-message-removed-from-collection, comment-added-to-device-message, comment-removed-from-device-message, tag-added-to-device-message, tag-removed-from-device-message, device-backup-created, or conversation-uploaded.

  • date string Required

    ISO date string

  • conversationNames array[string] Required

    Required if type is either conversation-upload-completed or conversation-upload-started

  • appVersion string Required

    App version

  • organizationId string
  • deviceMetadata object
  • backupMetadata object
  • extractionCode string
  • caseId string
  • osDetails object
    Hide osDetails attributes Show osDetails attributes object
    • arch string
    • platform string
    • version string
    • osType string
    • machine string
    • totalMemory number
    • cpus object Required
    • extraInformation object Required
  • addImmediate boolean
  • failedReason string
  • telemetryV2 boolean

    Set by app builds that already send the structured (v2) telemetry event for this activity, so the legacy activity-log translation is skipped and the activity is not recorded twice.

Responses

  • 201 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • message string Required
      • isSuccess boolean Required
    • statusCode number Required
    • timestamp string(date-time) Required
POST /device-activity-log
curl \
 --request POST 'http://api.example.com/device-activity-log' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "messageSelectionReport": {
    "version": 42.0,
    "uploadAttemptId": "string",
    "phase": {},
    "platformImportAccepted": true,
    "coverage": "string",
    "eligibleScope": "string",
    "conversations": [
      {
        "app": "message",
        "conversationId": 42.0,
        "mode": "string",
        "selectedMessageCount": 42.0,
        "eligibleMessageCount": 42.0,
        "includedMessageCount": 42.0,
        "omittedEligibleMessageCount": 42.0,
        "selectedNotIncludedCount": 42.0,
        "totalMessageCount": 42.0
      }
    ]
  },
  "systemId": "string",
  "deviceId": "string",
  "deviceType": "unknown",
  "type": "plugged-in",
  "date": "string",
  "conversationNames": [
    "string"
  ],
  "appVersion": "string",
  "organizationId": "string",
  "deviceMetadata": {},
  "backupMetadata": {},
  "extractionCode": "string",
  "caseId": "string",
  "osDetails": {
    "arch": "string",
    "platform": "string",
    "version": "string",
    "osType": "string",
    "machine": "string",
    "totalMemory": 42.0,
    "cpus": {},
    "extraInformation": {}
  },
  "addImmediate": true,
  "failedReason": "string",
  "telemetryV2": true
}'
Request examples
{
  "messageSelectionReport": {
    "version": 42.0,
    "uploadAttemptId": "string",
    "phase": {},
    "platformImportAccepted": true,
    "coverage": "string",
    "eligibleScope": "string",
    "conversations": [
      {
        "app": "message",
        "conversationId": 42.0,
        "mode": "string",
        "selectedMessageCount": 42.0,
        "eligibleMessageCount": 42.0,
        "includedMessageCount": 42.0,
        "omittedEligibleMessageCount": 42.0,
        "selectedNotIncludedCount": 42.0,
        "totalMessageCount": 42.0
      }
    ]
  },
  "systemId": "string",
  "deviceId": "string",
  "deviceType": "unknown",
  "type": "plugged-in",
  "date": "string",
  "conversationNames": [
    "string"
  ],
  "appVersion": "string",
  "organizationId": "string",
  "deviceMetadata": {},
  "backupMetadata": {},
  "extractionCode": "string",
  "caseId": "string",
  "osDetails": {
    "arch": "string",
    "platform": "string",
    "version": "string",
    "osType": "string",
    "machine": "string",
    "totalMemory": 42.0,
    "cpus": {},
    "extraInformation": {}
  },
  "addImmediate": true,
  "failedReason": "string",
  "telemetryV2": true
}
Response examples (201)
{
  "data": {
    "message": "Done",
    "isSuccess": true
  },
  "statusCode": 201,
  "timestamp": "2026-01-15T10:15:00.000Z"
}