curl "https://server.smartlead.ai/api/v1/campaigns/12345/analytics-by-date?api_key=YOUR_API_KEY&start_date=2024-01-01&end_date=2024-01-31"
import requests
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{CAMPAIGN_ID}/analytics-by-date",
params={
"api_key": API_KEY,
"start_date": "2024-01-01",
"end_date": "2024-01-31"
}
)
result = response.json()
print(result)
const API_KEY = 'YOUR_API_KEY';
const CAMPAIGN_ID = 12345;
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${CAMPAIGN_ID}/analytics-by-date?api_key=${API_KEY}&start_date=2024-01-01&end_date=2024-01-31`
);
const result = await response.json();
console.log(result);
{
"id": 123,
"user_id": 456,
"created_at": "2025-01-04T08:32:34.138Z",
"status": "ACTIVE",
"name": "Q1 Outbound",
"start_date": "2025-01-01",
"end_date": "2025-01-31",
"sent_count": "23918",
"unique_sent_count": "18262",
"open_count": "7420",
"unique_open_count": "5133",
"click_count": "612",
"unique_click_count": "489",
"reply_count": "3929",
"total_reply_count": "3929",
"non_ooo_reply_count": "1502",
"block_count": "0",
"bounce_count": "1234",
"unsubscribed_count": "18",
"total_count": "122108",
"drafted_count": "96904"
}
{
"message": "Invalid API Key"
}
Campaign Statistics
Fetch Campaign Statistics by Date Range
Fetch campaign statistics using the campaign’s ID filtered by date range
GET
/
api
/
v1
/
campaigns
/
{campaign_id}
/
analytics-by-date
curl "https://server.smartlead.ai/api/v1/campaigns/12345/analytics-by-date?api_key=YOUR_API_KEY&start_date=2024-01-01&end_date=2024-01-31"
import requests
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{CAMPAIGN_ID}/analytics-by-date",
params={
"api_key": API_KEY,
"start_date": "2024-01-01",
"end_date": "2024-01-31"
}
)
result = response.json()
print(result)
const API_KEY = 'YOUR_API_KEY';
const CAMPAIGN_ID = 12345;
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${CAMPAIGN_ID}/analytics-by-date?api_key=${API_KEY}&start_date=2024-01-01&end_date=2024-01-31`
);
const result = await response.json();
console.log(result);
{
"id": 123,
"user_id": 456,
"created_at": "2025-01-04T08:32:34.138Z",
"status": "ACTIVE",
"name": "Q1 Outbound",
"start_date": "2025-01-01",
"end_date": "2025-01-31",
"sent_count": "23918",
"unique_sent_count": "18262",
"open_count": "7420",
"unique_open_count": "5133",
"click_count": "612",
"unique_click_count": "489",
"reply_count": "3929",
"total_reply_count": "3929",
"non_ooo_reply_count": "1502",
"block_count": "0",
"bounce_count": "1234",
"unsubscribed_count": "18",
"total_count": "122108",
"drafted_count": "96904"
}
{
"message": "Invalid API Key"
}
Path Parameters
integer
required
The ID of the campaign
Query Parameters
string
required
Your API key
string
required
Start date in YYYY-MM-DD format
string
required
End date in YYYY-MM-DD format
string
IANA timezone string (e.g. “America/New_York”)
The range between
start_date and end_date must be 30 days or less. A wider range returns 400 Bad Request.Reply Fields
| Field | What it counts |
|---|---|
total_reply_count | Every reply, with no exclusions |
non_ooo_reply_count | Replies from leads not categorised as out-of-office |
reply_count | Replies excluding any flagged as ignored |
total_reply_count - non_ooo_reply_count.
non_ooo_reply_count comes from reply categorisation alone, so it does not depend on the per-campaign ignore out-of-office setting.
non_ooo_reply_count can be higher than reply_count. reply_count also drops manually-ignored replies and replies whose sender is not the lead, neither of which is out-of-office. Compare non_ooo_reply_count against total_reply_count.curl "https://server.smartlead.ai/api/v1/campaigns/12345/analytics-by-date?api_key=YOUR_API_KEY&start_date=2024-01-01&end_date=2024-01-31"
import requests
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{CAMPAIGN_ID}/analytics-by-date",
params={
"api_key": API_KEY,
"start_date": "2024-01-01",
"end_date": "2024-01-31"
}
)
result = response.json()
print(result)
const API_KEY = 'YOUR_API_KEY';
const CAMPAIGN_ID = 12345;
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${CAMPAIGN_ID}/analytics-by-date?api_key=${API_KEY}&start_date=2024-01-01&end_date=2024-01-31`
);
const result = await response.json();
console.log(result);
Response Codes
Success
Request successful
Bad Request
Invalid request parameters or malformed request body
Unauthorized
Invalid or missing API key. Check your authentication.
Not Found
The requested resource does not exist or you don’t have access to it
{
"id": 123,
"user_id": 456,
"created_at": "2025-01-04T08:32:34.138Z",
"status": "ACTIVE",
"name": "Q1 Outbound",
"start_date": "2025-01-01",
"end_date": "2025-01-31",
"sent_count": "23918",
"unique_sent_count": "18262",
"open_count": "7420",
"unique_open_count": "5133",
"click_count": "612",
"unique_click_count": "489",
"reply_count": "3929",
"total_reply_count": "3929",
"non_ooo_reply_count": "1502",
"block_count": "0",
"bounce_count": "1234",
"unsubscribed_count": "18",
"total_count": "122108",
"drafted_count": "96904"
}
{
"message": "Invalid API Key"
}
