Get campaign analytics
curl --request GET \
--url https://api.coldsend.pro/api/public/v1/analytics/campaigns \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coldsend.pro/api/public/v1/analytics/campaigns"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coldsend.pro/api/public/v1/analytics/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coldsend.pro/api/public/v1/analytics/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coldsend.pro/api/public/v1/analytics/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coldsend.pro/api/public/v1/analytics/campaigns")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/analytics/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"kpis": {
"total_campaigns": 123,
"total_sends": 123,
"avg_open_rate": 123,
"avg_reply_rate": 123,
"avg_bounce_rate": 123,
"avg_verified_ctr": 123,
"total_verified_clicks": 0
},
"campaigns": [
{
"campaign_id": "<string>",
"name": "<string>",
"status": "<string>",
"total_leads": 123,
"sent_count": 123,
"open_count": 123,
"reply_count": 123,
"bounce_count": 123,
"unsubscribe_count": 123,
"open_rate": 123,
"reply_rate": 123,
"bounce_rate": 123,
"enable_click_tracking": false,
"click_count": 123,
"unique_clicking_leads": 123,
"verified_ctr": 123,
"launched_at": "<string>",
"completed_at": "<string>"
}
],
"success": true,
"message": "Analytics retrieved successfully"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Analytics
Get campaign analytics
Get aggregate KPIs and per-campaign analytics
Returns workspace-wide KPIs (total campaigns, sends, overall open/reply/bounce rates weighted by send volume) and a per-campaign breakdown.
Filtering
- status: Restrict to campaigns in a specific status (DRAFT, ACTIVE, PAUSED, COMPLETED, FAILED)
- from_date / to_date: Restrict to campaigns launched within the given
date range (ISO 8601, e.g.
2024-01-01)
Example
import requests
response = requests.get(
"https://api.coldsend.pro/api/public/v1/analytics/campaigns",
headers={"X-API-Key": "your-api-key"},
params={"status": "COMPLETED", "from_date": "2024-01-01"}
)
print(response.json())
GET
/
api
/
public
/
v1
/
analytics
/
campaigns
Get campaign analytics
curl --request GET \
--url https://api.coldsend.pro/api/public/v1/analytics/campaigns \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coldsend.pro/api/public/v1/analytics/campaigns"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coldsend.pro/api/public/v1/analytics/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coldsend.pro/api/public/v1/analytics/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coldsend.pro/api/public/v1/analytics/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coldsend.pro/api/public/v1/analytics/campaigns")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/analytics/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"kpis": {
"total_campaigns": 123,
"total_sends": 123,
"avg_open_rate": 123,
"avg_reply_rate": 123,
"avg_bounce_rate": 123,
"avg_verified_ctr": 123,
"total_verified_clicks": 0
},
"campaigns": [
{
"campaign_id": "<string>",
"name": "<string>",
"status": "<string>",
"total_leads": 123,
"sent_count": 123,
"open_count": 123,
"reply_count": 123,
"bounce_count": 123,
"unsubscribe_count": 123,
"open_rate": 123,
"reply_rate": 123,
"bounce_rate": 123,
"enable_click_tracking": false,
"click_count": 123,
"unique_clicking_leads": 123,
"verified_ctr": 123,
"launched_at": "<string>",
"completed_at": "<string>"
}
],
"success": true,
"message": "Analytics retrieved successfully"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key with format cs_live_xxx
Query Parameters
Filter by campaign status
Filter by launch date (on or after)
Filter by launch date (on or before)
Response
Analytics retrieved successfully
Was this page helpful?

