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
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
Array of campaigns this lead is enrolled in
Response Codes
{
"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"
}
