Skip to main content
GET
/
api
/
v1
/
campaigns
/
{campaign_id}
/
leads-export
# Download CSV file
curl "https://server.smartlead.ai/api/v1/campaigns/123/leads-export?api_key=YOUR_KEY" \
  -o campaign_123_leads.csv
id,campaign_lead_map_id,status,category,is_interested,created_at,first_name,last_name,email,phone_number,company_name,website,location,custom_fields,linkedin_profile,company_url,is_unsubscribed,unsubscribed_client_id_map,last_email_sequence_sent,open_count,click_count,reply_count
2995276770,2433664091,INPROGRESS,Interested,true,2025-11-25T12:54:54.000Z,John,Doe,john@example.com,+1234567890,Acme Corp,https://acme.com,San Francisco,"{""job_title"":""CEO""}",https://linkedin.com/in/johndoe,https://acme.com,false,,2,3,1,1
Returns a CSV file containing all leads in the campaign with their contact information, status, category, and engagement metrics (opens, clicks, replies). The file is named sl_campaign_{campaign_id}_leads.csv.

Path Parameters

campaign_id
number
required
The campaign ID to export leads from

Query Parameters

api_key
string
required
Your SmartLead API key
# Download CSV file
curl "https://server.smartlead.ai/api/v1/campaigns/123/leads-export?api_key=YOUR_KEY" \
  -o campaign_123_leads.csv

CSV File Columns

The exported CSV file contains the following columns:
  • id - Lead ID
  • campaign_lead_map_id - Campaign-lead mapping ID
  • first_name - Lead’s first name
  • last_name - Lead’s last name
  • email - Lead’s email address
  • phone_number - Lead’s phone number
  • company_name - Company name
  • website - Company website
  • location - Lead’s location
  • linkedin_profile - LinkedIn profile URL
  • company_url - Company URL
  • custom_fields - Custom fields as JSON object
  • status - Lead status (STARTED, INPROGRESS, COMPLETED, PAUSED, STOPPED)
  • category - Category name
  • is_interested - Boolean indicating positive sentiment category
  • created_at - When lead was added to campaign
  • last_email_sequence_sent - Last sequence number sent
  • open_count - Total number of opens
  • click_count - Total number of clicks
  • reply_count - Total number of replies
  • is_unsubscribed - Whether lead is globally unsubscribed
  • unsubscribed_client_id_map - Client-specific unsubscribe data

Response Codes

200
Success
CSV file generated and returned successfully
401
Unauthorized
Invalid or missing API key
404
Not Found
Campaign not found or you don’t have access to it
500
Internal Server Error
Server error occurred
id,campaign_lead_map_id,status,category,is_interested,created_at,first_name,last_name,email,phone_number,company_name,website,location,custom_fields,linkedin_profile,company_url,is_unsubscribed,unsubscribed_client_id_map,last_email_sequence_sent,open_count,click_count,reply_count
2995276770,2433664091,INPROGRESS,Interested,true,2025-11-25T12:54:54.000Z,John,Doe,john@example.com,+1234567890,Acme Corp,https://acme.com,San Francisco,"{""job_title"":""CEO""}",https://linkedin.com/in/johndoe,https://acme.com,false,,2,3,1,1

Response Headers

The response includes the following headers:
  • Content-Type: text/csv
  • Content-Disposition: attachment; filename=sl_campaign_{campaign_id}_leads.csv

Usage Notes

This endpoint is ideal for:
  • Backing up campaign leads
  • Importing leads into CRM systems
  • Analyzing engagement metrics in spreadsheet tools
  • Generating reports for stakeholders
Large campaigns may take longer to export. The export includes all leads regardless of status.