curl -X POST "https://server.smartlead.ai/api/v1/campaigns/12345/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
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
def send_reply(campaign_id, email_stats_id, body, schedule_time=None, add_signature=True):
payload = {
"email_stats_id": email_stats_id,
"email_body": body,
"add_signature": add_signature
}
if schedule_time:
payload["scheduled_time"] = schedule_time
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/reply-email-thread",
params={"api_key": API_KEY},
json=payload
)
return response.json()
# Send immediate reply
send_reply(CAMPAIGN_ID, "abc-123", "Thanks for your interest!")
# Schedule reply for tomorrow 9 AM
from datetime import datetime, timedelta
tomorrow_9am = (datetime.now() + timedelta(days=1)).replace(hour=9, minute=0).isoformat() + 'Z'
send_reply(CAMPAIGN_ID, "abc-124", "Following up on our previous conversation", schedule_time=tomorrow_9am)
const API_KEY = 'YOUR_API_KEY';
const CAMPAIGN_ID = 12345;
async function sendReply(campaignId, emailStatsId, body, options = {}) {
const payload = {
email_stats_id: emailStatsId,
email_body: body,
add_signature: options.add_signature !== false,
...options
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/reply-email-thread?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
return response.json();
}
// Send reply
await sendReply(CAMPAIGN_ID, 'abc-123', 'Happy to help!');
Master Inbox
Reply to Email
Send a reply to a lead in an email thread
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
reply-email-thread
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/12345/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
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
def send_reply(campaign_id, email_stats_id, body, schedule_time=None, add_signature=True):
payload = {
"email_stats_id": email_stats_id,
"email_body": body,
"add_signature": add_signature
}
if schedule_time:
payload["scheduled_time"] = schedule_time
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/reply-email-thread",
params={"api_key": API_KEY},
json=payload
)
return response.json()
# Send immediate reply
send_reply(CAMPAIGN_ID, "abc-123", "Thanks for your interest!")
# Schedule reply for tomorrow 9 AM
from datetime import datetime, timedelta
tomorrow_9am = (datetime.now() + timedelta(days=1)).replace(hour=9, minute=0).isoformat() + 'Z'
send_reply(CAMPAIGN_ID, "abc-124", "Following up on our previous conversation", schedule_time=tomorrow_9am)
const API_KEY = 'YOUR_API_KEY';
const CAMPAIGN_ID = 12345;
async function sendReply(campaignId, emailStatsId, body, options = {}) {
const payload = {
email_stats_id: emailStatsId,
email_body: body,
add_signature: options.add_signature !== false,
...options
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/reply-email-thread?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
return response.json();
}
// Send reply
await sendReply(CAMPAIGN_ID, 'abc-123', 'Happy to help!');
Send replies to leads directly from the inbox. Maintains thread continuity and tracks all responses.
Overview
Sends a reply email to a lead, maintaining the email thread. Can send immediately or schedule for later. Key Features:- Thread continuity maintained
- Optional scheduling
- CC/BCC support
- Attachments support
- Signature inclusion
- Reply tracking in conversation history
Path Parameters
integer
required
Campaign ID
Query Parameters
string
required
Your SmartLead API key
Request Body
string
required
Email stats ID for the message to reply to
string
required
Reply email body content
string
Recipient email (optional, defaults to lead email)
string
Recipient first name (optional)
string
Recipient last name (optional)
string
Schedule send time (ISO 8601 format)
string
Message ID being replied to
string
Original email body being replied to
string
Original email timestamp
string
CC recipients (comma-separated)
string
BCC recipients (comma-separated)
string
Scheduling condition (optional)
boolean
Include email signature
string
Sequence type (optional)
array
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/12345/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
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
def send_reply(campaign_id, email_stats_id, body, schedule_time=None, add_signature=True):
payload = {
"email_stats_id": email_stats_id,
"email_body": body,
"add_signature": add_signature
}
if schedule_time:
payload["scheduled_time"] = schedule_time
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/reply-email-thread",
params={"api_key": API_KEY},
json=payload
)
return response.json()
# Send immediate reply
send_reply(CAMPAIGN_ID, "abc-123", "Thanks for your interest!")
# Schedule reply for tomorrow 9 AM
from datetime import datetime, timedelta
tomorrow_9am = (datetime.now() + timedelta(days=1)).replace(hour=9, minute=0).isoformat() + 'Z'
send_reply(CAMPAIGN_ID, "abc-124", "Following up on our previous conversation", schedule_time=tomorrow_9am)
const API_KEY = 'YOUR_API_KEY';
const CAMPAIGN_ID = 12345;
async function sendReply(campaignId, emailStatsId, body, options = {}) {
const payload = {
email_stats_id: emailStatsId,
email_body: body,
add_signature: options.add_signature !== false,
...options
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/reply-email-thread?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
return response.json();
}
// Send reply
await sendReply(CAMPAIGN_ID, 'abc-123', 'Happy to help!');
