Leads
Search, view, and import leads.
Tools (7)
Section titled “Tools (7)”search_leads
Section titled “search_leads”Full name: campaignstack_search_leads
Search leads in a workspace by name, email, LinkedIn URL or company. Returns paginated results; follow nextCursor for the next page. Omit query and companyId to page through every lead. Covers both shared leads and workspace-private (CSV-imported) ones. Platform presence (LinkedIn URL, follower counts, and so on) is under each lead’s profiles key (e.g. profiles.linkedin.url); the top-level linkedInUrl is a legacy alias. Use returned leadId values with campaignstack_get_lead or campaignstack_add_leads_to_list. Call this when the user names a person, company, or LinkedIn URL to find. It does not return ICP fit or job positions: campaignstack_get_lead does, once you have a leadId. Results are one page. When pagination reports more, say so rather than presenting the page as the whole set, and page through before counting anything.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach. |
query | string | No | — | A person’s name, an email address, or a LinkedIn profile URL. Job titles are not searchable here. |
companyId | string | No | — | |
limit | integer | No | 20 | (min: 1, max: 100) |
cursor | string | No | — |
get_lead
Section titled “get_lead”Full name: campaignstack_get_lead
Get a lead by ID with full details including company information and ICP scores. Accepts shared lead IDs and private (workspace-scoped, CSV-imported) lead IDs; the response’s leadSource field says which one was found. Platform presence is under the profiles key (e.g. profiles.linkedin.url, followerCount, bio); top-level fields like linkedInUrl are legacy aliases. currentRoles lists every position the lead holds right now (a person can work at several companies at once), profile order, main role first; company is the one that role binds to. The watch key carries the workspace’s intelligence post watch on this lead (id, status, post count) when one exists. Call this once you have a leadId, typically from campaignstack_search_leads, and need the full record. It does not search by name: campaignstack_search_leads does that.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
leadId | string | Yes | — | (min length: 1) |
import_leads_csv
Section titled “import_leads_csv”Full name: campaignstack_import_leads_csv
Import leads from CSV data. Provide raw CSV content and optional column mapping. If no mapping is provided, columns are auto-mapped based on header names. After import, use campaignstack_search_leads to verify imported leads, or campaignstack_add_leads_to_list to add them to a campaign. Call this when the user hands over a CSV of contacts. Rows land as workspace-private leads, not the shared pool. It does not enroll anyone in outreach on its own.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach. |
csvData | string | Yes | — | (min length: 1) |
mapping | object | No | — |
update_lead_metadata
Section titled “update_lead_metadata”Full name: campaignstack_update_lead_metadata
Update user-level metadata (notes and tags) on a lead. Only provided fields are updated. Use campaignstack_search_leads or campaignstack_get_lead to find lead IDs. Call this when the user wants to leave a note or tag on a lead already found. It does not change contact info: campaignstack_update_lead_contact_info does that.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach. |
leadId | string | Yes | — | (min length: 1) |
notes | string | No | — | |
tags | string[] | No | — |
update_lead_contact_info
Section titled “update_lead_contact_info”Full name: campaignstack_update_lead_contact_info
Save extracted contact information (email, phone, website) to a lead. Called by the linkedin-contact-info agent after extracting data from LinkedIn’s Contact Info overlay. Only provided fields are updated; omitted fields are left unchanged. Call this after that agent reads the overlay, or when the user supplies contact details by hand. It does not look the lead up by name: campaignstack_search_leads does that first.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach. |
leadId | string | Yes | — | (min length: 1) |
email | string | No | — | |
phone | string | No | — | |
website | string | No | — |
link_lead_profile
Section titled “link_lead_profile”Full name: campaignstack_link_lead_profile
Attach a platform profile (LinkedIn or X) to an existing PRIVATE lead so one person is recognised across sources. Provide at least one of url, externalId, or handle. Fails with PROFILE_ALREADY_LINKED if the profile is attached to a different lead. API-key callers may only link profiles on private (workspace-scoped) leads. Global leads are read-only for user-supplied data. An X profile is recognition only: there are no X accounts to send from and no X actions, so linking one never makes the person reachable on X. Only LinkedIn linking affects who can be contacted. See campaignstack_explain_capabilities with topic platforms. Call this when a private lead is the same person known under a different profile. It does not merge two leads: campaignstack_unlink_lead_profile is the reverse move.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach. |
leadId | string | Yes | — | Private lead id (API-key callers may only link on private leads) (min length: 1) |
platform | linkedin | x | Yes | — | Platform of the profile being linked |
url | string | No | — | Profile URL (e.g. https://linkedin.com/in/jane or https://x.com/jane) |
externalId | string | No | — | Platform-native external id |
handle | string | No | — | X handle (with or without @) |
unlink_lead_profile
Section titled “unlink_lead_profile”Full name: campaignstack_unlink_lead_profile
Detach a platform profile from a PRIVATE lead into a new standalone lead in the same workspace. Nothing collected about the person is deleted; the profile row is repointed at the new lead. Returns the new lead’s id. API-key callers may only unlink on private leads. Call this when a linked profile actually belongs to a different person. It does not delete anything: campaignstack_link_lead_profile is the reverse move.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach. |
leadId | string | Yes | — | Private lead id currently holding the profile (min length: 1) |
platform | linkedin | x | Yes | — | Platform of the profile being detached |