V3 REFERENCE Campaigns

/campaignstatistics

Statistics related to emails processed by Mailjet, grouped in a Campaign.

List campaignstatistics resources available for this apikey, use a GET request. Alternatively, you may want to add one or more filters.

# list campaignstatistics resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/campaignstatistics
Unique Key

In addition to the resource $ID, you can also use the unique key $CustomValue to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
AXTesting A reference to AXtesting object
  • Read Only
  • [ Type TAXTesting ]
BlockedCount Number of blocked messages.
  • Read Only
  • [ Type Int64 ]
BouncedCount Number of bounced messages.
  • Read Only
  • [ Type Int64 ]
CampaignID
OR
CampaignALT
CampaignID
ID reference to Campaign
CampaignALT
Value of the CustomValue field of the related Campaign resource
  • Read Only
  • [ Type TCampaign ]
CampaignIsStarred True if the campaign is starred
  • Read Only
  • [ Type Boolean ]
CampaignSendStartAt When the campaign is started
  • Read Only
  • [ Type TRFC3339DateTime ]
CampaignSubject The subject of the campaign
  • Read Only
  • [ Type AnsiString ]
ClickedCount Number of registered clicks.
  • Read Only
  • [ Type Int64 ]
ContactListName The name of the contact list where the campaign is sent. Available if ShowExtraData filter is True
  • Read Only
  • [ Type AnsiString ]
DeliveredCount Number of messages delivered to their destination.
  • Read Only
  • [ Type Int64 ]
LastActivityAt Timestamp of last registered activity for this Campaign.
  • Read Only
  • [ Type TRFC3339DateTime ]
NewsLetterID ID reference to Newsletter A reference to the newsletter object
  • Read Only
  • [ Type TNewsLetter ]
OpenedCount Number of message open registrations.
  • Read Only
  • [ Type Int64 ]
ProcessedCount Total number of messages processed by Mailjet.
  • Read Only
  • [ Type Int64 ]
QueuedCount Number of messages waiting in send queue.
  • Read Only
  • [ Type Int64 ]
SegmentName The name of the contact filter which is applied for this campaign. Available if ShowExtraData filter is True
  • Read Only
  • [ Type AnsiString ]
SpamComplaintCount Number of spam complaints.
  • Read Only
  • [ Type Int64 ]
UnsubscribedCount The count of unsubscribed emails as result of this campaign
  • Read Only
  • [ Type Int64 ]
Workflow Unique numerical ID for the workflow
  • Read Only
  • [ Type TWorkflow ]
Filters
Name Description
AXTesting Retrieve only campaigns for a particular AXTesting ID
  • [ Type Int64 ]
Blocked Only retrieve campaigns that have blocked messages.
  • [ Type TBooleanFilter ]
Bounced Only retrieve campaigns that have bounced messages.
  • [ Type TBooleanFilter ]
CampaignStatus Only retrieve campaignstatistics resources for which CampaignStatus equals the specified value.
  • [ Type SmallInt ]
Click Only retrieve campaigns that have clicks registered for messages.
  • [ Type TBooleanFilter ]
ContactsList Only retrieve campaignstatistics resources for which ContactsList equals the specified value.
  • [ Type Int64 ]
FromTS Timestamp for the start date
  • [ Type TRFC3339DateTime ]
FromType Only retrieve campaigns for which CampaignType matches the specified value.
  • [ Type LongInt ]
GroupAX If this is True all campaigns will be grouped by their AXTesting ID
  • [ Type TBooleanFilter ]
IsDeleted If set, Only retrieve campaigns which are marked as deleted.
  • [ Type TBooleanFilter ]
IsStarred If set, Only retrieve campaigns which are marked as starred.
  • [ Type TBooleanFilter ]
LastActivityAt Only retrieve campaignstatistics resources for which LastActivityAt equals the specified value.
  • [ Type TRFC3339DateTime ]
MaxLastActivityAt Only retrieve campaigns that have LastActivityAt less than this value.
  • [ Type TRFC3339DateTime ]
