curl "https://server.smartlead.ai/api/v1/leads/?api_key=YOUR_KEY&email=john@example.com"
import requests
API_KEY = "YOUR_API_KEY"
email = "john@example.com"
response = requests.get(
"https://server.smartlead.ai/api/v1/leads/",
params={
"api_key": API_KEY,
"email": email
}
)
result = response.json()
if result:
print(f"Found lead: {result['first_name']} {result['last_name']}")
print(f"Enrolled in {len(result['lead_campaign_data'])} campaigns")
else:
print("Lead not found")
const API_KEY = 'YOUR_API_KEY';
const email = 'john@example.com';
const response = await fetch(
`https://server.smartlead.ai/api/v1/leads/?api_key=${API_KEY}&email=${encodeURIComponent(email)}`
);
const result = await response.json();
if (Object.keys(result).length > 0) {
console.log(`Found lead: ${result.first_name} ${result.last_name}`);
console.log(`Enrolled in ${result.lead_campaign_data.length} campaigns`);
} else {
console.log('Lead not found');
}
{
"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,
"created_at": "2025-11-25T12:54:54.000Z",
"lead_campaign_data": [
{
"campaign_lead_map_id": 2433664091,
"campaign_id": 123,
"campaign_name": "Q4 Outreach",
"client_id": 456,
"client_email": "user@company.com",
"lead_category_id": 789
}
]
}
{}
{
"message": "Invalid API Key"
}
{
"error": "email is required"
}
Lead Management
Get Lead by Email
Search for a lead by email address and retrieve all associated campaign data
GET
/
api
/
v1
/
leads
/
curl "https://server.smartlead.ai/api/v1/leads/?api_key=YOUR_KEY&email=john@example.com"
import requests
API_KEY = "YOUR_API_KEY"
email = "john@example.com"
response = requests.get(
"https://server.smartlead.ai/api/v1/leads/",
params={
"api_key": API_KEY,
"email": email
}
)
result = response.json()
if result:
print(f"Found lead: {result['first_name']} {result['last_name']}")
print(f"Enrolled in {len(result['lead_campaign_data'])} campaigns")
else:
print("Lead not found")
const API_KEY = 'YOUR_API_KEY';
const email = 'john@example.com';
const response = await fetch(
`https://server.smartlead.ai/api/v1/leads/?api_key=${API_KEY}&email=${encodeURIComponent(email)}`
);
const result = await response.json();
if (Object.keys(result).length > 0) {
console.log(`Found lead: ${result.first_name} ${result.last_name}`);
console.log(`Enrolled in ${result.lead_campaign_data.length} campaigns`);
} else {
console.log('Lead not found');
}
{
"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,
"created_at": "2025-11-25T12:54:54.000Z",
"lead_campaign_data": [
{
"campaign_lead_map_id": 2433664091,
"campaign_id": 123,
"campaign_name": "Q4 Outreach",
"client_id": 456,
"client_email": "user@company.com",
"lead_category_id": 789
}
]
}
{}
{
"message": "Invalid API Key"
}
{
"error": "email is required"
}
Returns lead details including personal information, custom fields, and all campaigns the lead is enrolled in. Returns empty object if lead not found.
Query Parameters
string
required
Your SmartLead API key
string
required
The email address to search for
curl "https://server.smartlead.ai/api/v1/leads/?api_key=YOUR_KEY&email=john@example.com"
import requests
API_KEY = "YOUR_API_KEY"
email = "john@example.com"
response = requests.get(
"https://server.smartlead.ai/api/v1/leads/",
params={
"api_key": API_KEY,
"email": email
}
)
result = response.json()
if result:
print(f"Found lead: {result['first_name']} {result['last_name']}")
print(f"Enrolled in {len(result['lead_campaign_data'])} campaigns")
else:
print("Lead not found")
const API_KEY = 'YOUR_API_KEY';
const email = 'john@example.com';
const response = await fetch(
`https://server.smartlead.ai/api/v1/leads/?api_key=${API_KEY}&email=${encodeURIComponent(email)}`
);
const result = await response.json();
if (Object.keys(result).length > 0) {
console.log(`Found lead: ${result.first_name} ${result.last_name}`);
console.log(`Enrolled in ${result.lead_campaign_data.length} campaigns`);
} else {
console.log('Lead not found');
}
Response Fields
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
timestamp
ISO 8601 timestamp of when the lead was created
array
Array of campaigns this lead is enrolled in
Response Codes
Success
Lead retrieved successfully (returns empty object if not found)
Unauthorized
Invalid or missing API key
Validation Error
Missing or invalid email parameter
Internal Server Error
Server error occurred
{
"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,
"created_at": "2025-11-25T12:54:54.000Z",
"lead_campaign_data": [
{
"campaign_lead_map_id": 2433664091,
"campaign_id": 123,
"campaign_name": "Q4 Outreach",
"client_id": 456,
"client_email": "user@company.com",
"lead_category_id": 789
}
]
}
{}
{
"message": "Invalid API Key"
}
{
"error": "email is required"
}
