smartlead-api
Skill759 starsChanged 28 days agoMITView on GitHub
Smartlead API endpoint reference and patterns. Use for any Smartlead campaign, lead, email account, analytics, or inbox operation. Covers auth, rate limiting, and all commonly used endpoints.
- Reads credentials
- Sends data out
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
All requests use query parameter auth: ?api_key={SMARTLEAD_API_KEY}
- Very specific: line 171
Custom API key clients: Use the client's own API key directly, no client_id param
- Very specific: line 193
If you hit /email-accounts more than a few times per script, paginate once at the start and keep the result in memory.
- Distinctive: line 207
Every skill that touches Smartlead uses this reference.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Smartlead API Reference
Authentication
All requests use query parameter auth: ?api_key={SMARTLEAD_API_KEY}
Environment variable: $SMARTLEAD_API_KEY
Base URL: https://server.smartlead.ai/api/v1
Rate Limiting
- Standard plan: 2,000 req/min (33 req/sec)
- Higher plans: 3,000 req/min (50 req/sec)
- Retry on 429 and 5xx with exponential backoff
- For bulk operations, use
p-limitorPQueuewith 8-15 concurrency
CLI Quick Reference
The smartlead CLI (@smartlead/cli) wraps all API endpoints. Use it for quick lookups:
# Campaigns
smartlead campaigns list
smartlead campaigns get <id>
smartlead campaigns create --name "Campaign Name"
# Leads
smartlead leads list --campaign-id <id>
smartlead leads add --campaign-id <id> --file leads.csv
# Email accounts
smartlead email-accounts list
smartlead email-accounts get <id>
# Analytics
smartlead analytics campaign <id>
smartlead analytics overall
# Master inbox
smartlead inbox repliesAPI Endpoints
Campaigns
GET /campaigns/{id} — Fetch campaign by ID
POST /campaigns/create — Create new campaign
POST /campaigns/{id}/status — Update status (START, PAUSED, STOP)
Body: { "status": "START" }Campaign Email Accounts
GET /campaigns/{id}/email-accounts — List accounts assigned to campaign
POST /campaigns/{id}/email-accounts — Add accounts to campaign
Body: { "email_account_ids": [1, 2, 3] }
DELETE /campaigns/{id}/email-accounts — Remove accounts from campaignCampaign Sequences
GET /campaigns/{id}/sequences — Fetch sequences
POST /campaigns/{id}/sequences — Save/update sequences
Body: { "sequences": [{ "seq_number": 1, "seq_delay_details": { "delay_in_days": 0 }, "subject": "...", "email_body": "..." }] }A/B/C Variants — use seq_variants array inside each sequence:
{
"sequences": [{
"seq_number": 1,
"seq_delay_details": { "delay_in_days": 0 },
"seq_variants": [
{ "variant_label": "A", "subject": "Subject A", "email_body": "<div>Body A</div>" },
{ "variant_label": "B", "subject": "Subject B", "email_body": "<div>Body B</div>" },
{ "variant_label": "C", "subject": "Subject C", "email_body": "<div>Body C</div>" }
]
}]
}Note: Do NOT include distribution field — SmartLead splits evenly automatically.
Email body order: content → PS unsub line → %signature% (signature always last)
Campaign Settings & Schedule
POST /campaigns/{id}/settings — Update settings
Body: { "track_settings": [...], "stop_lead_settings": "..." }
POST /campaigns/{id}/schedule — Update schedule
Body: { "timezone": "US/Eastern", "days_of_the_week": [1,2,3,4,5], "start_hour": "08:00", "end_hour": "17:00", "min_time_btw_emails": 8, "max_new_leads_per_day": 30 }Leads
GET /leads/?api_key={key}&email={email}
— Lookup lead by email address
POST /campaigns/{id}/leads
— Add leads to campaign (batch up to 100)
Body: { "lead_list": [{ "email": "...", "first_name": "...", "last_name": "...", "company_name": "...", "custom_fields": { "field1": "value1" } }] }Analytics
GET /analytics/day-wise-overall-stats
?api_key={key}&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
— Day-by-day metrics (sent, opened, clicked, replied, bounced)
GET /analytics/day-wise-positive-reply-stats
?api_key={key}&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
— Day-by-day positive reply counts
GET /analytics/overall-stats-v2
?api_key={key}&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
— Overall campaign metrics for date range
GET /analytics/campaign/list
?api_key={key}
— List all campaigns with summary stats
GET /campaigns/{id}/analytics
?api_key={key}
— Analytics for specific campaign
GET /campaigns/{id}/analytics-by-date
?api_key={key}&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
— Campaign analytics for specific date range (sent_count, reply_count)Email Accounts (Global)
GET /email-accounts
?api_key={key}&offset=0&limit=100
— List all email accounts (paginated)
GET /email-accounts/{id}
?api_key={key}
— Get specific email account
POST /email-accounts/save
— Create/update email account (SMTP details, warmup, etc.)Master Inbox
POST /master-inbox/inbox-replies
Body: { "api_key": "...", "offset": 0, "limit": 50, "message_type": "RECEIVED" }
— Fetch inbox replies with filtering and paginationSub-Client / Custom API Key Pattern
- Normal sub-clients: Pass
?api_key={MAIN_KEY}&client_id={CLIENT_ID}on all requests - Custom API key clients: Use the client's own API key directly, no
client_idparam
TypeScript Pattern
const SMARTLEAD_API = "https://server.smartlead.ai/api/v1";
const API_KEY = process.env.SMARTLEAD_API_KEY;
// GET example
const res = await fetch(`${SMARTLEAD_API}/campaigns/${campaignId}?api_key=${API_KEY}`);
const campaign = await res.json();
// POST example (add leads)
const res = await fetch(`${SMARTLEAD_API}/campaigns/${campaignId}/leads?api_key=${API_KEY}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ lead_list: leads.slice(0, 100) }),
});Performance tip: cache the email-accounts list
If you hit /email-accounts more than a few times per script, paginate once at the start and keep the result in memory. Smartlead's pagination returns 100 per page — for accounts with thousands of inboxes, a full walk takes 30+ seconds.
For persistent caching across scripts, write the list to a local JSON file and refresh on a timer (e.g. every hour). The /smartlead-inbox-manager skill has scripts that implement this pattern.
What to do next
This is a reference skill — no direct next step. Used by all skills that interact with Smartlead (/smartlead-inbox-manager, /smartlead-campaign-upload-public, /email-deliverability-audit, /positive-reply-scoring, /deliverability-incident-response, etc.).
Return to the skill that sent you here.
Related skills
- Every skill that touches Smartlead uses this reference.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- automatewithuday/GTM-Skills★ 189% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- auto-research-publicSkill
- blitz-list-builderSkill
- campaign-copywritingSkill
- campaign-strategySkill
- cold-email-kickoffSkill
- cold-email-starter-kitSkill
- cold-email-weekly-rhythmSkill
- competitor-engagersSkill
- deliverability-incident-responseSkill
- deliverability-test-publicSkill
- disco-likeSkill
- email-deliverability-auditSkill
- experiment-designSkill
- google-maps-list-builderSkill
- icp-onboardingSkill
- icp-prompt-builderSkill
- inbox-lifecycle-managerSkill
- lead-magnet-brainstormSkill
- list-builderSkill
- list-expanderSkill
- list-quality-scorecardSkill
- perfect-company-listSkill
- personalization-subagent-patternSkill
- clay-playbooksSkill
- playbook-ad-librarySkill
- playbook-ai-specificitySkill
- playbook-case-study-pageSkill
- playbook-company-name-cleaningSkill
- playbook-creative-ideasSkill
- playbook-first-name-cleaningSkill
- playbook-fundraisingSkill
- playbook-google-site-searchSkill
- playbook-hiring-surgeSkill
- playbook-job-posting-languageSkill
- playbook-linkedin-engagementSkill
- playbook-lookalikesSkill
- playbook-name-to-other-prospectsSkill
- playbook-new-in-roleSkill
- playbook-pricing-pageSkill
- playbook-social-link-findingSkill
- playbook-social-postsSkill
- playbook-tech-on-websiteSkill
- playbook-warm-introsSkill
- positive-reply-scoringSkill
- prospeo-full-exportSkill
- prospeo-search-apiSkill
- smartlead-campaign-upload-publicSkill
- smartlead-inbox-managerSkill
- smartlead-spintaxSkill
- spam-word-checkerSkill
- zapmail-domain-setup-publicSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

