Skip to main content
POST
Import Leads from CRM
Only a campaign that is not linked to a CRM filter yet can be linked. To change or unlink a campaign’s CRM filter, use the lemlist app.
On a paused, archived or CRM-sync-paused campaign, the filter is linked but no lead is imported until that is lifted; the first import then starts about an hour later. The response then carries importPending: true and the reason.
Get the filter ID from Get CRM Filters.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

campaignId
string
required

The unique identifier of the campaign

Body

application/json
filterId
required

Filter ID returned by Get CRM Filters

filterType
enum<string>

Salesforce only: lead or contact list views, or report. Ignored by HubSpot and Pipedrive. Defaults to lead when your Salesforce connection allows Leads, contact otherwise.

Available options:
lead,
contact,
report
userId
string

Salesforce only, for a list view scoped to its owner ("My leads", "My contacts"…): the team member the view is read as. They must have their own Salesforce account connected in lemlist. Leave it out in every other case (reports, views not scoped to an owner); it is ignored for HubSpot and Pipedrive, where your team's CRM connection is used.

deduplicate

all (or true) skips contacts already in another campaign, activeOnly skips only contacts still active in another campaign, off (or false, the default) imports everyone.

enrichFeature

Enrichments to run on every imported lead, as an array or a |-separated string (e.g. find_email|verify). Consumes credits for each lead.

Available options:
find_email,
find_phone,
verify,
linkedin_enrichment

Response

The campaign is linked to the filter; the import runs in the background, or waits until reason is lifted when importPending is true.

ok
boolean
importPending
boolean

Present and true when no lead is imported yet: the campaign is in a state the import waits on, named by reason.

reason
enum<string>

Present with importPending. campaign_paused: resume the campaign. campaign_archived: unarchive then resume it. campaign_crm_sync_paused: fix the cause shown in the campaign's import history in lemlist. The first import starts about an hour after that.

Available options:
campaign_paused,
campaign_archived,
campaign_crm_sync_paused