lemlist (lemlist.com). Use this skill for ANY lemlist request — searching and reading data. Whenever a task involves lemlist, use this skill instead of calli...
集成
lemlist
试用通过托管 OAuth 接入 Lemlist API,统一管理活动、客户、排程与退订。
它能做什么
通过托管 OAuth 认证访问 Lemlist API,覆盖销售自动化与冷触达场景。所有请求经由 Maton 网关转发(https://api.maton.ai/lemlist/api),由网关自动注入 OAuth Token。可操作的资源包括:团队信息与积分、活动(列表、创建、更新、暂停,以及序列与单活动排程)、潜在客户(按邮箱新增、查询、更新、从活动中移除)、活动记录(支持按类型过滤)、排程(按星期与时段配置)、企业客户、按邮箱或域名退订,以及收件箱标签。每次请求需在 Authorization 头中携带 Maton API Key,且所有写操作执行前必须获得用户明确确认。
什么时候用它
- 查看 Lemlist 活动列表并暂停运行中的活动
- 向指定活动中新增或更新潜在客户
- 创建工作时段排程,控制外联时间窗口
- 查询活动操作记录并管理退订邮箱或域名
技能文档
Lemlist
Access the Lemlist API with managed OAuth authentication. Manage campaigns, leads, activities, schedules, sequences, and unsubscribes for sales automation and cold outreach.
Quick Start
# List campaigns
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/lemlist/api/campaigns')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Base URL
https://api.maton.ai/lemlist/api/{resource}
Maton proxies requests to api.lemlist.com/api and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your Lemlist OAuth connections at https://api.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=lemlist&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Connection
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'lemlist'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2026-02-12T02:00:53.023887Z",
"last_updated_time": "2026-02-12T02:01:45.284131Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "lemlist",
"metadata": {}
}
}
Open the returned url in a browser to complete OAuth authorization.
Delete Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Specifying Connection
If you have multiple Lemlist connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/lemlist/api/campaigns')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple connections, always include this header to ensure requests go to the intended account.
Security & Permissions
- Access is scoped to campaigns, leads, sequences, and email outreach within the connected Lemlist account.
- All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
API Reference
Team
Get Team
GET /lemlist/api/team
Returns team information including user IDs and settings.
Get Team Credits
GET /lemlist/api/team/credits
Returns remaining credits balance.
Get Team Senders
GET /lemlist/api/team/senders
Returns all team members and their associated campaigns.
Campaigns
List Campaigns
GET /lemlist/api/campaigns
Create Campaign
POST /lemlist/api/campaigns
Content-Type: application/json
{
"name": "My Campaign"
}
Creates a new campaign with an empty sequence and default schedule automatically added.
Get Campaign
GET /lemlist/api/campaigns/{campaignId}
Update Campaign
PATCH /lemlist/api/campaigns/{campaignId}
Content-Type: application/json
{
"name": "Updated Campaign Name"
}
Pause Campaign
POST /lemlist/api/campaigns/{campaignId}/pause
Pauses a running campaign.
Campaign Sequences
Get Campaign Sequences
GET /lemlist/api/campaigns/{campaignId}/sequences
Returns all sequences and steps for a campaign.
Campaign Schedules
Get Campaign Schedules
GET /lemlist/api/campaigns/{campaignId}/schedules
Returns all schedules associated with a campaign.
Leads
Add Lead to Campaign
POST /lemlist/api/campaigns/{campaignId}/leads
Content-Type: application/json
{
"email": "lead@example.com",
"firstName": "John",
"lastName": "Doe",
"companyName": "Acme Inc"
}
Creates a new lead and adds it to the campaign. If the lead already exists, it will be inserted into the campaign.
Get Lead by Email
GET /lemlist/api/leads/{email}
Update Lead in Campaign
PATCH /lemlist/api/campaigns/{campaignId}/leads/{email}
Content-Type: application/json
{
"firstName": "Jane",
"lastName": "Smith"
}
Delete Lead from Campaign
DELETE /lemlist/api/campaigns/{campaignId}/leads/{email}
Activities
List Activities
GET /lemlist/api/activities
Returns the history of campaign activities (last 100 activities).
Query parameters:
campaignId- Filter by campaigntype- Filter by activity type (emailsSent, emailsOpened, emailsClicked, etc.)
Schedules
List Schedules
GET /lemlist/api/schedules
Returns all schedules with pagination.
Response:
{
"schedules": [...],
"pagination": {
"totalRecords": 10,
"currentPage": 1,
"nextPage": 2,
"totalPage": 2
}
}
Create Schedule
POST /lemlist/api/schedules
Content-Type: application/json
{
"name": "Business Hours",
"timezone": "America/New_York",
"start": "09:00",
"end": "17:00",
"weekdays": [1, 2, 3, 4, 5]
}
Weekdays: 0 = Sunday, 1 = Monday, ..., 6 = Saturday
Get Schedule
GET /lemlist/api/schedules/{scheduleId}
Update Schedule
PATCH /lemlist/api/schedules/{scheduleId}
Content-Type: application/json
{
"name": "Updated Schedule",
"start": "08:00",
"end": "18:00"
}
Delete Schedule
DELETE /lemlist/api/schedules/{scheduleId}
Companies
List Companies
GET /lemlist/api/companies
Returns companies with pagination.
Response:
{
"data": [...],
"total": 100
}
Unsubscribes
List Unsubscribes
GET /lemlist/api/unsubscribes
Returns all unsubscribed emails and domains.
Add Unsubscribe
POST /lemlist/api/unsubscribes
Content-Type: application/json
{
"email": "unsubscribe@example.com"
}
Can also add domains by using a domain value.
Inbox Labels
List Labels
GET /lemlist/api/inbox/labels
Returns all labels available to the team.
Pagination
Lemlist uses page-based pagination with different formats depending on the endpoint:
Schedules format:
{
"schedules": [...],
"pagination": {
"totalRecords": 100,
"currentPage": 1,
"nextPage": 2,
"totalPage": 10
}
}
Companies format:
{
"data": [...],
"total": 100
}
Code Examples
JavaScript - List Campaigns
const response = await fetch(
'https://api.maton.ai/lemlist/api/campaigns',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);
const campaigns = await response.json();
console.log(campaigns);
Python - List Campaigns
import os
import requests
response = requests.get(
'https://api.maton.ai/lemlist/api/campaigns',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
campaigns = response.json()
for campaign in campaigns:
print(f"{campaign['name']}: {campaign['_id']}")
Python - Create Campaign and Add Lead
import os
import requests
headers = {'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
base_url = 'https://api.maton.ai/lemlist/api'
# Create campaign
campaign_response = requests.post(
f'{base_url}/campaigns',
headers=headers,
json={'name': 'Q1 Outreach'}
)
campaign = campaign_response.json()
print(f"Created campaign: {campaign['_id']}")
# Add lead to campaign
lead_response = requests.post(
f'{base_url}/campaigns/{campaign["_id"]}/leads',
headers=headers,
json={
'email': 'prospect@example.com',
'firstName': 'John',
'lastName': 'Doe',
'companyName': 'Acme Corp'
}
)
lead = lead_response.json()
print(f"Added lead: {lead['_id']}")
Notes
- Campaign IDs start with
cam_ - Lead IDs start with
lea_ - Schedule IDs start with
skd_ - Sequence IDs start with
seq_ - Team IDs start with
tea_ - User IDs start with
usr_ - Campaigns cannot be deleted via API (only paused)
- When creating a campaign, an empty sequence and default schedule are automatically added
- Lead emails are used as identifiers for lead operations
- IMPORTANT: When using curl commands, use
curl -gwhen URLs contain brackets to disable glob parsing - IMPORTANT: When piping curl output to
jq, environment variables may not expand correctly. Use Python examples instead.
Rate Limits
| Operation | Limit |
|---|---|
| API calls | 20 per 2 seconds per API key |
When rate limited, implement exponential backoff for retries.
Error Handling
| Status | Meaning |
|---|---|
| 400 | Bad request or missing Lemlist connection |
| 401 | Invalid or missing Maton API key |
| 404 | Resource not found |
| 405 | Method not allowed |
| 422 | Validation error |
| 429 | Rate limited |
| 4xx/5xx | Passthrough error from Lemlist API |
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEYenvironment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Troubleshooting: Invalid App Name
- Ensure your URL path starts with
lemlist. For example:
- Correct:
https://api.maton.ai/lemlist/api/campaigns - Incorrect:
https://api.maton.ai/api/campaigns
Resources
常见问题
- 认证是如何处理的?
- 请求需在 Authorization 头携带 Maton API Key,Lemlist 的 OAuth Token 由网关在转发时自动注入。
- 可以通过 API 删除活动吗?
- 不可以,文档说明活动只能暂停,无法通过 API 删除。
- 接口的速率限制是多少?
- 每个 API Key 每 2 秒最多 20 次调用;返回 429 时建议采用指数退避进行重试。
相关技能
以托管 OAuth 方式接入 MailerLite API,管理订阅者、分组、邮件活动、自动化流程、表单、自定义字段与分群。
通过托管 OAuth 代理调用 Brevo 联系人、列表、模板和邮件活动接口。
通过托管 OAuth 代理读写 Mailchimp 受众、订阅者、活动、分组和标签。
Lever (lever.co). Use this skill for ANY Lever request — reading, creating, and updating data. Whenever a task involves Lever, use this skill instead of call...
通过托管 OAuth 管理 ActiveCampaign 联系人、商机、自动化与营销活动,所有写入操作均需用户确认。