# Campaign Statistics (deprecated)

Retrieve aggregated delivery and engagement statistics grouped by campaign.

> Note: This is a legacy endpoint. We advise using /statcounters to retrieve aggregated stats for campaigns.

Endpoint: GET /v3/REST/campaignstatistics
Version: 1.0.0
Security: basicAuth

## Query parameters:

  - `AXTesting` (integer)
    Retrieves statistics only for the campaigns with the specified AX Testing ID.

  - `Blocked` (boolean)
    When true, will retrieve statistics only for campaigns that have blocked messages. When false, campaigns with blocked messages will be excluded from the response.

  - `Bounced` (boolean)
    When true, will retrieve statistics only for campaigns that have bounced messages. When false, campaigns with bounced messages will be excluded from the response.

  - `Click` (boolean)
    When true, will retrieve statistics only for campaigns that have messages with registered clicks. When false, campaigns with clicked messages will be excluded from the response.

  - `ContactsList` (integer)
    Retrieves statistics only for campaigns sent to the specified contact list ID.

  - `Deferred` (boolean)
    When true, will retrieve statistics only for campaigns that have deferred messages. When false, campaigns with deferred messages will be excluded from the response.

  - `FromTS` (string)
    Retrieves statistics only for campaigns sent after the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `FromType` (integer)
    Retrieves campaign statistics only for a specific type of messages:

- 1 - Transactional
- 2 - Marketing
- 3 - Unknown

  - `GroupAX` (boolean)
    When true, the different test and winning versions of AB Tesing campaigns will be grouped together as one campaign. When false, each AB version will be displayed with separate statistics.

  - `Hardbounced` (boolean)
    When true, will retrieve statistics only for campaigns that have at least one hard-bounced message. When false, campaigns with hard-bounced messages will be excluded from the response.

  - `IsDeleted` (boolean)
    When true, will retrieve statistics only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

  - `IsStarred` (boolean)
    When true, will retrieve statistics only for starred campaigns. When false, starred campaigns will be excluded from the response.

  - `LastActivityAt` (string)
    Retrieves statistics only for campaigns, for which LastActivityAt (their last received email, open, click etc.) equals the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `MaxLastActivityAt` (string)
    Retrieves statistics only for campaigns, for which LastActivityAt (their last received email, open, click etc.) is before the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `MinLastActivityAt` (string)
    Retrieves statistics only for campaigns, for which LastActivityAt (their last received email, open, click etc.) is after the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `NewsLetter` (integer)
    Retrieves statistics only for the campaign with the specified campaign draft ID.

  - `Open` (boolean)
    When true, will retrieve statistics only for campaigns that have messages with registered opens. When false, campaigns with opened messages will be excluded from the response.

  - `Queued` (boolean)
    When true, will retrieve statistics only for campaigns that have queued messages. When false, campaigns with queued messages will be excluded from the response.

  - `Segmentation` (integer)
    Retrieves statistics only for campaigns that have used the this segment (contactfilter) ID when specifying their recipients.

  - `Sender` (integer)
    Retrieves statistics only for campaigns which used the specified sender ID.

  - `Sent` (boolean)
    When true, will retrieve statistics only for campaigns that have sent messages. When false, campaigns with sent messages will be excluded from the result.

  - `ShowExtraData` (boolean)
    When true, the contact list name and segment name will be returned in the response, in the ContactListName and SegmentName properties, respectively.

Default value: false

  - `Spam` (boolean)
    When true, will retrieve statistics only for campaigns that have messages marked as Spam. When false, campaigns with Spam messages will be excluded from the response.

  - `Softbounced` (boolean)
    When true, will retrieve only statistics only for campaigns that have soft-bounced messages. When false, campaigns with soft-bounced messages will be excluded from the result.

  - `Subject` (string)
    Retrieves statistics only for campaigns with the specified subject line.

  - `ToTS` (string)
    Retrieves statistics only for campaigns sent before the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `Unsubscribed` (boolean)
    When true, will retrieve statistics only for campaigns that have unsubscribed from a list at least once. When false, campaigns with unsubscribe events will be excluded from the response.

  - `WorkflowID` (integer)
    Retrieves statistics only for campaigns started by the specified automation workflow ID.

## Response 200 fields (application/json):

  - `Count` (integer)
    Indicates the number of objects in the Data array.

  - `Data` (array)
    A JSON array containing a list of objects returned by this endpoint.

  - `Data.AXTestingID` (object)
    Unique numeric ID of the AX Testing object this campaign is linked to.

  - `Data.BlockedCount` (integer)
    Number of blocked messages.

  - `Data.BouncedCount` (integer)
    Number of bounced messages.

  - `Data.CampaignID` (integer)
    Unique numeric ID of this campaign.

  - `Data.CampaignIsStarred` (boolean)
    Indicates whether this campaign is marked as Starred or not.

  - `Data.CampaignSendStartAt` (string)
    Timestamp indicating when the first message in this campaign was sent out.

  - `Data.CampaignSubject` (string)
    The email subject line used for this campaign.

  - `Data.ClickedCount` (integer)
    Number of clicked messages.

  - `Data.ContactListName` (string)
    The name of the contact list, to whic the campaign was sent. Only returned when the ShowExtraData query parameter is True.

  - `Data.DeferredCount` (integer)
    Number of deferred messages.

  - `Data.DeliveredCount` (integer)
    Number of delivered messages.

  - `Data.HardbouncedCount` (integer)
    Number of hard-bounced messages.

  - `Data.LastActivityAt` (string)
    Timestamp indicating the last registered activity for this Campaign.

  - `Data.NewsLetterID` (integer)
    Unique numeric ID of the draft linked to this campaign.

  - `Data.OpenedCount` (integer)
    Number of opened messages.

  - `Data.PreQueuedCount` (integer)
    Number of pre-queued messages.

  - `Data.ProcessedCount` (integer)
    Total number of messages processed by Mailjet.

  - `Data.QueuedCount` (integer)
    Number of queued messages.

  - `Data.SegmentName` (string)
    The name of Unique the segmentation used for this campaign (see /contactfilter). Only returned when the ShowExtraData query parameter is True.

  - `Data.SoftbouncedCount` (integer)
    Number of soft-bounced messages.

  - `Data.SpamComplaintCount` (integer)
    Number of messages marked as spam.

  - `Data.UnsubscribedCount` (integer)
    Number of registered unsubscribe requests.

  - `Data.WorkFlowExitedCount` (integer)
    Number of registered automation workflow exits.

  - `Data.WorkflowID` (integer)
    Unique numeric ID of the automation workflow that triggered this campaign.

  - `Total` (integer)
    Indicates the number of objects in the Data array.


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields

## Response 429 fields

## Response 500 fields
