Settings -> Integrations -> API).
The API key is passed as the password with an empty username (Authorization: Basic base64(:apiKey)).
Things to know before calling:
- Identifiers: Campaign IDs and Lead IDs follow Lemlist’s internal identifier format (e.g.,
cam_...,lea_...). - Rate Limiting: Lemlist enforces API rate limits. The plugin automatically handles HTTP 429 responses and backs off according to the
Retry-Afterheader. - Campaign Lead Actions:
leads.pauseandleads.resumeact on every campaign unless you passcampaignId. Interest changes have separate global (leads.markInterested) and campaign (leads.markInterestedInCampaign) operations. Step operations (leads.personalizeStep,leads.skipStep) always need a campaign. - Unsubscribes & Blacklist: Contacts can be unsubscribed or resubscribed either by variable (such as
emailordomain) or via the contact management endpoints.
- 60 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Lemlist API key before the first call: More: API Key
pnpm corsair setup --plugin=lemlist --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List campaignsWhat’s next
API reference
Every
lemlist.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.