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

# Give every prospect their own personal link

> Make each prospect's own Darwin personal link with the API and store it on their CRM record, so any email or sequence can greet them by name.

Put each prospect's own [personal link](https://www.meetdarwin.ai/help/conversion-studio/personal-links) on their CRM record, so any email or sequence can use it. When they click, the chat greets them by name and the agent knows who they are.

**You need:** a key with `agent:read`, and a personal link that has a greeting (**Conversion Studio → Links**, or `POST /v1/personal_links`). Its id, `lk_…`, is in `GET /v1/personal_links`.

```javascript personal-links.mjs theme={null}
const API = "https://api.meetdarwin.ai/v1";
const headers = { Authorization: `Bearer ${process.env.DARWIN_API_KEY}`, "Content-Type": "application/json" };
const LINK = process.env.DARWIN_LINK_ID; // lk_...

export async function addPersonalLinks(prospects, crm) {
  // Up to 1,000 people per call; addresses come back in the same order.
  for (let i = 0; i < prospects.length; i += 1000) {
    const batch = prospects.slice(i, i + 1000);
    const res = await fetch(`${API}/personal_links/${LINK}/urls`, {
      method: "POST",
      headers,
      body: JSON.stringify({
        people: batch.map((p) => ({
          email: p.email,
          first_name: p.firstName,
          last_name: p.lastName,
          company: p.company,
          title: p.jobTitle,
          external_id: p.crmId, // returned with the address
        })),
      }),
    });
    if (!res.ok) throw new Error(`Darwin ${res.status}: ${(await res.json()).detail}`);
    for (const made of (await res.json()).data) {
      await crm.updatePerson(made.external_id, { darwin_link: made.url });
      if (made.dropped.length) console.warn(made.external_id, "details left out:", made.dropped);
    }
  }
}
```

Each address carries the person's details already filled in and encoded, so an email such as `jane+q4@acme.com` or a company such as `Smith & Sons` arrives intact. Nothing is stored in Darwin until someone clicks; then they become a contact, like a form submission.

* `greeting` in each result is what the chat will say to that person, and `missing` names the details their greeting uses but they lack. Check a few before a large send.
* A change to the link's greeting reaches every address you already made, because the greeting is looked up by the link's id.
* No code: Zapier's **Create Personal Link URL** action does the same for one person per run, for example when a contact enters a HubSpot list. See [Connect Zapier](https://www.meetdarwin.ai/help/crm-and-automation/zapier).

**It worked if** opening one of the addresses on your live site shows that person's greeting in the chat, and `GET /v1/link_visits?link=lk_…` lists the visit.


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