curl "https://server.smartlead.ai/api/v1/campaigns/12345/leads-statistics?api_key=YOUR_API_KEY&limit=100&offset=1"
import requests
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{CAMPAIGN_ID}/leads-statistics",
params={
"api_key": API_KEY,
"limit": 100,
"offset": 1
}
)
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}/leads-statistics?api_key=${API_KEY}&limit=100&offset=1`
);
const result = await response.json();
console.log(result);
{
"ok": true,
"data": []
}
{
"message": "Invalid API Key"
}
You have exceeded the 10 requests in 60 sec limit for this endpoint!
Campaign Statistics
Fetch Campaign Lead Statistics
Fetch campaign lead statistics using the campaign’s ID
GET
/
api
/
v1
/
campaigns
/
{campaign_id}
/
leads-statistics
curl "https://server.smartlead.ai/api/v1/campaigns/12345/leads-statistics?api_key=YOUR_API_KEY&limit=100&offset=1"
import requests
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{CAMPAIGN_ID}/leads-statistics",
params={
"api_key": API_KEY,
"limit": 100,
"offset": 1
}
)
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}/leads-statistics?api_key=${API_KEY}&limit=100&offset=1`
);
const result = await response.json();
console.log(result);
{
"ok": true,
"data": []
}
{
"message": "Invalid API Key"
}
You have exceeded the 10 requests in 60 sec limit for this endpoint!
Path Parameters
integer
required
The ID of the campaign
Query Parameters
string
required
Your API key
integer
The number of leads you want to fetch in one go (optional, max 100)
string
Replied/Sent at date in YYYY-MM-DD format. If you want to filter by when the last event for the lead was received by. This can be a reply event, send event etc (optional)
integer
Used to paginate lead data (optional)
Rate Limit
This endpoint has its own dedicated rate limit of 10 requests per minute, which is separate from your plan’s overall API rate limit.
| Scope | Limit | Window |
|---|---|---|
GET /campaigns/{campaign_id}/leads-statistics | 10 requests | 60 seconds |
campaign_id uses the same 10-request budget. If you authenticate with a client API key, the count is scoped to that key instead.
This limit stacks on top of your plan-wide limit rather than replacing it. Requests to this endpoint still count toward the account-wide quota described in the Rate Limits guide, so staying under 10/min here does not exempt you from that limit, and having plan-wide quota left does not let you exceed 10/min here.
The window starts on your first request and resets 60 seconds later. Exceeding it returns 429 Too Many Requests with a plain-text body:
429 - Too Many Requests
You have exceeded the 10 requests in 60 sec limit for this endpoint!
This 429 does not include
Retry-After or X-RateLimit-* headers. Wait up to 60 seconds before retrying.This endpoint aggregates the full send and reply history for every lead in the page, so each call is expensive to serve — which is why it is capped more tightly than most endpoints. When polling for changes, pass
event_time_gt to fetch only leads with activity since your last poll instead of re-reading the whole campaign, and page with limit=100 to get the most out of each of your 10 requests.curl "https://server.smartlead.ai/api/v1/campaigns/12345/leads-statistics?api_key=YOUR_API_KEY&limit=100&offset=1"
import requests
API_KEY = "YOUR_API_KEY"
CAMPAIGN_ID = 12345
response = requests.get(
f"https://server.smartlead.ai/api/v1/campaigns/{CAMPAIGN_ID}/leads-statistics",
params={
"api_key": API_KEY,
"limit": 100,
"offset": 1
}
)
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}/leads-statistics?api_key=${API_KEY}&limit=100&offset=1`
);
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
Too Many Requests
You exceeded this endpoint’s dedicated limit of 10 requests per minute, or your plan-wide API rate limit. Wait up to 60 seconds and retry.
{
"ok": true,
"data": []
}
{
"message": "Invalid API Key"
}
You have exceeded the 10 requests in 60 sec limit for this endpoint!
