Skip to main content
Use this API to persist LinkedIn network audit snapshots and fetch KPI deltas for operator monitoring.

Endpoints

  • POST /api/network-ops/linkedin/snapshots
  • GET /api/network-ops/linkedin/summary

Create snapshot

POST /api/network-ops/linkedin/snapshots stores one audit snapshot and returns the stored snapshot payload. Behavior:
  • Returns 201 on success.
  • Validates summary.keep_count + summary.cut_count == summary.parsed_contacts.
  • Returns 400 when summary counts are inconsistent.
  • Returns 422 when request validation fails.
Request example:
{
  "source": "connections",
  "raw_text": "Member's name ...",
  "summary": {
    "parsed_contacts": 120,
    "keep_count": 78,
    "cut_count": 42,
    "keep_rate_pct": 65
  },
  "builder_count": 35,
  "buyer_count": 24,
  "amplifier_count": 19,
  "top_engage_queue": [
    {
      "name": "Jane Doe",
      "occupation": "VP Data Platform",
      "score": 92,
      "tags": ["buyer", "amplifier"],
      "reasons": ["Strong ICP match", "High distribution potential"],
      "engage_priority": 95
    }
  ],
  "proposed_cuts": [
    {
      "name": "John Smith",
      "occupation": "Unrelated domain",
      "score": 22,
      "tags": [],
      "reasons": ["Low strategic fit"],
      "engage_priority": null
    }
  ],
  "topic_map": [
    {
      "key": "ai-data-leadership",
      "label": "AI/Data Leadership",
      "count": 18,
      "examples": ["Head of Data", "AI Platform Lead"]
    }
  ],
  "gap_report": [
    {
      "key": "ecom-operator",
      "label": "Ecommerce Operators",
      "current": 3,
      "target": 15,
      "missing": 12,
      "priority": "high",
      "recommendation": "Add 3-5 ecommerce operators each week."
    }
  ]
}
Response example (201):
{
  "id": "8b0f4b20a1cd",
  "source": "connections",
  "parsed_contacts": 120,
  "keep_count": 78,
  "cut_count": 42,
  "keep_rate_pct": 65,
  "builder_count": 35,
  "buyer_count": 24,
  "amplifier_count": 19,
  "created_at": "2026-02-18T11:02:33.456789+00:00",
  "top_engage_queue": [
    {
      "name": "Jane Doe",
      "occupation": "VP Data Platform",
      "score": 92,
      "tags": ["buyer", "amplifier"],
      "reasons": ["Strong ICP match", "High distribution potential"],
      "engage_priority": 95
    }
  ],
  "proposed_cuts": [
    {
      "name": "John Smith",
      "occupation": "Unrelated domain",
      "score": 22,
      "tags": [],
      "reasons": ["Low strategic fit"],
      "engage_priority": null
    }
  ],
  "topic_map": [
    {
      "key": "ai-data-leadership",
      "label": "AI/Data Leadership",
      "count": 18,
      "examples": ["Head of Data", "AI Platform Lead"]
    }
  ],
  "gap_report": [
    {
      "key": "ecom-operator",
      "label": "Ecommerce Operators",
      "current": 3,
      "target": 15,
      "missing": 12,
      "priority": "high",
      "recommendation": "Add 3-5 ecommerce operators each week."
    }
  ]
}

Get summary

GET /api/network-ops/linkedin/summary returns latest and previous snapshots, plus deterministic KPI deltas. Response shape:
  • latest_snapshot: most recent snapshot summary or null
  • previous_snapshot: previous snapshot summary or null
  • delta: latest - previous for tracked metrics, or null
  • total_snapshots: total stored snapshots
Response example:
{
  "latest_snapshot": {
    "id": "8b0f4b20a1cd",
    "source": "connections",
    "parsed_contacts": 120,
    "keep_count": 78,
    "cut_count": 42,
    "keep_rate_pct": 65,
    "builder_count": 35,
    "buyer_count": 24,
    "amplifier_count": 19,
    "created_at": "2026-02-18T11:02:33.456789+00:00"
  },
  "previous_snapshot": {
    "id": "d0c5f8f8123a",
    "source": "connections",
    "parsed_contacts": 110,
    "keep_count": 70,
    "cut_count": 40,
    "keep_rate_pct": 64,
    "builder_count": 31,
    "buyer_count": 22,
    "amplifier_count": 17,
    "created_at": "2026-02-11T10:01:20.123456+00:00"
  },
  "delta": {
    "parsed_contacts": 10,
    "keep_count": 8,
    "cut_count": 2,
    "keep_rate_pct": 1,
    "builder_count": 4,
    "buyer_count": 2,
    "amplifier_count": 2
  },
  "total_snapshots": 2
}

UI mapping

  • Save snapshot in /linkedin-network calls POST /api/network-ops/linkedin/snapshots.
  • /monitor LinkedIn KPI card calls GET /api/network-ops/linkedin/summary.