Per-campaign analytics
Returns detailed analytics for a single campaign, including:
- Campaign info and
stats— campaign-level totals across the combined main sequence + all subsequences (sent/opened/clicked/bounced/replied). stepStats— per-step totals for the main sequence only. Subseq step indices live in their own namespace, so combining them here would collide step 0/1/... For per-subseq breakdown, seesubsequences[].stepStats.steps— frontend-compatible main-sequence step rows withvariants[]. Per-variant rows are nested understeps[].variants[].subsequences[]— one entry per subsequence with its ownstats,stepStats,addedCount, andcurrentlyEnrolledcount.bySequence— sent/opened/clicked/bounced split by main vs subseq.- 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.
With from/to, top-level stats use event-date rollups. Main-sequence
step and variant rows are scoped to email send date, while replies are scoped
to reply date. Subsequence reply attribution uses the lead's
subsequence.repliedAt timestamp.
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,
"failed": 6,
"unsubscribed": 8
},
"bySequence": {
"main": {
"sent": 175,
"opened": 45,
"clicked": 13,
"bounced": 17
},
"subsequence": {
"sent": 20,
"opened": 6,
"clicked": 3,
"bounced": 1
}
},
"stepStats": [
{
"_id": 0,
"sent": 100,
"opened": 30,
"clicked": 8,
"bounced": 9,
"failed": 2,
"replied": 10,
"positiveReplied": 5,
"totalOpens": 42,
"totalClicks": 10
},
{
"_id": 1,
"sent": 50,
"opened": 10,
"clicked": 3,
"bounced": 8,
"failed": 3,
"replied": 6,
"positiveReplied": 2,
"totalOpens": 14,
"totalClicks": 4
},
{
"_id": 2,
"sent": 25,
"opened": 5,
"clicked": 2,
"bounced": 0,
"failed": 1,
"replied": 2,
"positiveReplied": 1,
"totalOpens": 7,
"totalClicks": 2
}
],
"steps": [
{
"stepNumber": 0,
"displayStepNumber": 1,
"stepName": "Initial email",
"subject": "Join our webinar",
"isInThreadReply": false,
"sent": 100,
"opened": 30,
"openRate": "30.00",
"clicked": 8,
"clickRate": "8.00",
"replied": 10,
"replyRate": "10.99",
"positiveReplied": 5,
"positiveReplyRate": "50.00",
"bounced": 9,
"bounceRate": "9.00",
"failed": 2,
"failureRate": "2.00",
"totalOpens": 42,
"totalClicks": 10,
"avgOpensPerEmail": "0.42",
"avgClicksPerEmail": "0.10",
"variants": [
{
"label": "A",
"subject": "Join our webinar",
"sent": 55,
"opened": 18,
"openRate": "32.73",
"clicked": 5,
"clickRate": "9.09",
"replied": 6,
"replyRate": "12.00",
"positiveReplied": 3,
"positiveReplyRate": "50.00",
"bounced": 5,
"bounceRate": "9.09",
"failed": 1,
"failureRate": "1.82",
"totalOpens": 24,
"totalClicks": 6
}
]
}
],
"subsequences": [
{
"id": "664c1b2c3d4e5f6a7b8c9d10",
"name": "Interested follow-up",
"trigger": {
"type": "ai_tag",
"value": "interested"
},
"enabled": true,
"archived": false,
"addedCount": 22,
"currentlyEnrolled": 14,
"stats": {
"sent": 20,
"opened": 6,
"clicked": 3,
"bounced": 1,
"replied": 4
},
"stepStats": [
{
"_id": 0,
"sent": 14,
"opened": 5,
"clicked": 2,
"bounced": 1
},
{
"_id": 1,
"sent": 6,
"opened": 1,
"clicked": 1,
"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}Target server for requests. Edit to use your own host.
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