curl "https://server.smartlead.ai/api/v1/analytics/client/overall-stats?api_key=YOUR_KEY"
import requests
API_KEY = "YOUR_API_KEY"
response = requests.get(
"https://server.smartlead.ai/api/v1/analytics/client/overall-stats",
params={"api_key": API_KEY}
)
result = response.json()
print(result)
const API_KEY = 'YOUR_API_KEY';
const response = await fetch(
`https://server.smartlead.ai/api/v1/analytics/client/overall-stats?api_key=${API_KEY}`
);
const result = await response.json();
console.log(result);
{
"ok": true,
"data": {
"client_wise_performance": [
{
"client_id": 1,
"client_name": "Acme Corp",
"total_campaigns_count": 10,
"campaign_stats": {
"sent": 1000,
"opened": 500,
"replied": 80,
"positive_replied": 40,
"client_health": "85%",
"open_rate": "50%",
"reply_rate": "8%",
"positive_reply_rate": "4%",
"unique_open_count": 450,
"unique_lead_count": 900
}
}
]
}
}
{
"message": "Invalid API Key"
}
{
"error": "Resource not found"
}
{
"error": "Invalid parameters provided"
}
Global Analytics
Client Overall Stats
Get performance metrics by client for agency reporting and analysis
GET
/
api
/
v1
/
analytics
/
client
/
overall-stats
curl "https://server.smartlead.ai/api/v1/analytics/client/overall-stats?api_key=YOUR_KEY"
import requests
API_KEY = "YOUR_API_KEY"
response = requests.get(
"https://server.smartlead.ai/api/v1/analytics/client/overall-stats",
params={"api_key": API_KEY}
)
result = response.json()
print(result)
const API_KEY = 'YOUR_API_KEY';
const response = await fetch(
`https://server.smartlead.ai/api/v1/analytics/client/overall-stats?api_key=${API_KEY}`
);
const result = await response.json();
console.log(result);
{
"ok": true,
"data": {
"client_wise_performance": [
{
"client_id": 1,
"client_name": "Acme Corp",
"total_campaigns_count": 10,
"campaign_stats": {
"sent": 1000,
"opened": 500,
"replied": 80,
"positive_replied": 40,
"client_health": "85%",
"open_rate": "50%",
"reply_rate": "8%",
"positive_reply_rate": "4%",
"unique_open_count": 450,
"unique_lead_count": 900
}
}
]
}
}
{
"message": "Invalid API Key"
}
{
"error": "Resource not found"
}
{
"error": "Invalid parameters provided"
}
Query Parameters
string
required
Your SmartLead API key
string
required
Start date (YYYY-MM-DD format)
string
required
End date (YYYY-MM-DD format)
string
IANA timezone string (e.g., “America/New_York”)
string
Comma-separated client IDs
string
Filter value for client results
string
Set to “true” to return full data set
string
Max number of results to return
string
Pagination offset
curl "https://server.smartlead.ai/api/v1/analytics/client/overall-stats?api_key=YOUR_KEY"
import requests
API_KEY = "YOUR_API_KEY"
response = requests.get(
"https://server.smartlead.ai/api/v1/analytics/client/overall-stats",
params={"api_key": API_KEY}
)
result = response.json()
print(result)
const API_KEY = 'YOUR_API_KEY';
const response = await fetch(
`https://server.smartlead.ai/api/v1/analytics/client/overall-stats?api_key=${API_KEY}`
);
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 (campaign, lead, email account, etc.) does not exist or you don’t have access to it
Validation Error
Request validation failed. Check parameter types, required fields, and value constraints.
Rate Limit Exceeded
Too many requests. Please slow down and retry after the rate limit resets.
Internal Server Error
Server error occurred. Please try again or contact support if the issue persists.
Service Unavailable
API is temporarily unavailable or under maintenance. Please try again later.
{
"ok": true,
"data": {
"client_wise_performance": [
{
"client_id": 1,
"client_name": "Acme Corp",
"total_campaigns_count": 10,
"campaign_stats": {
"sent": 1000,
"opened": 500,
"replied": 80,
"positive_replied": 40,
"client_health": "85%",
"open_rate": "50%",
"reply_rate": "8%",
"positive_reply_rate": "4%",
"unique_open_count": 450,
"unique_lead_count": 900
}
}
]
}
}
{
"message": "Invalid API Key"
}
{
"error": "Resource not found"
}
{
"error": "Invalid parameters provided"
}
How these metrics are calculated
Shared rules (inclusive date boundaries, unique vs raw counts, rate formulas) are documented once in How Analytics Metrics Are Calculated.
sent_time), inclusive on both ends; a single date returns that one full day.
| Field | How it’s calculated |
|---|---|
total_campaigns_count | COUNT(DISTINCT campaign) for the client with sends in the range. |
sent / opened / replied / bounced | Raw event counts, summed across the client’s campaigns. Additive. |
positive_replied | Distinct leads tagged positive (sentiment_type = 'positive'). Note: the date attribution on this breakdown endpoint differs from the overall-stats-v2 tile (which is reply-date) — don’t assume the two match for the same window. Use overall-stats-v2 or the day-wise positive endpoints as the source of truth for positive counts. |
unique_lead_count | COUNT(DISTINCT lead) sent at least one email in the range (deduplicated per campaign by email). Not additive across days. |
unique_open_count | COUNT(DISTINCT lead) that opened in the range. Not additive across days. |
client_health | positive_replied / unique_lead_count |
open_rate | unique_open_count / unique_lead_count |
reply_rate | replied / unique_open_count (falls back to unique_lead_count when open tracking is off) |
positive_reply_rate | positive_replied / replied |
bounce_rate | bounced / unique_lead_count (per unique lead, not per email sent) |
