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, company, or other criteria. Returns paginated results. Platform presence (LinkedIn URL, follower counts, …) 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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoDefaults to the API key’s workspace
querystringNo
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. Platform presence is under the profiles key (e.g. profiles.linkedin.url, followerCount, bio); top-level fields like linkedInUrl are legacy aliases. If the lead is not found, use campaignstack_search_leads to find valid lead IDs.

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoDefaults to the API key’s workspace
csvDatastringYes(min length: 1)
mappingobjectNo

Full name: campaignstack_update_lead_metadata

leads:write Idempotent

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoDefaults to the API key’s workspace
leadIdstringYes(min length: 1)
notesstringNo
tagsstring[]No

Full name: campaignstack_update_lead_contact_info

leads:write Idempotent

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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoDefaults to the API key’s workspace
leadIdstringYes(min length: 1)
emailstringNo
phonestringNo
websitestringNo

Full name: campaignstack_link_lead_profile

leads:write Idempotent

Attach a platform profile (LinkedIn or X) to an existing PRIVATE lead so one person is sequenceable across channels. 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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoDefaults to the API key’s workspace
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. Scraped data is never 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.

NameTypeRequiredDefaultDescription
workspaceIdstringNoDefaults to the API key’s workspace
leadIdstringYesPrivate lead id currently holding the profile (min length: 1)
platformlinkedin | xYesPlatform of the profile being detached