lemlist
Guides AI agents through lemlist's MCP and REST APIs for cold outreach, campaign management, and CRM sync.
What this file does
Guides AI agents through lemlist's MCP and REST APIs for cold outreach, campaign management, and CRM sync.
When to use it
- Building an AI assistant that manages lemlist campaigns
- Automating lead enrichment and outreach workflows
- Integrating lemlist with a CRM or webhook system
- Creating a skill for a sales engagement platform
Assumes this stack
lemlist
lemlist is a sales engagement platform for cold outreach. It lets you find leads, enrich contact data, create multi-channel campaigns (email, LinkedIn, phone, WhatsApp), and manage replies — all from one place.
Prefer MCP over REST API
lemlist has a Model Context Protocol (MCP) server that wraps the API with better ergonomics for AI agents. Use it when available.
MCP endpoint: https://app.lemlist.com/mcp
Auth: OAuth (automatic) or X-API-Key header
Setup for Claude Code:
claude mcp add --transport http lemlist https://app.lemlist.com/mcp
Setup for Claude Desktop / Cursor: see MCP Setup
If MCP is not available, use the REST API at https://api.lemlist.com/api with Basic auth (username is always empty, password is the API key):
Authorization: Basic {base64(":YOUR_API_KEY")}
Common workflows
1. Find leads and launch a campaign
The most common workflow: find your ideal customers, create a campaign, and start outreach.
Steps:
- Search the People Database (450M+ B2B contacts) by role, industry, company size, location
- Create a campaign with an email sequence
- Add leads to the campaign (with optional email enrichment)
- Review and start the campaign
MCP tools: lemleads_search → create_campaign_with_sequence → add_sequence_step → add_lead_to_campaign → set_campaign_state
API equivalent:
POST /people-database/search
POST /campaigns
POST /campaigns/{id}/sequences
POST /campaigns/{id}/leads
PUT /campaigns/{id}/start
Important:
- Always confirm with the user before starting a campaign
- Adding leads with enrichment consumes credits
- Campaigns need at least one connected sending channel (email, LinkedIn, etc.)
2. Enrich contacts
Find emails, phone numbers, and professional data for your leads. Enrichment is asynchronous — you submit the request and poll for results.
Steps:
- Submit enrichment request (single or bulk, max 500)
- Poll for results using the enrichment ID
- Optionally push enriched data to CRM contacts
MCP tools: enrich_data or bulk_enrich_data → get_enrichment_result → push_leads_to_contacts
API equivalent:
POST /enrich (single, async)
POST /enrich/bulk (batch, async)
GET /enrich/{id}/result (poll status)
Important:
- Enrichment costs credits — always warn the user before proceeding
- Poll with reasonable intervals (5-10 seconds), results typically arrive within 30 seconds
- Bulk enrichment accepts up to 500 contacts per request
3. Monitor campaign performance
Analyze how campaigns are performing and identify what needs attention.
Steps:
- List campaigns (filter by status: running, paused, draft)
- Get stats for specific campaigns or bulk reports across all campaigns
- Compare metrics: open rate, click rate, reply rate, bounce rate
MCP tools: get_campaigns → get_campaign_stats or get_campaigns_reports
API equivalent:
GET /campaigns
GET /campaigns/{id}/stats?startDate=YYYY-MM-DD&endDate=YYYY-MM-DD
GET /campaigns/reports
Key metrics to track: sent, opened, clicked, replied, bounced, unsubscribed. Reports include 65+ detailed metrics.
4. Handle inbox replies
Read and respond to lead replies across all channels (email, LinkedIn, SMS, WhatsApp).
Steps:
- List inbox conversations (filter by channel, status, campaign)
- Read conversation thread for context
- Compose and send a reply on the appropriate channel
MCP tools: get_inbox_conversations → get_inbox_conversation → send_inbox_email / send_inbox_linkedin / send_inbox_sms / send_whatsapp_message
API equivalent:
GET /inbox/conversations
GET /inbox/conversations/{id}
POST /inbox/conversations/{id}/email
POST /inbox/conversations/{id}/linkedin
POST /inbox/conversations/{id}/sms
POST /inbox/conversations/{id}/whatsapp
5. Sync with your CRM
Keep lemlist and your CRM (HubSpot, Salesforce, Pipedrive, etc.) in sync.
Push leads to CRM contacts:
MCP tools: get_contact_lists → push_leads_to_contacts
Update lead data from external sources:
MCP tools: search_campaign_leads → update_lead_variables
API equivalent:
GET /contacts/lists
POST /contacts/push
GET /campaigns/{id}/leads?search=email@example.com
PATCH /campaigns/{id}/leads/{leadId}/variables
Tip: Use custom variables to store CRM IDs, deal stages, or any metadata on leads.
6. Check email deliverability
Ensure your sending infrastructure is healthy before launching campaigns.
Steps:
- Check domain DNS health (MX, SPF, DMARC, blacklists)
- Connect an email account (custom SMTP/IMAP)
- Test connectivity
MCP tools: check_domain_health → connect_email_account → test_email_account
7. Set up webhook automations
Get real-time notifications when events happen in lemlist (replies, clicks, bounces, etc.).
Steps:
- List existing webhooks
- Create a webhook for specific events
- Your endpoint receives POST requests with event data
MCP tools: get_webhooks → create_webhook
API equivalent:
GET /webhooks
POST /webhooks
DELETE /webhooks/{id}
Common webhook events: emailReplied, emailClicked, emailBounced, emailUnsubscribed, linkedinInviteAccepted
8. Write outreach sequences
Create or improve multi-step email sequences with best practices.
Steps:
- Get current campaign sequences to review existing content
- Compose new messages or improve existing ones
- Add or update sequence steps (email, LinkedIn, phone, delay)
MCP tools: get_campaign_sequences → compose_messages → add_sequence_step or update_sequence_step
Best practices:
- Keep emails under 100 words
- One clear call-to-action per email
- Personalize beyond {{firstName}} — mention company, industry, recent news
- Space follow-ups: Day 3, 7, 14 pattern
- Mix channels: email → LinkedIn → phone
Constraints
| Constraint | Detail |
|---|---|
| Rate limit | 20 requests per 2 seconds per API key |
| Credit costs | Email enrichment, phone enrichment, email verification, and lead addition with enrichment all consume credits. Always check get_team_info for remaining credits and warn the user. |
| Async enrichment | Enrichment requests return an ID — you must poll get_enrichment_result for the actual data. |
| Campaign safety | Never start, pause, or delete a campaign without explicit user confirmation. |
| Lead vs Contact | A "lead" belongs to a campaign. A "contact" lives in the CRM. They are separate objects — pushing leads to contacts creates a copy. |
| Bulk limits | Bulk enrichment: max 500 per request. People Database search: paginated results. |
| Auth format | REST API uses Basic auth with an empty username and the API key as password. Do not use Bearer tokens with the REST API. |
Reference
What's inside
8 workflow sections, 1 constraint table, 1 reference list, 12 code examples
Change this for your project
- Replace
https://app.lemlist.com/mcpwith your own MCP endpoint if self-hosted - Replace
YOUR_API_KEYin the Basic auth example with your actual key - Replace
https://api.lemlist.com/apiwith your own API base URL if proxied
Where it goes
Save as SKILL.md inside a skill folder. Loaded when the agent selects that skill.
Worth borrowing
- Preferring MCP over REST for AI agent ergonomics
- Polling async enrichment results with 5-10 second intervals
- Separating campaign leads from CRM contacts as distinct objects
Related Documents
Video Script
Guides an AI to write ready-to-film two-column AV scripts with hooks, segment breakdowns, B-roll cues, text overlays, timing estimates, and shot lists.
Image Generation Skill
Provides Python functions for generating, editing, and transforming images via DALL-E 3, FLUX (Replicate/fal.ai), and local Stable Diffusion, plus utilities and prompt engineering helpers.
AI Artist — Engineering Specification
Defines a 21-section engineering specification for a prompt construction skill, covering contracts, deterministic design, error taxonomy, and production readiness.
Karis
Turns an AI agent into a marketing CMO with brand analysis, SEO audits, Reddit monitoring, and viral tweet optimization via CLI or API.