Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
SendCloud Portal
Sitecore Send API documentation
  • Introduction to the Sitecore Send API
        • Get all campaigns by page
        • Get all campaigns by page and page size
        • Get campaign details
        • Get all senders
        • Get sender details
        • Create a draft campaign
        • Manage a transactional campaign
        • Dynamic templates for transactional campaign
        • Clone an existing campaign
        • Delete a campaign
        • Update a draft campaign
        • Test a campaign
        • Send a campaign
        • Schedule a campaign
        • Unschedule a campaign
        • Get campaign statistics
        • Get campaign statistics with paging and filter
        • Get campaign summary
        • Get campaign activity by location
        • Get campaign link activity
        • Get A/B campaign summary
  1. Campaigns
  1. API reference
  2. Campaigns
  3. Get campaign statistics

Get campaign statistics

GET /campaigns/{CampaignID}/stats/{Type}.{Format}

Retrieves a list of statistics for a specific campaign based on activity such as emails sent, opened, bounced, links clicked, and so on. You have the option to specify the date the activity occurred.

Request

ParameterInTypeRequiredDescription
CampaignIDpathstringtrueThe ID of the campaign that you are fetching statistics for.
TypepathstringfalseThe type of activity used to get information and display statistics. Possible values are
- when and to which recipients the campaign was sent.Opened - who opened the campaign.LinkClicked - who clicked on which links in the campaign.Unsubscribed - who unsubscribed from the campaign by clicking the unsubscribe link and when.Bounced - which email recipients failed to receive the campaign. If not specified, Sent value is used by default.Complained - which email recipients reported your campaign as spam through their email service.Activity - all types of activities for the campaign.
FormatpathstringtrueThe supported file format for getting a response.Possible values: json and xml.
apikeyquerystringtrueThe API key of your account.
datequerydatefalseThe specific year, month, and day the activity occurred. The date has a YYYY/MM/DD format.
http
GET https://{hostname}/v3/campaigns/{CampaignID}/stats/{Type}.{Format}?apikey=
curl
curl --include \\
     --header "Content-Type: application/json" \\
     --header "Accept: application/json" \\
     'https://{hostname}/v3/campaigns/{CampaignID}/stats/{Type}.{Format}?apikey='

Response

StatusDescriptionHeadersSchema
200 OKThe request is successful.Content-Type
/jsonAccept
/json
N/A
json
{
  "Code": 0,
  "Error": null,
  "Context": {
    "Paging": {
      "PageSize": 1,
      "CurrentPage": 1,
      "TotalResults": 2,
      "TotalPageCount": 1,
      "SortExpression": null,
      "SortIsAscending": false
    },
    "Analytics": \[
      {
        "Context": "[email protected]",
        "ContextName": "recipient name",
        "TotalCount": 1,
        "UniqueCount": 1,
        "ContextDescription": null,
        "Timestamp": "/Date(1705074023353+0000)/"
      },
      {
        "Context": "[email protected]",
        "ContextName": "recipient2 name",
        "TotalCount": 1,
        "UniqueCount": 1,
        "ContextDescription": null,
        "Timestamp": "/Date(1705074023353+0000)/"
      }
    \]
  }
{
  "Code": 0,
  "Error": null,
  "Context": {
    "Paging": {
      "PageSize": 1,
      "CurrentPage": 1,
      "TotalResults": 2,
      "TotalPageCount": 1,
      "SortExpression": null,
      "SortIsAscending": false
    },
    "Analytics": \[
      {
        "Context": "[email protected]",
        "ContextName": "recipient name",
        "TotalCount": 1,
        "UniqueCount": 0,
        "ContextDescription": null
      },
      {
        "Context": "[email protected]",
        "ContextName": "recipient2 name",
        "TotalCount": 1,
        "UniqueCount": 0,
        "ContextDescription": null
      },
    "CampaignActivity": \[
      {
        "Context": "NL", /\*For opened is country code, For LinkedClicked is the link \*/
        "Email": "[email protected]", 
        "IpAddress": "20.67.123.236",
        "MailingListId": "459e1a6e-6fc9-48c2-a062-f6434684dabc",
        "MemberId": "dc9d95b8-16cc-05cc-6c10-7de9be83badf",
        "Name": null,
        "Status": "Opened",
        "Timestamp": "02:29 PM 2024-11-08"
            }
    \]
  }
}
  • Code - the response code. This is 0 if successful.

  • Error - the response error message. This is null if successful.

  • Context - an object that contains all the Paging and Analytics information for the campaign:

    • Paging - an object that contains the following information:

      • PageSize - the page size of the results. This is 0 if not defined.

      • CurrentPage - the number of the result page. This is 1 if not defined.

      • Totalresults - the number of results that are included in the response.

      • TotalPageCount - the total number of pages in your account.

      • SortExpression - the sort expression associated with the column or columns being sorted.

      • SortIsAscending - this is false if the results are not displayed in ascending order based on the sort expression.

    • Analytics - a list of recipients containing the following information for each recipient:

      • Context - the email address of the recipient.

      • ContextName - the name of the recipient.

      • TotalCount - the total number of statistics based on the activity Type made by the recipient. This can be opens, link clicks, and so on. Deprecated

      • UniqueCount - the total number of unique statistics based on the activity Type made by the recipient. This can be opens, link clicks, and so on. Deprecated

      • ContextDescription :

        • Type is Unsubscribed - this contains the date-time the recipient unsubscribed from the campaign.

        • Type is LinkClicked - the link URL clicked will be displayed as an extra as seen in the above code example.

        • Type is Bounced - the Bounced Type will be displayed as an extra.

        • Type is Complains - the Timestamp will be displayed as an extra.

      • Timestamp - for all parameters Sent, opened, LinkClicked etc an extra field with the time of the action is added in the response.

    • Campaign Activity:

      • Context - This will show Country Code if the type is opened, the link is the type is LinkedClicked and the timestamp if the type is Complain.

      • Email - the email address of the recipient.

      • IpAddress - the IP address of the recipient.

      • MailingListId - the mailing list that the recipient belongs to.

      • MemberID - The recipients ID.

      • Name - the recipient's name.

      • Status - The status of the activity.

      • Timestamp - the timestamp of the action.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use