Skip to content

Leads

Search, view, and import leads.

Full name: campaignstack_search_leads

leads:read Read-only Idempotent

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoWorkspace 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.
querystringNoA person’s name, an email address, or a LinkedIn profile URL. Job titles are not searchable here.
companyIdstringNo
limitintegerNo20(min: 1, max: 100)
cursorstringNo

Full name: campaignstack_get_lead

leads:read Read-only Idempotent

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.

NameTypeRequiredDefaultDescription
leadIdstringYes(min length: 1)

Full name: campaignstack_import_leads_csv

leads:write

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoWorkspace 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.
csvDatastringYes(min length: 1)
mappingobjectNo

Full name: campaignstack_update_lead_metadata

leads:write

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoWorkspace 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.
leadIdstringYes(min length: 1)
notesstringNo
tagsstring[]No

Full name: campaignstack_update_lead_contact_info

leads:write

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoWorkspace 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.
leadIdstringYes(min length: 1)
emailstringNo
phonestringNo
websitestringNo

Full name: campaignstack_link_lead_profile

leads:write

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoWorkspace 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.
leadIdstringYesPrivate lead id (API-key callers may only link on private leads) (min length: 1)
platformlinkedin | xYesPlatform of the profile being linked
urlstringNoProfile URL (e.g. https://linkedin.com/in/jane or https://x.com/jane)
externalIdstringNoPlatform-native external id
handlestringNoX handle (with or without @)

Full name: campaignstack_unlink_lead_profile

leads:write

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoWorkspace 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.
leadIdstringYesPrivate lead id currently holding the profile (min length: 1)
platformlinkedin | xYesPlatform of the profile being detached