Overview
This guide walks you through everything you need to go from zero to a live email campaign using the SmartLead API. By the end, you’ll have created a campaign, added email accounts, imported leads, configured sequences, and started sending — all through code.Prerequisites
Before you begin, make sure you have:- A SmartLead account (sign up here)
- At least one email account ready (Gmail, Outlook, or SMTP credentials)
- Basic familiarity with REST APIs and HTTP requests
- A tool for making API calls (cURL, Postman, or any HTTP client library)
Step 1: Get Your API Key
1
Log in to SmartLead
Go to app.smartlead.ai and sign in with your credentials.
2
Open API Settings
Navigate to Settings → API Keys from the left sidebar.
3
Generate a Key
Click Generate New API Key, give it a descriptive name (e.g., “Production API” or “Dev Testing”), and copy the key immediately.
Store Your Key Securely
.env
Python
JavaScript
Step 2: Verify Your Connection
Test that your API key works by fetching your campaigns:Step 3: Create a Campaign
Now create your first campaign:Step 4: Add an Email Account
You need at least one sending account. Here’s how to add an SMTP account:Python
Python
Step 5: Create Email Sequences
Add your outreach emails and follow-ups:Python
Step 6: Import Leads
Add prospects to your campaign (max 400 per request):Python
SmartLead automatically validates emails against block lists and checks for duplicates. Skipped leads will include a reason in the response.
Step 7: Configure Schedule & Start
Set your sending schedule, then activate:Python
Your first campaign is live! SmartLead will now send emails according to your schedule, rotating between connected email accounts.
Complete Working Example
Here’s the full script combining all steps:Python
What’s Next?
Campaign Setup Guide
Advanced campaign configuration and optimization
Email Warmup Guide
Warm up accounts for maximum deliverability
Lead Management Guide
Import, segment, and manage leads at scale
Webhook Integration
Connect SmartLead to your CRM and tools
