lemlist Leads API
Leads inside campaigns - create with optional enrichment, update, pause, resume, mark interested, custom variables, CRM import and unsubscribe.
Operations 22
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“How do I let a paused lead continue through the campaign sequence?”
“Can I unpause one lead without restarting the whole campaign?”
Tell an agent
Resume paused lead {leadId}.
Unpause lead {leadId} so their sequence continues.
Ask an LLM
“Can I stop sending to one lead while the campaign keeps running?”
“How do I pause a lead in only one specific campaign?”
Tell an agent
Pause lead {leadId}.
Pause lead {leadId} in campaign {campaignId} only.
POST
/leads/interested/{leadIdOrEmail}
Mark a lead interested in all campaigns · Mark a Lead as interested
#
Ask an LLM
“How do I flag a lead as interested across every campaign they're in?”
“Can I mark someone interested using just their email?”
Tell an agent
Mark {leadIdOrEmail} as interested everywhere.
Flag lead {leadIdOrEmail} as interested across all campaigns.
POST
/leads/notinterested/{leadIdOrEmail}
Mark a lead not interested in all campaigns · Mark a Lead as not interested
#
Ask an LLM
“How do I record that a prospect said no, across all campaigns?”
“Can I mark a lead as not interested by email address?”
Tell an agent
Mark {leadIdOrEmail} as not interested everywhere.
Flag lead {leadIdOrEmail} as not interested in all campaigns.
POST
/campaigns/{campaignId}/leads/{leadIdOrEmail}/interested
Mark a lead interested in one campaign · Mark a Lead as interested in one campaign
#
Ask an LLM
“Can I mark a lead interested in just one campaign and not the others?”
“How do I set interest for a lead within a single campaign?”
Tell an agent
Mark {leadIdOrEmail} as interested in campaign {campaignId} only.
In campaign {campaignId}, flag lead {leadIdOrEmail} as interested.
POST
/campaigns/{campaignId}/leads/{leadIdOrEmail}/notinterested
Mark a lead not interested in one campaign · Mark a Lead as not interested in one campaign
#
Ask an LLM
“Can I mark a lead not interested for one campaign while keeping them in others?”
“How do I record a campaign-specific rejection from a lead?”
Tell an agent
Record that {leadIdOrEmail} declined campaign {campaignId}, leaving their other campaigns untouched.
Lead {leadIdOrEmail} rejected our pitch in campaign {campaignId}; set them to not interested there.
Ask an LLM
“Which campaigns is a given email address enrolled in as a lead?”
“Can I fetch a lead's record by putting their email in the URL?”
Tell an agent
Find the lead whose email is {email}.
Get lead {email} using API version {version}.
Ask an LLM
“How do I retrieve a lead when I only have its lead id?”
“Can I search for a lead with an id or email query parameter?”
Tell an agent
Retrieve the lead with id {id}.
Query leads by email {email} with version {version}.
POST
/campaigns/{campaignId}/leads/{email}
Add a lead to a campaign by email in the path · Create Lead in a Campaign
#
Ask an LLM
“Can I add a lead to a campaign by putting their email in the URL?”
“Will deduplication skip a lead whose email is already in another campaign?”
Tell an agent
Add {email} to campaign {campaignId} as {firstName} {lastName} via the email-in-path endpoint.
Insert lead {email} into campaign {campaignId} with icebreaker {icebreaker}, deduplicate {deduplicate}.
DELETE
/campaigns/{campaignId}/leads/{email}
Unsubscribe one lead email from a campaign · Unsubscribe Lead from Campaign
#
Ask an LLM
“How do I take a single email address out of a campaign?”
“Can I unsubscribe one lead from a campaign by their email?”
Tell an agent destructive · confirm first
Unsubscribe {email} from campaign {campaignId}.
Remove lead email {email} from campaign {campaignId}'s sending.
PATCH
/campaigns/{campaignId}/leads/{leadId}
Update a lead's preferred contact method · Update Lead
#
Ask an LLM
“How do I change whether a lead is reached by email or phone in a campaign?”
“Can I update a lead's preferred contact channel?”
Tell an agent
Set lead {leadId} in campaign {campaignId} to prefer {preferredContactMethod}.
Update the campaign {campaignId} lead {leadId} contact method to {preferredContactMethod}.
Ask an LLM
“Can I delete a lead record from a campaign entirely using its lead id?”
“Is there a way to force-remove a lead from a campaign?”
Tell an agent destructive · confirm first
Delete lead {leadId} from campaign {campaignId}.
Force-delete lead {leadId} in campaign {campaignId} with action {action}.
Ask an LLM
“How do I add new personalization variables to a lead?”
“Can I attach a custom company variable to one lead for my templates?”
Tell an agent
Add the variable company={company} to lead {leadId}.
Add a preferredContactMethod variable of {preferredContactMethod} on lead {leadId}.
Ask an LLM
“How do I change the value of a variable already set on a lead?”
“Can I overwrite a lead's existing custom company value?”
Tell an agent
Change lead {leadId}'s existing company variable to {company}.
Update the favoriteColor variable on lead {leadId} to {favoriteColor}.
Ask an LLM
“Can I remove a personalization variable I no longer need from a lead?”
“How do I clear specific custom variables on one lead?”
Tell an agent destructive · confirm first
Delete the {company} variable from lead {leadId}.
Remove variable {favoriteColor} from lead {leadId}.
POST
/leads/audio
Upload a voice message audio for a lead · Upload an audio file to a voice message step
#
Ask an LLM
“How do I attach a recorded voice note to a lead's voice message step?”
“Can I upload a custom audio file for one lead in a sequence?”
Tell an agent
Upload this audio for lead {leadId} on voice step {stepId}.
Attach my recorded voice message to step {stepId} for lead {leadId}.
Ask an LLM
“Which saved CRM views or reports can I import leads from?”
“Can I list Salesforce report filters for importing into a campaign?”
Tell an agent
List the {crm} filters for connected user {userId}.
Show Salesforce filters of type {type}.
POST
/campaigns/{campaignId}/leads/import
Import leads from a CRM into a campaign · Import leads from CRM
#
Ask an LLM
“How do I pull leads from my CRM straight into a campaign?”
“Can a CRM import skip people already in other campaigns?”
Tell an agent
Import leads from {crm} filter {filterId} into campaign {campaignId}.
Import {filterType} {filterId} into campaign {campaignId} with deduplicate {deduplicate}.
Ask an LLM
“Who are all the leads in a particular campaign?”
“Can I list only the leads in a campaign that are marked interested?”
Tell an agent
List the leads in campaign {campaignId}.
Show up to {limit} leads in campaign {campaignId} with state {state}.
POST
/campaigns/{campaignId}/leads/
Add a lead to a campaign with email in the body · Create Lead in Campaign
#
Ask an LLM
“How do I add a new prospect to a campaign with their details and timezone?”
“Can I find and verify a lead's email while adding them to a campaign?”
Tell an agent
Add a lead to campaign {campaignId} with email {email}, timezone {timezone}.
Add {firstName} from {companyDomain} to campaign {campaignId} and find their email ({findEmail}).
DELETE
/campaigns/{campaignId}/leads/
Unsubscribe leads from a campaign in bulk · Unsubscribe Lead from Campaign
#
Ask an LLM
“Can I unsubscribe several leads from a campaign in a single request?”
“How do I remove a batch of leads from one campaign?”
Tell an agent destructive · confirm first
Unsubscribe a batch of leads from campaign {campaignId}.
Bulk-remove these leads from campaign {campaignId}.
Ask an LLM
“How do I approve and launch a single lead that's stuck awaiting review?”
“Can I launch one reviewed lead without turning on auto-review for the campaign?”
Tell an agent
Launch lead {leadId}, which is waiting for review.
Approve the review of lead {leadId} and start sending.