Per-campaign analytics
Returns detailed analytics for a single campaign, including:
- Campaign info and stored stats
- Per-step breakdown (sent, opened, clicked, bounced per sequence step)
- Lead status breakdown (active, paused, completed, bounced, etc.)
- Total replied count and positive replied count (based on workspace AI tag settings)
Without from/to, returns all-time data. Supply one or both to filter by date range.
curl -X GET "https://api.sendkit.ai/v1/analytics/campaigns/example_string?from=2024-05-01&to=2024-05-31" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY"
import requests
import json
url = "https://api.sendkit.ai/v1/analytics/campaigns/example_string?from=2024-05-01&to=2024-05-31"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.sendkit.ai/v1/analytics/campaigns/example_string?from=2024-05-01&to=2024-05-31", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.sendkit.ai/v1/analytics/campaigns/example_string?from=2024-05-01&to=2024-05-31", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.sendkit.ai/v1/analytics/campaigns/example_string?from=2024-05-01&to=2024-05-31')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['X-Api-Key'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"campaign": {
"id": "664a1b2c3d4e5f6a7b8c9d02",
"name": "Webinar Attendee Nurture",
"status": "paused"
},
"stats": {
"sent": 195,
"delivered": 195,
"opened": 51,
"clicked": 16,
"replied": 18,
"bounced": 18,
"unsubscribed": 8
},
"stepStats": [
{
"_id": 0,
"sent": 103,
"opened": 31,
"clicked": 9,
"bounced": 9
},
{
"_id": 1,
"sent": 61,
"opened": 12,
"clicked": 4,
"bounced": 9
},
{
"_id": 2,
"sent": 31,
"opened": 8,
"clicked": 3,
"bounced": 0
}
],
"statusBreakdown": {
"failed": 6,
"bounced": 18,
"active": 30,
"completed": 23,
"unsubscribed": 8,
"replied": 18,
"pending": 22
},
"totalReplied": 18,
"totalPositiveReplied": 8
}
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
/v1/analytics/campaigns/{campaignId}Platform API key (sk_user_...) or Workspace API key (sk_...)
Campaign ID
Start date (ISO 8601 or date string). Omit for no lower bound.
End date (ISO 8601 or date string). Omit for no upper bound.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)
Path Parameters
Campaign ID
Query Parameters
Start date (ISO 8601 or date string). Omit for no lower bound.
End date (ISO 8601 or date string). Omit for no upper bound.
Responses
Campaign aggregate email stats
Per sequence step breakdown, sorted by step number
Zero-based sequence step index
Lead count by status (keys are status strings, values are counts)
Total leads that replied
Total leads that replied with a positive AI tag
Last updated 1 day ago
Built with Documentation.AI