How to connect LinkedIn leads to a custom dashboard via API

Pull lead status and reply intent from your LinkedIn outreach into a dashboard you control, using a REST API or an MCP server, with setup steps and code.

Get started

Short answer

Connect LinkedIn leads to a dashboard by pulling your lead and reply data from the tool you send from, which exposes a REST API or an MCP server, then storing it in your own database or board. There is no self-serve LinkedIn endpoint for your own messages and invitations, so the sending tool is where the data lives.

Decide which lead data belongs on the dashboard

Most first dashboards copy the inbox: every message, every profile, every tag. That view shows you what you already saw on LinkedIn. Build the board around movement instead. The question it should answer is where people stop moving.

Four fields cover almost every question a founder or manager asks about a LinkedIn pipeline. Status says whether the lead is still pending, connected, or has replied. Reply intent says whether the reply deserves a human's morning. Source says which list the lead came from, whether that was an imported CSV, a competitor's commenters, or a saved search. Last touch says who has gone quiet.

Add an owner column once more than one person sends from the same workspace. Without it, two reps message the same person and the board hides the collision instead of showing it.

Leave out what you can't act on: job title, company size, the full text of every message. You can pull the text when you need it. On the board it takes space a decision should have.

Status

Field
Pending invite, connected, replied, withdrawn
What it shows
Spot a stuck invite pool before it slows sending

Reply intent

Field
Interested, question, not now, not a fit
What it shows
Sort the inbox and set the alert threshold

Source

Field
The list or search the lead came from
What it shows
Compare lists and drop the weak ones

Last touch

Field
Date and type of the last message
What it shows
Flag anything quiet for more than a week

Owner

Field
The account that sent the message
What it shows
Stop two reps working the same person

Choose between a REST API and an MCP server

Both routes read the same records. The difference is where the data lands and who reads it.

A REST API suits a board that stays open on a second screen. Your script calls the endpoint on a schedule, writes the records into Postgres, Airtable or a sheet, and the board reads from there. You own the layout, the history and the permissions.

An MCP server suits questions. You connect it to Claude, ChatGPT, Cursor or another MCP client, and the model calls the tool when you ask something. There is no frontend to maintain and no database to keep alive. The answers arrive in a chat window, which works for you and is useless on a wall display.

Some teams run both: REST for the shared board, MCP for the founder who wants to ask about a list mid-call.

Vague prompt

  • Show me my leads.
  • Any replies today?

Prompt with the fields in it

  • Which leads from the Northwind competitor list replied with interest this week?
  • List connected leads with no message sent in the last 7 days.
  • Show replies that asked about pricing on the Acme campaign.

Create the API key and keep it out of the repo

You can't point a dashboard at LinkedIn directly. The key comes from the tool you send from, and it's the only thing standing between your lead list and anyone who finds it in a public repository.

  1. 1

    Name the key after its job

    Create a key called dashboard-read in your provider settings. When one leaks or a contractor leaves, you revoke one key instead of rotating everything.

  2. 2

    Store it in the environment

    Put the key in a .env file or your host's secret manager. A key pasted into a front-end bundle is public the moment the page loads.

  3. 3

    Send it as a header

    Most providers expect Authorization: Bearer with the key. Send it on every request and keep it out of query strings, which end up in logs.

  4. 4

    Test with one read

    Run a single GET for leads before you build anything. JSON back means the key works. A 401 means the header name or the key is wrong, not your code.

Ask for a read-only key if the provider offers scopes. A dashboard never needs to send a message, and read-only limits the damage if the key leaks.

Write the pull that fills the board

The script should do one thing: fetch everything that changed since the last run and upsert it. Upserts matter because lead records change. A pending invite becomes a connection, and a connection becomes a reply with an intent label.

Keep the raw JSON next to the parsed columns for the first month. When a field turns out to mean something other than you assumed, and intent labels often do, you can rebuild the board without pulling everything again.

  • Store a last_seen timestamp so withdrawn invitations and deleted leads can drop off the board.
  • Run the pull from a scheduler, not from the browser tab that shows the board.
  • Log the row count of every run. A pull that silently returns nothing looks exactly like a quiet week.

Paste this job

# cron: every 15 minutes
import os, sqlite3, requests

BASE = 'https://api.your-provider.com/v1'
HEAD = {'Authorization': 'Bearer ' + os.environ['LEAD_API_KEY']}

def pull(path, since):
    cursor = None
    while True:
        r = requests.get(BASE + path, headers=HEAD,
                         params={'updated_since': since, 'cursor': cursor})
        r.raise_for_status()
        body = r.json()
        for row in body['data']:
            yield row
        cursor = body.get('next_cursor')
        if not cursor:
            break

db = sqlite3.connect('leads.db')
sql = ('insert into leads (id,status,intent,source,last_touch,raw) '
       'values (?,?,?,?,?,?) on conflict(id) do update set '
       'status=excluded.status, intent=excluded.intent, raw=excluded.raw')
for lead in pull('/leads', '2025-01-01T00:00:00Z'):
    db.execute(sql, (lead['id'], lead['status'], lead.get('intent'),
                     lead['source'], lead['last_touch'], str(lead)))
db.commit()

Filter replies by intent before they reach the board

Raw replies contain a lot of thanks for connecting. If those sit in the same column as people asking about price, nobody trusts the board after the second week.

Classify first, then display. Pull the reply text and the intent field together, and keep the text next to the label so a human can check the call. Anything marked uncertain belongs in a review column, not in the bin.

  • Store the post URL, what the post was about and the comment itself when the lead came from a competitor's post. The first message usually references it.
  • Keep not now and not a fit as separate labels. One is worth a follow-up in three months and the other isn't.

Example

  1. You

    Priya, you commented on Northwind's post about warehouse onboarding. We make the scheduling layer for that. Open to 15 minutes this week?

  2. Prospect

    Possibly. We're comparing three vendors and I need pricing for a 20-person team before I take a call.

  3. You

    Sending the pricing sheet now. If the range works, I'll hold Thursday 10am.

Keep the dashboard honest about the data

A board that shows only interested replies will make the pipeline look healthier than it is. Put the whole funnel on one screen: invitations sent, invitations accepted, replies, positive replies. The gaps between those numbers are the information.

Data arrives at the speed the sending account works. Invitations and messages are paced on purpose, so a 15 or 30 minute refresh is plenty. Polling every few seconds burns rate limit and makes the board flicker while you read it.

Write one line per status in the board's footer. Half of the arguments about pipeline numbers are arguments about definitions, and the footer ends them before they start.

Decide who sees what before you invite the team. Reply text is a customer conversation. A shared board with everyone's replies on it is convenient right up until someone screenshots it.

If a number on the board can't be traced back to a lead record, delete the number.

Doing this with Kinlead

Kinlead exposes a REST Agent API and an MCP server, so the pull above maps onto its endpoints. Chat clients connect with OAuth and scripts use API keys. Leads sit in lead groups with a 0 to 100 score against the profile you described, and replies from every campaign land in one inbox classified by intent, interested first.

There is no CRM sync and no outbound webhooks, so you schedule the pull yourself, the same as with any provider. If you would rather ask questions than build a board, connect the MCP server to Claude or ChatGPT and query leads and replies directly. Setup is on the agent API and MCP page.

Frequently asked questions

Related

Get started with Kinlead

Prefer markdown? How to connect LinkedIn leads to a custom dashboard via API.md