AnalyticsPer-campaign analytics

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 breakdown 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, see subsequences[].stepStats.
  • subsequences[] — one entry per subsequence with its own stats, stepStats, addedCount, and currentlyEnrolled count.
  • 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. Date filters apply to email sends (and to per-subsequence stats); reply attribution to subsequences uses the lead's subsequence.repliedAt timestamp which the reply-worker sets when a reply is matched to a subsequence email.

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"
{
  "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
    },
    "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
      },
      {
        "_id": 1,
        "sent": 50,
        "opened": 10,
        "clicked": 3,
        "bounced": 8
      },
      {
        "_id": 2,
        "sent": 25,
        "opened": 5,
        "clicked": 2,
        "bounced": 0
      }
    ],
    "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
  }
}
GET
/v1/analytics/campaigns/{campaignId}
GET
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
query
fromstring

Start date (ISO 8601 or date string). Omit for no lower bound.

Format: date
query
tostring

End date (ISO 8601 or date string). Omit for no upper bound.

Format: date
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

Path Parameters

Query Parameters

fromstring

Start date (ISO 8601 or date string). Omit for no lower bound.

Example:
2024-05-01
tostring

End date (ISO 8601 or date string). Omit for no upper bound.

Example:
2024-05-31

Responses

successboolean
dataobject