> ## Documentation Index
> Fetch the complete documentation index at: https://docs.introlink.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rank your target accounts

> Turn a list of companies into a queue: the accounts you can get a warm intro into first, each with its best path.

You have a list of accounts you want to reach. Put them on a company list in
IntroLink, ask for the paths into each one, and sort. The accounts with strong
paths come first, each with the person to start with.

| Step | MCP tool | REST |
| - | - | - |
| 1. Make a list of companies | (in IntroLink) | `POST /v1/lists` |
| 2. Add the accounts | (in IntroLink) | `POST /v1/lists/{list}/companies` |
| 3. The paths into each account | `company_paths` | `GET /v1/companies/{domain}/paths` |
| 4. Sort | the assistant does it | your script |

If your workspace has [Targets](https://docs.introlink.ai/public-api/targets.md), lists that a partner's
tracker fills each night, IntroLink ranks those for you: skip to
[Targets, ranked for you](#targets-ranked-for-you).

> [!NOTE]
>
> The calls below ran against IntroLink's preview workspace: Pat Preview's
> made-up network and made-up firms. Ids are shortened.

## With an assistant

Name the accounts:

> Rank these accounts by my best warm path: Keelhaven Equity, Harbor Lane
> Partners, Dunmore Equity, Fernhill Capital.

The assistant calls `company_paths` once for each account, and ranks them on
what comes back: how many people at each are reachable at Strong, Likely and
Long shot, and the best path. For a long list, use the REST API below and keep
the list in IntroLink, where your team can see it too.

## With the REST API

```bash theme={null}
export INTROLINK_API_KEY=il_live_…
API=https://app.introlink.ai/v1
```

### 1. Make a list of companies

```bash theme={null}
curl -s "$API/lists" -H "Authorization: Bearer $INTROLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q1 target accounts", "kind": "companies"}'
```

```json theme={null}
{
  "object": "list_creation",
  "created": true,
  "list": { "id": "1432087c-364e-4952-abca-8f0037522a71", "name": "Q1 target accounts", "description": null, "kind": "companies", "members": 0, "url": "https://app.introlink.ai/lists/1432087c-364e-4952-abca-8f0037522a71" },
  "text": "Made the list of companies \"Q1 target accounts\". POST /v1/lists/{list}/companies adds to it."
}
```

`201`. Sending it again answers `200` with the same list and
`"created": false`, so a script can run this every time.

```bash theme={null}
LIST=1432087c-364e-4952-abca-8f0037522a71
```

### 2. Add the accounts

Up to 50 a request. Each is a web domain (`keelhaven.com`), or a firm by name,
with its domain when you know it:

```bash theme={null}
curl -s "$API/lists/$LIST/companies" -H "Authorization: Bearer $INTROLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"companies": [{"name": "Keelhaven Equity"}, {"name": "Harbor Lane Partners"}, {"name": "Dunmore Equity"}, {"name": "Fernhill Capital"}]}'
```

```json theme={null}
{
  "object": "company_addition",
  "list": { "id": "1432087c-…", "name": "Q1 target accounts", "kind": "companies", "url": "…" },
  "added": 4,
  "data": [
    { "id": "keelhavenequity", "name": "Keelhaven Equity", "domain": null, "url": "…", "in_network": true },
    { "id": "harborlanepartners", "name": "Harbor Lane Partners", "domain": null, "url": "…", "in_network": true },
    { "id": "dunmoreequity", "name": "Dunmore Equity", "domain": null, "url": "…", "in_network": true },
    { "id": "fernhillcapital", "name": "Fernhill Capital", "domain": null, "url": "…", "in_network": false }
  ],
  "skipped": [],
  "text": "Added 4 companies to \"Q1 target accounts\": Keelhaven Equity, Harbor Lane Partners, Dunmore Equity, Fernhill Capital. One is a firm nobody in your network is at yet."
}
```

`in_network: false` is a firm nobody in your network is at yet. It stays on the
list, and shows people as soon as you come to know someone there. The list is
in IntroLink now, under Lists.

### 3. The paths into one account

```bash theme={null}
curl -s "$API/companies/Keelhaven%20Equity/paths?limit=1" -H "Authorization: Bearer $INTROLINK_API_KEY"
```

The company is its domain, its name, or its LinkedIn page:

```json theme={null}
{
  "object": "list",
  "company": { "name": "Keelhaven Equity", "url": "…" },
  "total": 3,
  "counts": { "strong": 1, "likely": 2, "long_shot": 0 },
  "matched": 3,
  "by_source": [{ "label": "Your network", "count": 3 }],
  "data": [
    {
      "id": "p_MyndDR…",
      "name": "Dana Reyes",
      "role": "Investor",
      "likelihood": "Strong",
      "source": "Your network",
      "sentence": "You know Dana Reyes, Investor, yourself.",
      "why": "You and Dana have 42 emails between you: 18 replies from Dana, 24 sent to Dana. You and Dana are connected on LinkedIn.",
      "text": "Dana Reyes, Investor. Strong: You know Dana Reyes, Investor, yourself. Why: …",
      "…": "…"
    }
  ],
  "text": "3 people at Keelhaven Equity are reachable through your side: 1 Strong, 2 Likely, 0 Long shot. …"
}
```

`counts` is how many people at the account your side can reach, by how likely
the intro is. `data` is those people, best path first.

### 4. Rank the list

This script reads the list, asks for the paths into each account, and sorts
by Strong, then Likely, then Long shot. Python 3.9 or later, no packages.

```python rank_accounts.py theme={null}
# rank_accounts.py: rank a company list by your best warm path into each account.
# Python 3.9 or later, no packages. Run: python rank_accounts.py <list id>
import json, os, sys, urllib.parse, urllib.request

API = os.environ.get("INTROLINK_API", "https://app.introlink.ai/v1")
KEY = os.environ["INTROLINK_API_KEY"]


def get(path):
    req = urllib.request.Request(API + path, headers={"Authorization": f"Bearer {KEY}"})
    with urllib.request.urlopen(req) as r:
        return json.load(r)


accounts = get(f"/lists/{sys.argv[1]}/companies?limit=1000")["data"]
queue = []
for a in accounts:
    company = urllib.parse.quote(a["domain"] or a["name"], safe="")
    paths = get(f"/companies/{company}/paths?limit=1")
    c = paths["counts"]
    queue.append(((c["strong"], c["likely"], c["long_shot"]), a["name"], paths))

for n, (_, name, paths) in enumerate(sorted(queue, key=lambda q: q[0], reverse=True), 1):
    c = paths["counts"]
    best = paths["data"][0]["text"] if paths["data"] else "No path yet."
    print(f"{n}. {name}: {c['strong']} Strong, {c['likely']} Likely, {c['long_shot']} Long shot")
    print(f"   {best}")
```

```bash theme={null}
python rank_accounts.py $LIST
```

```text theme={null}
1. Keelhaven Equity: 1 Strong, 2 Likely, 0 Long shot
   Dana Reyes, Investor. Strong: You know Dana Reyes, Investor, yourself. Why: You and Dana have 42 emails between you: 18 replies from Dana, 24 sent to Dana. You and Dana are connected on LinkedIn.
2. Harbor Lane Partners: 1 Strong, 0 Likely, 0 Long shot
   Priya Natarajan, Investor. Strong: You know Priya Natarajan, Investor, yourself. Why: You and Priya have 39 emails between you: 17 replies from Priya, 22 sent to Priya. You and Priya are connected on LinkedIn.
3. Dunmore Equity: 0 Strong, 1 Likely, 0 Long shot
   Ruth Calder, Partner. Likely: You know Ruth Calder, Partner, yourself. Why: You and Ruth have 24 emails between you: 10 replies from Ruth, 14 sent to Ruth. You and Ruth are connected on LinkedIn.
4. Fernhill Capital: 0 Strong, 0 Likely, 0 Long shot
   No path yet.
```

A key makes up to 60 requests a minute, so a long list takes a while: on a
`429`, wait the seconds `Retry-After` says
([Rate limits](https://docs.introlink.ai/public-api/conventions.md#rate-limits)). To go from an account to an ask, take
the person and follow [Find an intro, then draft the ask](https://docs.introlink.ai/recipes/find-an-intro.md).

## Targets, ranked for you

Some workspaces get two lists each night from a partner's tracker, one of
target people and one of their firms ([Targets](https://docs.introlink.ai/public-api/targets.md)). For
those, IntroLink does the ranking itself, with the people you don't know yet:
each path is scored on both legs, how well you know the person in the middle
and how they are tied to the target, and a path is as strong as its weaker leg.

| MCP tool | REST |
| - | - |
| `target_queue` | `GET /v1/targets` and `GET /v1/targets/{firm}` |

> Which of my target firms can I get a warm intro into?

```bash theme={null}
curl -s "$API/targets?limit=3" -H "Authorization: Bearer $INTROLINK_API_KEY"
```

```json theme={null}
{
  "object": "list",
  "band": "warm",
  "total": 7,
  "data": [
    {
      "id": "acct:keelhaven",
      "name": "Keelhaven Equity",
      "warm_band": "$2B to $10B",
      "place": 1,
      "warm_rank": 12,
      "people": 4,
      "at_high": 0,
      "at_medium": 3,
      "best_path": { "target": "Cy Moss", "target_linkedin_url": "https://www.linkedin.com/in/cy-moss-x", "via": "Dana Reyes", "score": 42, "strength": "Medium" },
      "opens": { "at_firm": 3, "at_other_firms": 0 },
      "after_meeting": null,
      "draft_ask_url": "https://app.introlink.ai/open?ask=p_TdZBqP…&via=p_MyndDR…",
      "url": "https://app.introlink.ai/companies/keelhaven.example",
      "text": "Keelhaven Equity (warm rank 12): Cy Moss, Head of Business Development, through a contact (Dana Reyes), 42, Medium. You know Dana Reyes (High, 42 emails with you). Dana Reyes and Cy Moss: Worked together at Keelhaven Equity, 2015 to 2026. Opens 3 at Keelhaven Equity. 4 targets: 0 with a path at High, 3 at Medium."
    },
    { "id": "acct:elmstead", "name": "Elmstead Growth", "place": 2, "…": "…" },
    { "id": "acct:ashgrove", "name": "Ashgrove Capital Partners", "place": 3, "…": "…" }
  ],
  "text": "…"
}
```

`place` is the queue's order. `warm_rank` and `warm_band` are the tracker's
own. `GET /v1/targets/keelhaven` lists one firm's people, best path first, with
both legs scored (`your_leg`, `their_leg`). `draft_ask_url` opens the composer
on that path.

More in [Lists](https://docs.introlink.ai/public-api/lists.md), [Targets](https://docs.introlink.ai/public-api/targets.md), the
[API overview](https://docs.introlink.ai/public-api/overview.md) and [The tools](https://docs.introlink.ai/mcp/tools.md)
(`company_paths`, `target_queue`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.