MinLastActivityAt Only retrieve campaigns that have LastActivityAt larger than this value.
  • [ Type TRFC3339DateTime ]
NewsLetter Only retrieve campaignstatistics resources for which NewsLetter equals the specified value.
  • [ Type Int64 ]
Open Only retrieve campaigns that have opens registered for messages.
  • [ Type TBooleanFilter ]
Queued Only retrieve campaigns that have queued messages.
  • [ Type TBooleanFilter ]
Segmentation Retrieve only campaigns for a particular contact filter
  • [ Type Int64 ]
Sender Only retrieve campaignstatistics resources for which Sender equals the specified value.
  • [ Type Int64 ]
Sent Only retrieve campaigns that have sent messages.
  • [ Type TBooleanFilter ]
ShowExtraData If this is True fill-in ContactListName and SegmentName properties. Otherwise they are empty.
  • [ Type TBooleanFilter ]
Spam Only retrieve campaigns that have spam complaints.
  • [ Type TBooleanFilter ]
Subject Only retrieve campaigns whose subject contains the specified value.
  • [ Type AnsiString ]
ToTS Timestamp for the end date
  • [ Type TRFC3339DateTime ]
Unsubscribed Only retrieve campaignstatistics resources for which Unsubscribed count is nonzero.
  • [ Type TBooleanFilter ]
WorkflowID Retrieve only campaigns, started by a particular workflow
  • [ Type Int64 ]

Access a given campaignstatistics resource, use a GET request, providing the campaignstatistics's ID value.

# access the campaignstatistics resource identified by $ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/campaignstatistics/$ID

    
# access the resource through the CustomValue's value
# note: all keys marked as 'unique' may be used as an alternate ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/campaignstatistics/$CustomValue
    
    
Unique Key

In addition to the resource $ID, you can also use the unique key $CustomValue to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
AXTesting A reference to AXtesting object
  • Read Only
  • [ Type TAXTesting ]
BlockedCount Number of blocked messages.
  • Read Only
  • [ Type Int64 ]
BouncedCount Number of bounced messages.
  • Read Only
  • [ Type Int64 ]
CampaignID
OR
CampaignALT
CampaignID
ID reference to Campaign
CampaignALT
Value of the CustomValue field of the related Campaign resource
  • Read Only
  • [ Type TCampaign ]
CampaignIsStarred True if the campaign is starred
  • Read Only
  • [ Type Boolean ]
CampaignSendStartAt When the campaign is started
  • Read Only
  • [ Type TRFC3339DateTime ]
CampaignSubject The subject of the campaign
  • Read Only
  • [ Type AnsiString ]
ClickedCount Number of registered clicks.
  • Read Only
  • [ Type Int64 ]
ContactListName The name of the contact list where the campaign is sent. Available if ShowExtraData filter is True
  • Read Only
  • [ Type AnsiString ]
DeliveredCount Number of messages delivered to their destination.
  • Read Only
  • [ Type Int64 ]
LastActivityAt Timestamp of last registered activity for this Campaign.
  • Read Only
  • [ Type TRFC3339DateTime ]
NewsLetterID ID reference to Newsletter A reference to the newsletter object
  • Read Only
  • [ Type TNewsLetter ]
OpenedCount Number of message open registrations.
  • Read Only
  • [ Type Int64 ]
ProcessedCount Total number of messages processed by Mailjet.
  • Read Only
  • [ Type Int64 ]
QueuedCount Number of messages waiting in send queue.
  • Read Only
  • [ Type Int64 ]
SegmentName The name of the contact filter which is applied for this campaign. Available if ShowExtraData filter is True
  • Read Only
  • [ Type AnsiString ]
SpamComplaintCount Number of spam complaints.
  • Read Only
  • [ Type Int64 ]
UnsubscribedCount The count of unsubscribed emails as result of this campaign
  • Read Only
  • [ Type Int64 ]
Workflow Unique numerical ID for the workflow
  • Read Only
  • [ Type TWorkflow ]