# Lemlist

> Comprehensive lemlist API integration for email campaign management, lead operations, and activity tracking. Supports single and bulk operations with file-first architecture. Use when needing to (1) manage email campaigns, (2) add/update/delete leads, (3) track campaign activities and performance, (4) manage team and unsubscribes, (5) bulk import leads from CSV, or (6) retrieve campaign statistics.

- Skill: `buzzmatic/lemlist` (Agent Skill, multi-file: 13 files)
- Install (CLI): `npx skillmds@latest add buzzmatic/lemlist`
- Raw SKILL.md: https://api.skillmd.com/api/skills/buzzmatic/lemlist/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Marketing & Growth
- Author: Buzzmatic (https://skillmd.com/u/buzzmatic)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/buzzmatic/lemlist

---


# Lemlist Skill

Fetch and manage data from the lemlist API.

## Quick Start

All scripts follow a file-first pattern:
- Accept an optional `--output` directory (defaults to `./output`)
- Save raw JSON and processed CSV into that directory
- Return JSON with `{"output_files": [...], "summary": "..."}`

## Authentication

Set the `LEMLIST_API_KEY` environment variable:

```bash
export LEMLIST_API_KEY="your-api-key"
```

Get your API key from lemlist Settings > Integrations > API.

## Core Operations

### Campaign Management

**List all campaigns:**
```bash
python scripts/get_campaigns.py
```

**Filter by status:**
```bash
python scripts/get_campaigns.py --status running
```

**Get specific campaign:**
```bash
python scripts/get_campaigns.py \
  --campaign-id "camp_abc123" \
  --include-stats
```

### Lead Management

**Get leads from campaign:**
```bash
python scripts/get_leads.py \
  --campaign-id "camp_abc123"
```

**Fetch all leads (with pagination):**
```bash
python scripts/get_leads.py \
  --campaign-id "camp_abc123" \
  --fetch-all
```

**Filter by status:**
```bash
python scripts/get_leads.py \
  --campaign-id "camp_abc123" \
  --status replied
```

**Get specific lead:**
```bash
python scripts/get_leads.py \
  --campaign-id "camp_abc123" \
  --email "john@example.com"
```

### Adding Leads

**Add single lead:**
```bash
python scripts/add_leads.py \
  --campaign-id "camp_abc123" \
  --lead-json '{"email": "john@example.com", "firstName": "John", "lastName": "Doe", "companyName": "Acme Inc"}'
```

**Bulk import from CSV:**
```bash
python scripts/add_leads.py \
  --campaign-id "camp_abc123" \
  --leads-csv "/path/to/leads.csv" \
  --email-column "email" \
  --batch-size 50 \
  --deduplicate
```

**CSV Format:**
```csv
email,firstName,lastName,companyName,customField1
john@example.com,John,Doe,Acme Inc,value1
jane@example.com,Jane,Smith,Beta Corp,value2
```

### Updating Leads

**Update lead fields:**
```bash
python scripts/update_lead.py \
  --campaign-id "camp_abc123" \
  --email "john@example.com" \
  --data '{"firstName": "Johnny", "companyName": "New Company"}'
```

**Mark as interested:**
```bash
python scripts/update_lead.py \
  --campaign-id "camp_abc123" \
  --email "john@example.com" \
  --set-interested true
```

**Pause a lead:**
```bash
python scripts/update_lead.py \
  --campaign-id "camp_abc123" \
  --email "john@example.com" \
  --pause
```

**Resume a lead:**
```bash
python scripts/update_lead.py \
  --campaign-id "camp_abc123" \
  --email "john@example.com" \
  --resume
```

### Deleting Leads

**Delete from campaign:**
```bash
python scripts/delete_lead.py \
  --campaign-id "camp_abc123" \
  --email "john@example.com"
```

**Delete from all campaigns:**
```bash
python scripts/delete_lead.py \
  --email "john@example.com" \
  --all-campaigns
```

### Campaign Activities

**Get all activities:**
```bash
python scripts/get_activities.py \
  --campaign-id "camp_abc123"
```

**Filter by type:**
```bash
python scripts/get_activities.py \
  --campaign-id "camp_abc123" \
  --activity-type emailsReplied
```

**Activity types:** `emailsSent`, `emailsOpened`, `emailsClicked`, `emailsReplied`, `emailsBounced`, `emailsFailed`, `emailsUnsubscribed`, `emailsInterested`, `emailsNotInterested`

### Team Information

**Get team details:**
```bash
python scripts/get_team.py
```

**Include email accounts:**
```bash
python scripts/get_team.py \
  --include-accounts
```

### Unsubscribe Management

**List all unsubscribes:**
```bash
python scripts/get_unsubscribes.py \
  --list
```

**Check if email is unsubscribed:**
```bash
python scripts/get_unsubscribes.py \
  --check "john@example.com"
```

**Add to unsubscribe list:**
```bash
python scripts/get_unsubscribes.py \
  --add "john@example.com"
```

**Remove from unsubscribe list:**
```bash
python scripts/get_unsubscribes.py \
  --remove "john@example.com"
```

## Output Format

All scripts return JSON:

```json
{
  "output_files": [
    "output/20250111_101500_lemlist_campaigns_raw_20250111_101500.json",
    "output/20250111_101500_lemlist_campaigns_20250111_101500.csv"
  ],
  "summary": "Fetched 5 campaigns (running: 3, paused: 2)",
  "stats": {
    "campaign_count": 5,
    "mode": "list"
  }
}
```

## Lead Status Values

| Status | Description |
|--------|-------------|
| `sent` | Email sent |
| `opened` | Email opened |
| `clicked` | Link clicked |
| `replied` | Reply received |
| `bounced` | Email bounced |
| `interested` | Marked interested |
| `notInterested` | Marked not interested |
| `paused` | Lead paused |
| `contacted` | Contact initiated |

## Rate Limits

- Lemlist has rate limits based on your plan
- Scripts implement automatic retry with exponential backoff on 429 errors
- Use `--delay` parameter for bulk operations to control request pacing

## Error Handling

The scripts handle these automatically:
- `429`: Rate limit - exponential backoff
- `401`: Authentication error
- `404`: Resource not found
- `400`: Bad request - returns validation error

## Related lemlist skills

This skill covers campaigns, leads, activities, team, and unsubscribes (auth via
the `X-API-KEY` header). Two sibling skills cover the enrich/database endpoints,
which use **HTTP Basic auth** instead:

- **`lemlist-enrich`** — find/verify an email, find a phone number, enrich from a
  LinkedIn URL or name + company (`POST /api/enrich`, async).
- **`lemlist-search-db`** — search the lemlist People database to build prospect
  lists by job title, company, country, etc. (`POST /api/database/people`).

A typical chain: `lemlist-search-db` (find prospects) → `lemlist-enrich`
(verify/find emails) → this skill's `add_leads` (push into a campaign).

## See Also

- [API Reference](references/api_reference.md) - Endpoint documentation
- [Lemlist API Docs](https://developer.lemlist.com/api-reference)

