curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/reply-email-thread?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_stats_id": "abc-123",
"email_body": "Thanks for your interest! Let me know if you have any questions.",
"add_signature": true
}'
import requests
def reply_to_lead(campaign_id, email_stats_id, body, add_signature=True):
payload = {
"email_stats_id": email_stats_id,
"email_body": body,
"add_signature": add_signature
}
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/reply-email-thread",
params={"api_key": "YOUR_API_KEY"},
json=payload
)
if response.status_code == 200:
print("✅ Reply sent")
return response.json()
reply_to_lead(123, "abc-123", "Happy to help! Let me know your questions.")
{
"success": true,
"message": "Reply sent successfully"
}
Campaign Management
Reply to Campaign Lead
Send a reply email to a lead within campaign context
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
reply-email-thread
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/reply-email-thread?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_stats_id": "abc-123",
"email_body": "Thanks for your interest! Let me know if you have any questions.",
"add_signature": true
}'
import requests
def reply_to_lead(campaign_id, email_stats_id, body, add_signature=True):
payload = {
"email_stats_id": email_stats_id,
"email_body": body,
"add_signature": add_signature
}
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/reply-email-thread",
params={"api_key": "YOUR_API_KEY"},
json=payload
)
if response.status_code == 200:
print("✅ Reply sent")
return response.json()
reply_to_lead(123, "abc-123", "Happy to help! Let me know your questions.")
{
"success": true,
"message": "Reply sent successfully"
}
Reply to leads directly from campaign view. Maintains conversation thread and tracks reply in campaign statistics.
Path Parameters
number
required
Campaign ID
Query Parameters
string
required
Your SmartLead API key
Request Body
string
required
Email statistics ID of the message to reply to
string
required
Reply email body content
string
Recipient email (optional, defaults to lead email)
string
Recipient first name
string
Recipient last name
string
Schedule reply for later (ISO 8601)
string
Message ID being replied to
string
Original email body (for context)
string
Original email timestamp
string
CC recipients (comma-separated)
string
BCC recipients (comma-separated)
string
Scheduling condition
boolean
Include email signature
string
Sequence type
array
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/reply-email-thread?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_stats_id": "abc-123",
"email_body": "Thanks for your interest! Let me know if you have any questions.",
"add_signature": true
}'
import requests
def reply_to_lead(campaign_id, email_stats_id, body, add_signature=True):
payload = {
"email_stats_id": email_stats_id,
"email_body": body,
"add_signature": add_signature
}
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/reply-email-thread",
params={"api_key": "YOUR_API_KEY"},
json=payload
)
if response.status_code == 200:
print("✅ Reply sent")
return response.json()
reply_to_lead(123, "abc-123", "Happy to help! Let me know your questions.")
Response Example
{
"success": true,
"message": "Reply sent successfully"
}
