Get collection funnel and lifecycle stats (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
GET /admin/collection-ops/stats

Returns stats for collections created in a date range (default the last 30 days, at most 366; 400 when from is not before to), optionally for one organization: cohort size and completion rate, lifecycle times, the stage funnel, median time in each stage, phone-only portal logins, requested-source progress and current open inbox items by reason. Super admin only; 404 while the collection-ops console is turned off.

Query parameters

  • from string(date-time)
  • to string(date-time)
  • orgId string

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • from string(date-time)
      • to string(date-time)
      • cohortSize number
      • completed number
      • completionRate number | null
      • lifecycle object
        Hide lifecycle attributes Show lifecycle attributes object
        • avgMs number | null
        • medianMs number | null
      • funnel array[object]
        Hide funnel attributes Show funnel attributes object
        • stage string
        • tracked boolean
        • count number | null
        • drop number | null
      • medianTimeInStage array[object]
        Hide medianTimeInStage attributes Show medianTimeInStage attributes object
        • from string
        • to string
        • medianMs number | null
        • samples number
        • longest boolean
      • phoneOnlyPortalLogins number
      • sourcesRequested number
      • sourcesCompleted number
      • codesWithRequestedSources number
      • fullyCompleted number
      • fullCompletionRate number | null
      • bySourceType array[object]
        Hide bySourceType attributes Show bySourceType attributes object
        • sourceType string
        • requested number
        • completed number
      • needsAttention object

        Open inbox items now, not limited to the date range

        Hide needsAttention attributes Show needsAttention attributes object
        • total number
        • byReason object
          Hide byReason attribute Show byReason attribute object
          • * number Additional properties
      • truncated boolean

        The cohort hit the 50,000-row cap

    • statusCode number Required
    • timestamp string(date-time) Required
GET /admin/collection-ops/stats
curl \
 --request GET 'http://api.example.com/admin/collection-ops/stats' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "from": "2026-05-04T09:42:00Z",
    "to": "2026-05-04T09:42:00Z",
    "cohortSize": 120,
    "completed": 96,
    "completionRate": 0.8,
    "lifecycle": {
      "avgMs": 42.0,
      "medianMs": 42.0
    },
    "funnel": [
      {
        "stage": "string",
        "tracked": true,
        "count": 42.0,
        "drop": 42.0
      }
    ],
    "medianTimeInStage": [
      {
        "from": "string",
        "to": "string",
        "medianMs": 42.0,
        "samples": 42.0,
        "longest": true
      }
    ],
    "phoneOnlyPortalLogins": 42.0,
    "sourcesRequested": 42.0,
    "sourcesCompleted": 42.0,
    "codesWithRequestedSources": 42.0,
    "fullyCompleted": 42.0,
    "fullCompletionRate": 42.0,
    "bySourceType": [
      {
        "sourceType": "string",
        "requested": 42.0,
        "completed": 42.0
      }
    ],
    "needsAttention": {
      "total": 9,
      "byReason": {
        "backup_failed": 4,
        "went_silent": 5
      }
    },
    "truncated": true
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}