curl "https://server.smartlead.ai/api/v1/campaigns/123/leads?api_key=YOUR_KEY&limit=50&status=INPROGRESS&emailStatus=is_opened"
import requests
API_KEY = "YOUR_API_KEY"
campaign_id = 123
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/leads",
params={
"api_key": API_KEY,
"limit": 50,
"offset": 0,
"status": "INPROGRESS",
"emailStatus": "is_opened"
}
)
result = response.json()
print(f"Total leads: {result['total_leads']}")
print(f"Returned: {len(result['data'])} leads")
const API_KEY = 'YOUR_API_KEY';
const campaignId = 123;
const params = new URLSearchParams({
api_key: API_KEY,
limit: 50,
offset: 0,
status: 'INPROGRESS',
emailStatus: 'is_opened'
});
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/leads?${params}`
);
const result = await response.json();
console.log(`Total leads: ${result.total_leads}`);
console.log(`Returned: ${result.data.length} leads`);
{
"total_leads": "42",
"offset": 0,
"limit": 50,
"data": [
{
"campaign_lead_map_id": 2433664091,
"lead_category_id": null,
"status": "INPROGRESS",
"created_at": "2025-11-25T12:54:54.000Z",
"lead": {
"id": 2995276770,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone_number": "+1234567890",
"company_name": "Acme Corp",
"website": "https://acme.com",
"location": "San Francisco, CA",
"linkedin_profile": "https://linkedin.com/in/johndoe",
"company_url": "https://acme.com",
"custom_fields": {
"job_title": "CEO",
"industry": "Technology"
},
"is_unsubscribed": false,
"unsubscribed_client_id_map": null
}
}
]
}
{
"message": "Invalid API Key"
}
{
"error": "Campaign not found - Invalid campaign_id."
}
Lead Management
Get Campaign Leads
Retrieve paginated list of leads in a campaign with advanced filtering options
GET
/
api
/
v1
/
campaigns
/
{campaign_id}
/
leads
curl "https://server.smartlead.ai/api/v1/campaigns/123/leads?api_key=YOUR_KEY&limit=50&status=INPROGRESS&emailStatus=is_opened"
import requests
API_KEY = "YOUR_API_KEY"
campaign_id = 123
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/leads",
params={
"api_key": API_KEY,
"limit": 50,
"offset": 0,
"status": "INPROGRESS",
"emailStatus": "is_opened"
}
)
result = response.json()
print(f"Total leads: {result['total_leads']}")
print(f"Returned: {len(result['data'])} leads")
const API_KEY = 'YOUR_API_KEY';
const campaignId = 123;
const params = new URLSearchParams({
api_key: API_KEY,
limit: 50,
offset: 0,
status: 'INPROGRESS',
emailStatus: 'is_opened'
});
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/leads?${params}`
);
const result = await response.json();
console.log(`Total leads: ${result.total_leads}`);
console.log(`Returned: ${result.data.length} leads`);
{
"total_leads": "42",
"offset": 0,
"limit": 50,
"data": [
{
"campaign_lead_map_id": 2433664091,
"lead_category_id": null,
"status": "INPROGRESS",
"created_at": "2025-11-25T12:54:54.000Z",
"lead": {
"id": 2995276770,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone_number": "+1234567890",
"company_name": "Acme Corp",
"website": "https://acme.com",
"location": "San Francisco, CA",
"linkedin_profile": "https://linkedin.com/in/johndoe",
"company_url": "https://acme.com",
"custom_fields": {
"job_title": "CEO",
"industry": "Technology"
},
"is_unsubscribed": false,
"unsubscribed_client_id_map": null
}
}
]
}
{
"message": "Invalid API Key"
}
{
"error": "Campaign not found - Invalid campaign_id."
}
Supports filtering by status, category, email engagement, and date ranges. Returns lead details with custom fields. Maximum 100 leads per page.
Path Parameters
number
required
The campaign ID to retrieve leads from
Query Parameters
string
required
Your SmartLead API key
number
default:"0"
Pagination offset (minimum: 0)
number
default:"100"
Number of leads to return per page (minimum: 1, maximum: 100)
string
Filter by lead status. Valid values:
STARTED, INPROGRESS, COMPLETED, PAUSED, STOPPEDnumber
Filter by category ID (must be a positive integer)
string
Filter by email engagement status. Valid values:
is_opened, is_clicked, is_replied, is_bounced, is_unsubscribed, is_spam, is_accepted, not_replied, is_sender_bouncedstring
Filter leads created after this ISO 8601 date (e.g.,
2025-11-25T00:00:00.000Z)string
Filter leads with last email sent after this ISO 8601 date
string
Filter leads with any activity (sent or reply) after this ISO 8601 date
curl "https://server.smartlead.ai/api/v1/campaigns/123/leads?api_key=YOUR_KEY&limit=50&status=INPROGRESS&emailStatus=is_opened"
import requests
API_KEY = "YOUR_API_KEY"
campaign_id = 123
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/leads",
params={
"api_key": API_KEY,
"limit": 50,
"offset": 0,
"status": "INPROGRESS",
"emailStatus": "is_opened"
}
)
result = response.json()
print(f"Total leads: {result['total_leads']}")
print(f"Returned: {len(result['data'])} leads")
const API_KEY = 'YOUR_API_KEY';
const campaignId = 123;
const params = new URLSearchParams({
api_key: API_KEY,
limit: 50,
offset: 0,
status: 'INPROGRESS',
emailStatus: 'is_opened'
});
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/leads?${params}`
);
const result = await response.json();
console.log(`Total leads: ${result.total_leads}`);
console.log(`Returned: ${result.data.length} leads`);
Response Fields
string
Total count of leads matching the filter criteria
number
The offset used in the request
number
The limit used in the request
array
Array of lead objects
Show Lead object properties
Show Lead object properties
number
Unique identifier for the lead-campaign mapping
number | null
Category ID assigned to this lead, or null if uncategorized
string
Current status of the lead in this campaign. Values:
STARTED, INPROGRESS, COMPLETED, PAUSED, STOPPEDtimestamp
ISO 8601 timestamp when the lead was added to the campaign
object
Lead contact information
Show Lead details
Show Lead details
number
Unique lead identifier
string
Lead’s email address
string
Lead’s first name
string
Lead’s last name
string
Lead’s phone number
string
Company name
string
Company website
string
Lead’s location
string
LinkedIn profile URL
string
Company URL
object
Custom fields object containing personalization data
boolean
Whether the lead is globally unsubscribed
object
Map of client IDs where lead is unsubscribed
Response Codes
Success
Leads retrieved successfully
Unauthorized
Invalid or missing API key
Not Found
Campaign not found or you don’t have access to it
Validation Error
Invalid query parameters (check offset, limit ranges and status values)
Internal Server Error
Server error occurred
{
"total_leads": "42",
"offset": 0,
"limit": 50,
"data": [
{
"campaign_lead_map_id": 2433664091,
"lead_category_id": null,
"status": "INPROGRESS",
"created_at": "2025-11-25T12:54:54.000Z",
"lead": {
"id": 2995276770,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone_number": "+1234567890",
"company_name": "Acme Corp",
"website": "https://acme.com",
"location": "San Francisco, CA",
"linkedin_profile": "https://linkedin.com/in/johndoe",
"company_url": "https://acme.com",
"custom_fields": {
"job_title": "CEO",
"industry": "Technology"
},
"is_unsubscribed": false,
"unsubscribed_client_id_map": null
}
}
]
}
{
"message": "Invalid API Key"
}
{
"error": "Campaign not found - Invalid campaign_id."
}
