Statistics

The statistics resources provide a read-only access to your Mailjet statistics. The different endpoints will help you extract metrics groups based on different factors, such as campaigns, contacts, lists, recipient domain providers, link clicks, etc.

Note: Use /statcounters to retrieve your key performance statistics for specific campaigns, contact lists or your API Key as a whole. See the Statistics section of our Email API Guide for more information.

get

Get general details and stats for all drafts, AB Testing objects and/or sent campaigns

get

Get information about a specific draft, AB Testing object or sent campaign

get

Get aggregated statistics, grouped by contact

get

Get aggregated statistics for a specific contact

get

Retrieve aggregated open and click statistics, grouped by recipient country

get

Get aggregated statistics for all clicked links in a campaign

get

Get aggregated statistics, grouped by list recipient

get

Get aggregated statistics for a specific list recipient

get

Retrieve statistics, aggregated by recipient's Email Service Provider (ESP)

get

Get aggregated statistics, grouped by sender

get

Get aggregated statistics for a specific sender

get

Get message-based or event-based aggregated statistics for a specific campaign, contact list or API Key

get

Get aggregated statistics for all clicked links

get

Get open or click counts, grouped by web browser

get

Get total aggregated statistics for an API Key

get

Get information on the evolution of Open, Click, Spam and / or Unsubscribe events for selected campaigns

get

Get information on the evolution of Open, Click, Spam and / or Unsubscribe events for a specific campaign

get

Get delivery and engagement statistics for all campaigns

get

Get delivery and engagement statistics for a specific campaign

get

Get aggregated statistics, grouped by recipient domain

get

Get information on the evolution of statistics by grouping them by time intervals

get

Get subscriber information and aggregated statistics for all contact lists

get

Get subscriber information and aggregated statistics for a specific contact list

get

Get message-based aggregated statistics

get

Get aggregated statistics for a specific message

get

Get aggregated statistics for opened messages

get

/campaignoverview

Retrieve delivery and engagement statistics for all drafts, AB Testing objects or sent campaigns. In addition, for each object you will see its type, edit tool used and creation time, as well as general info like the title and subject line for the campaign.

Full API path

https://api.mailjet.com/v3/REST/campaignoverview

Query string parameters

All

boolean

When true, will retrieve all campaigns, drafts and AB Testing objects that are not deleted (IsDeleted!=0). When false, both deleted and non-deleted ones will be retrieved.

Default value: false

Note: You cannot set more than one status query parameter (All, Archived, Drafts, Programmed, Sent, Starred) to True.

Archived

boolean

When true, will retrieve all archived campaigns, drafts and AB Testing objects. When false, archived ones are excluded from the response.

Default value: false

Note: You cannot set more than one status query parameter (All, Archived, Drafts, Programmed, Sent, Starred) to True.

Drafts

boolean

When true, will retrieve all drafts (and AB Testing objects in Draft mode). When false, both drafts and sent campaigns / AB Testing objects will be retrieved.

Default value: false

Note: You cannot set more than one status query parameter (All, Archived, Drafts, Programmed, Sent, Starred) to True.

ID

integer

Retrieves only the draft, sent campaign or AB testing object linked to this unique numeric ID.

Note: Mandatory, when the ID query parameter is used.

IDType

string

Retrieves only objects of the specified type:

  • Campaign - Sent campaign
  • AX - AB Testing object
  • NL - Draft

Note: Mandatory, when the ID query parameter is used.

Programmed

boolean

When true, will retrieve only drafts that are scheduled for sending - i.e. with Programmed status. When false, both programmed and draft / sent / deleted objects will be retrieved.

Default value: false

Note: You cannot set more than one status query parameter (All, Archived, Drafts, Programmed, Sent, Starred) to True.

Sent

boolean

When true, will retrieve only sent campaigns. When false, both sent and not sent objects will be retrieved.

Note: You cannot set more than one status query parameter (All, Archived, Drafts, Programmed, Sent, Starred) to True.

Starred

boolean

When true, will retrieve only starred campaigns, drafts and AB Testing objects. When false, both starred and non-starred ones will be retrieved.

Default value: false

Note: You cannot set more than one status query parameter (All, Archived, Drafts, Programmed, Sent, Starred) to True.

Subject

string

Retrieves only campaigns, drafts and AB Testing objects with the specified subject line.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

ClickedCount

integer

Indicates the number of clicked messages for this object.

DeliveredCount

integer

Indicates the number of delivered messages for this object.

EditMode

string

Indicates the type of template editor used for this campaign / draft / AB Testing object:

  • tool - Legacy drag-and-drop template editor
  • html - Legacy HTML editor
  • tool2 - Passport drag-and-drop template editor
  • html2 - HTML editor in Passport
  • mjml - MJML editor in Passport

EditType

string

Indicates the edit type used for this object:

  • full
  • unknown

ID

integer

Unique numeric ID of this campaign / draft / AB Testing object.

IDType

string

Indicates the type of the object:

  • Campaign - Sent campaign
  • AX - AB Testing object
  • NL - Draft

OpenedCount

integer

Indicates the number of opened messages for this object.

ProcessedCount

integer

Indicates the number of processed messages for this object.

SendTimeStart

integer

For drafts, this will show the creation time of the draft. For sent campaigns, it will display the sending time.

Starred

boolean

Indicates whether this object is marked as starred or not.

Status

integer

The status of the campaign or draft.

Subject

string

Subject line for this campaign / draft / AB Testing object.

Title

string

Internal user-selected title for this campaign / draft / AB Testing object.

Total

integer

get

/campaignoverview/{IDType}|{ID}

Retrieve information about a specific draft, AB Testing object or sent campaign. You will see its type, edit tool used and creation time, as well as general info like the title and subject line for the campaign.

Full API path

https://api.mailjet.com/v3/REST/campaignoverview/{IDType}|{ID}

Path parameters

IDType

string, required

Indicates the type of object you want to retrieve:

  • Campaign - Sent campaign
  • AX - AB Testing object
  • NL - Draft

ID

integer, required

Unique numeric ID of the object you want to retrieve - Campaign, draft or AB testing object.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

ClickedCount

integer

Indicates the number of clicked messages for this object.

DeliveredCount

integer

Indicates the number of delivered messages for this object.

EditMode

string

Indicates the type of template editor used for this campaign / draft / AB Testing object:

  • tool - Legacy drag-and-drop template editor
  • html - Legacy HTML editor
  • tool2 - Passport drag-and-drop template editor
  • html2 - HTML editor in Passport
  • mjml - MJML editor in Passport

EditType

string

Indicates the edit type used for this object:

  • full
  • unknown

ID

integer

Unique numeric ID of this campaign / draft / AB Testing object.

IDType

string

Indicates the type of the object:

  • Campaign - Sent campaign
  • AX - AB Testing object
  • NL - Draft

OpenedCount

integer

Indicates the number of opened messages for this object.

ProcessedCount

integer

Indicates the number of processed messages for this object.

SendTimeStart

integer

For drafts, this will show the creation time of the draft. For sent campaigns, it will display the sending time.

Starred

boolean

Indicates whether this object is marked as starred or not.

Status

integer

The status of the campaign or draft.

Subject

string

Subject line for this campaign / draft / AB Testing object.

Title

string

Internal user-selected title for this campaign / draft / AB Testing object.

Total

integer

get

/contactstatistics

Retrieve a list of overall aggregated delivery and engagement statistics, grouped by contact.

Full API path

https://api.mailjet.com/v3/REST/contactstatistics

Query string parameters

Blocked

boolean

When true, will retrieve statistics only for contacts that have at least one blocked message. When false, contacts with blocked messages will be excluded from the response.

Bounced

boolean

When true, will retrieve statistics only for contacts that have at least one bounced message. When false, contacts with bounced messages will be excluded from the response.

Click

boolean

When true, will retrieve statistics only for contacts that have at least one message with a registered click. When false, contacts with clicked messages will be excluded from the response.

Deferred

boolean

When true, will retrieve statistics only for contacts that have at least one deferred message. When false, contacts with deferred messages will be excluded from the response.

Hardbounced

boolean

When true, will retrieve statistics only for contacts that have at least one hard-bounced message. When false, contacts with hard-bounced messages will be excluded from the response.

LastActivityAt

string

Retrieves statistics only for contacts, for which LastActivityAt (their last received email, open, click etc.) equals the specified timestamp.

MaxLastActivityAt

string

Retrieves statistics only for contacts, for which LastActivityAt (their last received email, open, click etc.) is before the specified timestamp.

MinLastActivityAt

string

Retrieves statistics only for contacts, for which LastActivityAt (their last received email, open, click etc.) is after the specified timestamp.

Open

boolean

When true, will retrieve statistics only for contacts that have messages with registered opens. When false, contacts with opened messages will be excluded from the response.

Queued

boolean

When true, will retrieve statistics only for contacts that have queued messages. When false, contacts with queued messages will be excluded from the response.

Recalculate

boolean

When true, will reload all data from the database.

Note: Deprecated for accounts created after April 5th, 2018.

Sent

boolean

When true, will retrieve statistics only for contacts that have sent messages. When false, contacts with sent messages will be excluded from the response.

Spam

boolean

When true, will retrieve statistics for only contacts that have messages marked as Spam. When false, contacts with Spam messages will be excluded from the response.

Softbounced

boolean

When true, will retrieve statistics only for contacts that have soft-bounced messages. When false, contacts with soft-bounced messages will be excluded from the response.

Unsubscribed

boolean

When true, will retrieve statistics only for contacts that have unsubscribed from a list at least once. When false, contacts with unsubscribe events will be excluded from the response.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

ContactID

integer

Unique numeric ID for this contact.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

LastActivityAt

string

Timestamp indicating the last registered activity for this contact.

MarketingContacts

integer

Number of marketing contacts.

OpenedCount

integer

Number of opened messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

UserMarketingContacts

integer

Number of marketing contacts.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/contactstatistics/{contact_ID or contact_email}

Retrieve a list of overall aggregated delivery and engagement statistics for a specific contact.

Full API path

https://api.mailjet.com/v3/REST/contactstatistics/{contact_ID}

Path parameters

contact_ID

integer, required

Unique numeric ID of the contact you want to retrieve the statistics for.

contact_email

The email address of the contact you want to retrieve statistics for.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

ContactID

integer

Unique numeric ID for this contact.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

LastActivityAt

string

Timestamp indicating the last registered activity for this contact.

MarketingContacts

integer

Number of marketing contacts.

OpenedCount

integer

Number of opened messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

UserMarketingContacts

integer

Number of marketing contacts.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/geostatistics

Retrieve aggregated open and click statistics, grouped by recipient country.

Full API path

https://api.mailjet.com/v3/REST/geostatistics

Query string parameters

CampaignID

integer

Retrieves geographic statistics only for the specified Campaign ID.

ContactsList

integer

Retrieves geographic statistics only for the specified contact list ID.

CustomCampaign

string

Retrieves geographic statistics only for the campaign with the specified Custom Value.

From

string

Retrieves geographic statistics only for messages sent from the specified Sender Email address.

FromDomain

string

Retrieves geographic statistics only for messages sent from the specified domain.

FromID

integer

Retrieves geographic statistics only for messages sent from the sender address with the specified ID.

FromTS

string

Retrieves geographic statistics only for messages sent after the specified timestamp.

FromType

integer

Retrieves geographic statistics only for a specific type of messages:

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

IsDeleted

boolean

When true, will retrieve geographic statistics only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

IsNewsletterTool

boolean

When true, will retrieve geographic statistics only for campaigns created with the Legacy template builder. When false, campaigns created with the Legacy builder will be excluded from the response.

IsStarred

boolean

When true, will retrieve geographic statistics only for starred campaigns. When false, starred campaigns will be excluded from the response.

MessageStatus

integer

Retrieves geographic statistics only for messages with the specified status:

  • 0 (Processed)
  • 1 (Queued)
  • 2 (Sent)
  • 3 (Opened)
  • 4 (Clicked)
  • 5 (Bounce)
  • 6 (Spam)
  • 7 (Unsub)
  • 8 (Blocked)
  • 9 (SoftBounce)
  • 10 (HardBounce)
  • 11 (Deferred)

Period

string

Retrieves geographic statistics only for messages sent between the start of the selected period and the current timestamp.

  • Day - since the start of the current day
  • Week - since the start of the current week
  • Month - since the start of the current month
  • Year - since the start of the current year

ToTS

string

Retrieves geographic statistics only for messages sent before the specified timestamp.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

ClickedCount

integer

Number of clicked messages.

Country

string

Two-letter ISO code identifying the country, where the recipient generating the event is located.

OpenedCount

integer

Number of opened messages.

Total

integer

get

/listrecipientstatistics

Retrieve a list of overall aggregated delivery and engagement statistics for all list recipients. A list recipient object manages the relationship between a `contact` and a `contactslist` - every instance of a contact being added to a list creates a new list recipient.

Full API path

https://api.mailjet.com/v3/REST/listrecipientstatistics

Query string parameters

Blocked

boolean

When true, will retrieve statistics only for list recipients that have blocked messages. When false, contacts with blocked messages will be excluded from the response.

Bounced

boolean

When true, will retrieve statistics only for list recipients that have bounced messages. When false, contacts with bounced messages will be excluded from the response.

Click

boolean

When true, will retrieve statistics only for list recipients that have messages with registered clicks. When false, contacts with clicked messages will be excluded from the response.

Contact

integer

Retrieves only list recipient statistics for the specified contact ID.

ContactsList

integer

Retrieves statistics only for list recipients that are part of the specified contact list ID.

IsExcludedFromCampaigns

boolean

When true, will retrieve statistics only for recipients linked to contacts that have been excluded from campaigns. When false, only recipients who are not linked to excluded contacts will be part of the response.

IsUnsubscribed

boolean

When true, will retrieve statistics only for unsubscribed list recipients. When false, unsubscribed recipients will be excluded from the response.

LastActivityAt

string

Retrieves statistics only for list recipients, for which LastActivityAt (their last received email, open, click etc.) equals the specified timestamp.

MaxLastActivityAt

string

Retrieves statistics only for list recipients, for which LastActivityAt (their last received email, open, click etc.) is before the specified timestamp.

MaxUnsubscribedAt

string

Retrieves statistics only for list recipients, for which UnsubscribedAt (the time they unsubscribed) is before the specified timestamp.

MinLastActivityAt

string

Retrieves statistics only for list recipients, for which LastActivityAt (their last received email, open, click etc.) is after the specified timestamp. this value.

MinUnsubscribedAt

string

Retrieves statistics only for list recipients, for which UnsubscribedAt (the time they unsubscribed) is after the specified timestamp.

Open

boolean

When true, will retrieve statistics only for list recipients that have messages with registered opens. When false, contacts with opened messages will be excluded from the response.

Queued

boolean

When true, will retrieve statistics only for contacts that have queued messages. When false, contacts with queued messages will be excluded from the response.

Sent

boolean

When true, will retrieve statistics only for list recipients that have sent messages. When false, contacts with sent messages will be excluded from the response.

ShowExtraData

boolean

When true, will display the contact properties associated with this list recipient in the "Data" array object in the response.

Default value: false

Spam

boolean

When true, will retrieve statistics only for list recipients that have messages marked as Spam. When false, contacts with Spam messages will be excluded from the response.

TimeZone

string

Selects the time zone for this user.

Unsubscribed

boolean

When true, will retrieve statistics only for list recipients that have unsubscribed from a list at least once. When false, contacts with unsubscribe events will be excluded from the response.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

Data

array

A JSON array containing contact properties and their values. Data information will be shown if the ShowExtraData query parameter is set to true.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

LastActivityAt

string

Timestamp indicating the last registered activity for this list recipient.

ListRecipientID

integer

Unique numeric ID for this list recipient.

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/listrecipientstatistics/{listrecipient_ID}

Retrieve a list of overall aggregated delivery and engagement statistics for a specific list recipient.

Full API path

https://api.mailjet.com/v3/REST/listrecipientstatistics/{listrecipient_ID}

Path parameters

listrecipient_ID

integer, required

Unique numeric ID of this list recipient.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

Data

array

A JSON array containing contact properties and their values. Data information will be shown if the ShowExtraData query parameter is set to true.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

LastActivityAt

string

Timestamp indicating the last registered activity for this list recipient.

ListRecipientID

integer

Unique numeric ID for this list recipient.

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/statistics/recipient-esp

Get aggregated delivery and engagement statistics, grouped by recipient Email Service Provider (ESP).

Note: This is a new endpoint. Only available for accounts created after April 5th, 2018.

Full API path

https://api.mailjet.com/v3/REST/statistics/recipient-esp

Query string parameters

CampaignID

integer, required

Retrieves statistics only for the specified campaign ID.

ESP_Name

integer

Retrieves statistics for the given ESPs only. Multiple ESPs can be separated with commas. The list of recognized ESPs you can enter as values is:

  • gmail
  • gsuite (gmail for pro)
  • orange
  • yahoo
  • microsoft
  • free
  • sfr
  • laposte
  • aol
  • comcast
  • gmx
  • web.de
  • t-online
  • freenet
  • movistar
  • vodafone
  • jazztel
  • ono
  • euskaltel
  • mundo-r
  • sapo
  • zoho
  • ovh
  • KPN
  • telenet
  • swisscom
  • bnet
  • messagelabs (symantec)
  • others

When entered, the ESP names should be URL-encoded.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

AttemptedMessagesCount

integer

Total number of messages, which Mailjet attempted to send to the given recipient ESP. Blocked messages are not included in this count.

ClickedMessagesCount

integer

Total number of clicked messages for this recipient ESP.

DeferredMessagesCount

integer

Number of messages which were deferred from the given recipient ESP. Mailjet will continue trying to send those messages for 3 days, after which they will become soft-bounced.

DeliveredMessagesCount

integer

Total number of messages, which Mailjet delivered to the given recipient ESP.

HardBouncedMessagesCount

integer

Total number of messages, which were hard-bounced from this recipient ESP.

ESPName

string

Name of the recipient's Email Service Provider (ESP). "Others" will display stats for messages sent to all ESPs that are not in the list of recognizable ones (see the ESP_Name query parameter).

OpenedMessagesCount

integer

Total number of messages opened by a recipient for this ESP.

SoftBouncedMessagesCount

integer

Total number of messages, which were soft-bounced from this recipient ESP.

SpamReportsCount

integer

Number of messages, marked as spam by recipients from this ESP.

UnsubscribedMessagesCount

integer

Number of mNumber of messages that a recipient unsubscribed from for this ESP.

OpenRate

number

Email open rate, based on delivered messages, for this ESP.

ClickThroughRate

number

Email click-through rate, based on opened messages, for this ESP.

SoftBouncedRate

number

Email soft-bounce rate, based on attempted messages, for this ESP.

HardBouncedRate

number

Email hard-bounce rate, based on attempted messages, for this ESP.

UnsubscribedRate

number

Email unsubscribe rate, based on delivered messages, for this ESP.

SpamReportsRate

number

Rate of spam reports, based on delivered messages, for this ESP.

DeferredRate

number

Deferred email rate, based on attempted messages, for this ESP.

Total

integer

get

/senderstatistics

Retrieve a list of overall aggregated delivery and engagement statistics, grouped by sender ID.

Full API path

https://api.mailjet.com/v3/REST/senderstatistics

Query string parameters

Domain

string

Retrieves statistics only for senders where the domain name of the email address or domain matches the specified value - e.g. mailjet.com.

Email

string

Retrieves statistics only for senders where the local part of the email matches the specified value - e.g. example@.

Sender

integer

Retrieve statistics only for the specified sender ID.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

LastActivityAt

string

Timestamp indicating the last registered activity linked to messages sent by this sender.

HardBouncedCount

integer

Number of hard-bounced messages.

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SenderID

integer

Unique numeric ID for this sender.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/senderstatistics/{sender_ID}

Retrieve a list of overall aggregated delivery and engagement statistics for a specific sender ID.

Full API path

https://api.mailjet.com/v3/REST/senderstatistics/{sender_ID}

Path parameters

sender_ID

integer, required

Unique numeric ID of the sender you want to retrieve statistics for.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

LastActivityAt

string

Timestamp indicating the last registered activity linked to messages sent by this sender.

HardBouncedCount

integer

Number of hard-bounced messages.

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SenderID

integer

Unique numeric ID for this sender.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/statcounters

Get aggregated statistics for a specific campaign, list of API Key. Both message-based and event-based stats can be retrieved.

Note: This is a new endpoint. Only available for campaigns sent after April 5th, 2018.

Full API path

https://api.mailjet.com/v3/REST/statcounters

Query string parameters

CounterSource

string, required

Defines the scope of aggregation for your statistics.

Possible values:

  • Campaign
  • APIKey
  • List : contact list

CounterResolution

string, required

Defines the timescale of aggregation for your statistics.

Possible values:

  • Highest (5-minute intervals)
  • Hour
  • Day
  • Lifetime

CounterTiming

string, required

Defines the reference timestamp for aggregation of statistics. More information

Possible values:

  • Message
  • Event

FromTS

string

Retrieve statistics for messages sent after the specified timestamp. Mandatory when CounterResolution is different from Lifetime.

SourceID

integer

List of either Campaign IDs or ContactsList IDs (separated by commas). Mandatory when CounterSource indicates Campaign or List.

ToTS

string

Retrieve statistics for campaigns sent before the specified timestamp.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

APIKeyID

integer

Unique numeric ID for this API Key.

EventClickDelay

integer

Total click delay (in seconds). Equals the sum of delays between the sending timestamp and click timestamp for all clicked messages (only taking into account the first click).

EventClickedCount

integer

Total number of click events.

EventOpenDelay

integer

Total Open delay (in seconds). Equals the sum of delays between the sending timestamp and open timestamp for all opened messages (only taking into account the first open).

EventOpenedCount

integer

Total number of open events.

EventSpamCount

integer

Total number of spam reports.

EventUnsubscribedCount

integer

Total number of unsubscriptions.

EventWorkflowExitedCount

integer

Total number of workflow exits.

MessageBlockedCount

integer

Number of blocked messages.

MessageClickedCount

integer

Number of clicked messages.

MessageDeferredCount

integer

Number of deferred messages.

MessageHardBouncedCount

integer

Number of hard-bounced messages.

MessageOpenedCount

integer

Number of opened messages.

MessageQueuedCount

integer

Number of queued messages.

MessageSentCount

integer

Number of sent messages.

MessageSoftBouncedCount

integer

Number of soft-bounced messages.

MessageSpamCount

integer

Number of messages marked as spam.

MessageUnsubscribedCount

integer

Number of messages with unsubscribe requests.

MessageWorkFlowExitedCount

integer

Number of contacts that exited a workflow.

SourceID

integer

Unique numeric ID for a campaign or contact list. Will indicate a campaign ID when CounterSource=Campaign and a list ID when CounterSource=List.

Timeslice

string

Timestamp for when the count was registered. Depends on the value selected for CounterResolution.

Total

integer

Total number of processed messages.

Total

integer

get

/toplinkclicked

Retrieve a list of overall aggregated click statistics, grouped by URL.

Note: If no query parameters are used, will return stats with FromTS equal to the current day at 00:00 UTC.

Full API path

https://api.mailjet.com/v3/REST/toplinkclicked

Query string parameters

ActualClicks

boolean

When true, will retrieve statistics for the total number of click events. When false, will retrieve a count of unique (deduplicated) clicks.

Default value: false

CampaignID

integer

Retrieves link click statistics only for the specified Campaign ID.

Contact

integer

Retrieves link click statistics only for the specified contact ID.

ContactsList

integer

Retrieves link click statistics only for the specified contact list ID.

CustomCampaign

string

Retrieves link click statistics only for the campaign with the specified Custom Value.

From

string

Retrieves link click statistics only for messages sent from the specified Sender Email address.

FromDomain

string

Retrieves link click statistics only for messages sent from the specified domain.

FromID

integer

Retrieves link click statistics only for messages sent from the sender address with the specified ID.

FromTS

string

Retrieves link click statistics only for messages sent after the specified timestamp.

FromType

integer

Retrieves link click statistics only for a specific type of messages:

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

IsDeleted

boolean

When true, will retrieve link click statistics only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

IsNewsletterTool

boolean

When true, will retrieve link click statistics only for campaigns created with the Legacy template builder. When false, campaigns created with the Legacy builder will be excluded from the response.

IsStarred

boolean

When true, will retrieve link click statistics only for starred campaigns. When false, starred campaigns will be excluded from the response.

Message

integer

Retrieves link click statistics only for the specified message ID.

Period

string

Retrieves link click statistics only for messages sent between the start of the selected period and the current timestamp.

  • Day - since the start of the current day
  • Week - since the start of the current week
  • Month - since the start of the current month
  • Year - since the start of the current year

ToTS

string

Retrieves link click statistics only for messages sent before the specified timestamp.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

ClickedCount

integer

Number of unique (deduplicated) clicks for this link. When ActualClicks=true, will return the total number of clicks instead.

LinkId

integer

Unique numeric ID for this link.

Url

string

The URL of the clicked link.

Total

integer

get

/useragentstatistics

Retrieve a list of open or click statistics, grouped by web browser.

Note: If no query parameters are used, will return stats with FromTS equal to the current day at 00:00 UTC.

Full API path

https://api.mailjet.com/v3/REST/useragentstatistics

Query string parameters

CampaignID

integer

Retrieves statistics only for the specified Campaign ID.

ContactsList

integer

Retrieves statistics only for the specified contact list ID.

CustomCampaign

string

Retrieves statistics only for the campaign with the specified Custom Value.

Event

string

Type of event you want the count for.

Possible values:

  • open
  • click

Default value: click

ExcludePlatform

string

Exclude browsers running on this platform from response.

From

string

Retrieves statistics only for messages sent from the specified Sender Email address.

FromDomain

string

Retrieves statistics only for messages sent from the specified domain.

FromID

integer

Retrieves statistics only for messages sent from the sender address with the specified ID.

FromTS

string

Retrieves statistics only for messages sent after the specified timestamp.

FromType

integer

Retrieves statistics only for a specific type of messages:

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

IsDeleted

boolean

When true, will retrieve statistics only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

IsNewsletterTool

boolean

When true, will retrieve statistics only for campaigns created with the Legacy template builder. When false, campaigns created with the Legacy builder 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.

Period

string

Retrieves statistics only for messages sent between the start of the selected period and the current timestamp.

  • Day - since the start of the current day
  • Week - since the start of the current week
  • Month - since the start of the current month
  • Year - since the start of the current year

Platform

string

Retrieves statistics only for the specified platform.

ToTS

string

Retrieves statistics only for messages sent before the specified timestamp.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

Count

integer

Number of clicks using this browser.

DistinctCount

integer

User of messages clicked using this browser.

Platform

string

Platform on which the browser runs.

UserAgent

string

Description of the user agent.

Total

integer

get

/apikeytotals

Retrieve overall aggregated delivery and engagement statistics for the API Key used for authentication.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve aggregated stats grouped by API Key.

Full API path

https://api.mailjet.com/v3/REST/apikeytotals

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

LastActivity

integer

Unix timestamp of the last registered activity for this API Key.

Note: only returned for accounts created before April 5th, 2018.

OpenedCount

integer

Number of opened messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of messages waiting in the send queue.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamcomplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/campaigngraphstatistics

Retrieve information on Open, Click, Spam and / or Unsubscribe events for selected campaigns, evolving overtime with intervals of 15 or 30 minutes. At least one of the event query parameters (`Click`, `Open`, `Spam`, `Unsub`) needs to be set to `true`.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve event evolution stats.

Full API path

https://api.mailjet.com/v3/REST/campaigngraphstatistics

Query string parameters

Click

boolean

When true, will retrieve the number of clicked messages in ClickedCount. Otherwise the click count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

IDS

string, required

Retrieves only statistics for the specified campaign IDs. Multiple IDs can be separated with a comma.

Open

boolean

When true, will retrieve the number of opened messages in OpenedCount. Otherwise the open count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

Range

string

Selects a period of time since the start of the campaign, for which you want to retrieve evolution statistics. If you select 24h (24 hours), the stat intervals will be 15 minutes long. If 7d (7 days) is selected, the intervals will be 30 minutes long.

Spam

boolean

When true, will retrieve the number of messages marked as spam in SpamCount. Otherwise the spam count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

Unsub

boolean

When true, will retrieve the number of unsubscribe events in UnsubCount. Otherwise the unsubscribe count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

Clickcount

integer

Number of clicked messages for this time interval. The proper count is returned if the Click parameter is set as true. Otherwise the click count will not be calculated and a -1 value will be returned instead.

ID

integer

Unique numeric ID for the campaign.

Opencount

integer

Number of opened messages for this time interval. The proper count is returned if the Open parameter is set as true. Otherwise the open count will not be calculated and a -1 value will be returned instead.

Spamcount

integer

Number of messages marked as spam for this time interval. The proper count is returned if the Spam parameter is set as true. Otherwise will the spam count will not be calculated and a -1 value will be returned instead.

Tick

integer

The time lapsed since the start of the campaigns, in seconds.

Unsubcount

integer

Number of unsubscribe events for this time interval. The proper count is returned if the Unsub parameter is set as true. Otherwise will the unsubscribe count will not be calculated and a -1 value will be returned instead.

Total

integer

get

/campaigngraphstatistics/{campaign_ID}

Retrieve information on Open, Click, Spam and / or Unsubscribe events for a specific campaign, evolving overtime with intervals of 15 or 30 minutes. At least one of the event query parameters (`Click`, `Open`, `Spam`, `Unsub`) needs to be set to `true`.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve event evolution stats.

Full API path

https://api.mailjet.com/v3/REST/campaigngraphstatistics/{campaign_ID}

Path parameters

campaign_ID

integer, required

Unique numeric ID for this campaign you want to retrieve the stats evolution for.

Query string parameters

Click

boolean

When true, will retrieve the number of clicked messages in ClickedCount. Otherwise the click count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

Open

boolean

When true, will retrieve the number of opened messages in OpenedCount. Otherwise the open count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

Range

string

Selects a period of time since the start of the campaign, for which you want to retrieve evolution statistics. If you select 24h (24 hours), the stat intervals will be 15 minutes long. If 7d (7 days) is selected, the intervals will be 30 minutes long.

Spam

boolean

When true, will retrieve the number of messages marked as spam in SpamCount. Otherwise the spam count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

Unsub

boolean

When true, will retrieve the number of unsubscribe events in UnsubCount. Otherwise the unsubscribe count is not calculated and a -1 value is returned instead.

Default value: false

Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

Clickcount

integer

Number of clicked messages for this time interval. The proper count is returned if the Click parameter is set as true. Otherwise the click count will not be calculated and a -1 value will be returned instead.

ID

integer

Unique numeric ID for the campaign.

Opencount

integer

Number of opened messages for this time interval. The proper count is returned if the Open parameter is set as true. Otherwise the open count will not be calculated and a -1 value will be returned instead.

Spamcount

integer

Number of messages marked as spam for this time interval. The proper count is returned if the Spam parameter is set as true. Otherwise will the spam count will not be calculated and a -1 value will be returned instead.

Tick

integer

The time lapsed since the start of the campaigns, in seconds.

Unsubcount

integer

Number of unsubscribe events for this time interval. The proper count is returned if the Unsub parameter is set as true. Otherwise will the unsubscribe count will not be calculated and a -1 value will be returned instead.

Total

integer

get

/campaignstatistics

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.

Full API path

https://api.mailjet.com/v3/REST/campaignstatistics

Query string 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.

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.

MaxLastActivityAt

string

Retrieves statistics only for campaigns, for which LastActivityAt (their last received email, open, click etc.) is before the specified timestamp.

MinLastActivityAt

string

Retrieves statistics only for campaigns, for which LastActivityAt (their last received email, open, click etc.) is after the specified timestamp.

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.

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.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

AXTestingID

object

Unique numeric ID of the AX Testing object this campaign is linked to.

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

CampaignID

integer

Unique numeric ID of this campaign.

CampaignIsStarred

boolean

Indicates whether this campaign is marked as Starred or not.

CampaignSendStartAt

string

Timestamp indicating when the first message in this campaign was sent out.

CampaignSubject

string

The email subject line used for this campaign.

ClickedCount

integer

Number of clicked messages.

ContactListName

string

The name of the contact list, to whic the campaign was sent. Only returned when the ShowExtraData query parameter is True.

DeferredCount

integer

Number of deferred messages.

DeliveredCount

integer

Number of delivered messages.

HardbouncedCount

integer

Number of hard-bounced messages.

LastActivityAt

string

Timestamp indicating the last registered activity for this Campaign.

NewsLetterID

integer

Unique numeric ID of the draft linked to this campaign.

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Total number of messages processed by Mailjet.

QueuedCount

integer

Number of queued messages.

SegmentName

string

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

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as spam.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

WorkflowID

integer

Unique numeric ID of the automation workflow that triggered this campaign.

Total

integer

get

/campaignstatistics/{campaign_ID or CustomCampaign}

Retrieve general information, as well as aggregated delivery and engagement statistics for a specific campaign.

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

Full API path

https://api.mailjet.com/v3/REST/campaignstatistics/{campaign_ID}

Path parameters

campaign_ID

integer, required

Unique numeric ID of the campaign you want to retrieve statistics for.

CustomCampaign

The CustomValue of the campaign you want to retrieve statistics for.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

AXTestingID

object

Unique numeric ID of the AX Testing object this campaign is linked to.

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

CampaignID

integer

Unique numeric ID of this campaign.

CampaignIsStarred

boolean

Indicates whether this campaign is marked as Starred or not.

CampaignSendStartAt

string

Timestamp indicating when the first message in this campaign was sent out.

CampaignSubject

string

The email subject line used for this campaign.

ClickedCount

integer

Number of clicked messages.

ContactListName

string

The name of the contact list, to whic the campaign was sent. Only returned when the ShowExtraData query parameter is True.

DeferredCount

integer

Number of deferred messages.

DeliveredCount

integer

Number of delivered messages.

HardbouncedCount

integer

Number of hard-bounced messages.

LastActivityAt

string

Timestamp indicating the last registered activity for this Campaign.

NewsLetterID

integer

Unique numeric ID of the draft linked to this campaign.

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Total number of messages processed by Mailjet.

QueuedCount

integer

Number of queued messages.

SegmentName

string

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

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as spam.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

WorkflowID

integer

Unique numeric ID of the automation workflow that triggered this campaign.

Total

integer

get

/domainstatistics

Retrieve a list of overall aggregated delivery and engagement statistics, grouped by recipient domain. If no query parameters are used in the path URL, only information about messages sent since 00:00 UTC on the current day will be returned.

Note: This is a legacy endpoint. We advise using /statistics/recipient-esp to retrieve aggregated domain stats.

Full API path

https://api.mailjet.com/v3/REST/domainstatistics

Query string parameters

CampaignID

integer

Retrieves recipient domain statistics only for the specified Campaign ID.

ContactsList

integer

Retrieves recipient domain statistics only for the specified contact list ID.

CustomCampaign

string

Retrieves recipient domain statistics only for the campaign with the specified Custom Value.

From

string

Retrieves recipient domain statistics only for messages sent from the specified Sender Email address.

FromDomain

string

Retrieves recipient domain statistics only for messages sent from the specified domain.

FromID

integer

Retrieves recipient domain statistics only for messages sent from the sender address with the specified ID.

FromTS

string

Retrieves recipient domain statistics only for messages sent after the specified timestamp.

FromType

integer

Retrieves recipient domain statistics only for a specific type of messages:

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

IsDeleted

boolean

When true, will retrieve recipient domain statistics only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

IsNewsletterTool

boolean

When true, will retrieve recipient domain statistics only for campaigns created with the Legacy template builder. When false, campaigns created with the Legacy builder will be excluded from the response.

IsStarred

boolean

When true, will retrieve recipient domain statistics only for starred campaigns. When false, starred campaigns will be excluded from the response.

MessageStatus

integer

Retrieves recipient domain statistics only for messages with the specified status:

  • 0 (Processed)
  • 1 (Queued)
  • 2 (Sent)
  • 3 (Opened)
  • 4 (Clicked)
  • 5 (Bounce)
  • 6 (Spam)
  • 7 (Unsub)
  • 8 (Blocked)
  • 9 (SoftBounce)
  • 10 (HardBounce)
  • 11 (Deferred)

Period

string

Retrieves recipient domain statistics only for messages sent between the start of the selected period and the current timestamp.

  • Day - since the start of the current day
  • Week - since the start of the current week
  • Month - since the start of the current month
  • Year - since the start of the current year

ToTS

string

Retrieves recipient domain statistics only for messages sent before the specified timestamp.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of registered clicks.

DeliveredCount

integer

Number of messages delivered to their destination.

Domain

string

The name of the recipient domain.

ID

integer

Unique numeric ID for this domain name. Currently not returned by this endpoint.

OpenedCount

integer

Number of opened messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

Total

integer

get

/graphstatistics

Retrieve information on the evolution of statistics by grouping them by time intervals. You need to specify the time intervals with the `Scale` query parameter, as well as the overall time period with `Period` or `FromTS` and `ToTS`.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve information on the evolution of statistics.

Full API path

https://api.mailjet.com/v3/REST/graphstatistics

Query string parameters

CampaignID

integer

Retrieves stats evolution only for the specified Campaign ID.

ContactID

integer

Retrieves stats evolution only for messages sent to the specified contact ID.

ContactsList

integer

Retrieves stats evolution only for the specified contact list ID.

CustomCampaign

string

Retrieves stats evolution only for the campaign with the specified Custom Value.

From

string

Retrieves stats evolution only for messages sent from the specified Sender Email address.

FromDomain

string

Retrieves stats evolution only for messages sent from the specified domain.

FromID

integer

Retrieves stats evolution only for messages sent from the sender address with the specified ID.

FromTS

string

Retrieves stats evolution only for messages sent after the specified timestamp. Mandatory along with ToTS, unless Period is specified instead.

FromType

integer

Retrieves stats evolution only for a specific type of messages:

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

IsDeleted

boolean

When true, will retrieve stats evolution only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

IsNewsletterTool

boolean

When true, will retrieve stats evolution only for campaigns created with the Legacy template builder. When false, campaigns created with the Legacy builder will be excluded from the response.

IsStarred

boolean

When true, will retrieve stats evolution only for starred campaigns. When false, starred campaigns will be excluded from the response.

MessageStatus

integer

Retrieves stats evolution only for messages with the specified status:

  • 0 (Processed)
  • 1 (Queued)
  • 2 (Sent)
  • 3 (Opened)
  • 4 (Clicked)
  • 5 (Bounce)
  • 6 (Spam)
  • 7 (Unsub)
  • 8 (Blocked)
  • 9 (SoftBounce)
  • 10 (HardBounce)
  • 11 (Deferred)

Period

string

Retrieves stats evolution only for messages sent between the start of the selected period and the current timestamp. Mandatory, unless FromTS and ToTs are specified instead.

  • Day - since the start of the current day
  • Week - since the start of the current week
  • Month - since the start of the current month
  • Year - since the start of the current year

Scale

string, required

Scale of the time intervals for the statistics:

  • Hour
  • Day
  • Week
  • Month
  • Year

TimeShift

string

Time shift for the interval

ToTS

string

Retrieves stats evolution only for messages sent before the specified timestamp. Mandatory along with FromTS, unless Period is specified instead.

WorkflowID

integer

Retrieves stats evolution only for messages triggered by the specified automation workflow.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of registered clicks.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

OpenedCount

integer

Number of opened messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

RefTimestamp

string

Timestamp indicating the start of the time interval for this stats object. The end of the time interval depends on the selected Scale.

SendtimeStart

integer

The minimum timestamp for this time interval.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamcomplaintCount

integer

Number of messages marked as Spam by the recipients.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

Total

integer

get

/liststatistics

Retrieve a list of overall aggregated delivery and engagement statistics, as well as general details and subscriber counts for all contact lists.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve aggregated statistics for contact lists.

Full API path

https://api.mailjet.com/v3/REST/liststatistics

Query string parameters

Address

string

Retrieves statistics only for the contact list linked to the specified email address generated by Mailjet.

CalcExcludedSubscriber

boolean

When true, will return the number of list members that are excluded from campaigns in ExcludedSubscriberCount.

Default value: false

ContactsListID

integer

Retrieves statistics only for the specified contact list ID.

ExcludeID

integer

Unique numeric ID for this object.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

ActiveCount

integer

Deprecated - Number of active list members.

ActiveExcludedSubscriberCount

integer

Deprecated - Total number of active contacts excluded from campaigns.

ActiveUnsubscribedCount

integer

Deprecated - Number of registered unsubscribe requests.

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

CreatedAt

string

Timestamp indicating when the contact list was created.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

ExcludedSubscriberCount

integer

Number of list members that have been excluded from campaigns. Only calculated when CalcExcludedSubscriber is specified as True in the query.

HardbouncedCount

integer

Number of hard-bounced messages.

ID

integer

Unique numeric ID assigned to this contact list.

IsDeleted

boolean

Indicates whether this list is deleted or not.

LastActivityAt

string

Timestamp indicating the last registered activity for this contact list.

Name

string

User-specified name for this contact list (must be unique).

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

SubscriberCount

integer

Number of subscribers.

UnsubscribedCount

integer

Number of contacts registered in this contact list. Includes contacts that were unsubscribed from the list, as well as ones that are excluded from campaigns.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/liststatistics/{list_ID}

Retrieve a list of overall aggregated delivery and engagement statistics, as well as general details and subscriber count for a specific contact list.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve aggregated statistics for contact lists.

Full API path

https://api.mailjet.com/v3/REST/liststatistics/{list_ID}

Path parameters

list_ID

integer, required

Unique numeric ID assigned to this contact list.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

ActiveCount

integer

Deprecated - Number of active list members.

ActiveExcludedSubscriberCount

integer

Deprecated - Total number of active contacts excluded from campaigns.

ActiveUnsubscribedCount

integer

Deprecated - Number of registered unsubscribe requests.

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

ClickedCount

integer

Number of clicked messages.

CreatedAt

string

Timestamp indicating when the contact list was created.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

ExcludedSubscriberCount

integer

Number of list members that have been excluded from campaigns. Only calculated when CalcExcludedSubscriber is specified as True in the query.

HardbouncedCount

integer

Number of hard-bounced messages.

ID

integer

Unique numeric ID assigned to this contact list.

IsDeleted

boolean

Indicates whether this list is deleted or not.

LastActivityAt

string

Timestamp indicating the last registered activity for this contact list.

Name

string

User-specified name for this contact list (must be unique).

OpenedCount

integer

Number of opened messages.

PreQueuedCount

integer

Number of pre-queued messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of queued messages.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

SubscriberCount

integer

Number of subscribers.

UnsubscribedCount

integer

Number of contacts registered in this contact list. Includes contacts that were unsubscribed from the list, as well as ones that are excluded from campaigns.

WorkFlowExitedCount

integer

Number of registered automation workflow exits.

Total

integer

get

/messagestatistics

Retrieve message-based aggregated delivery and engagement statistics. Message-based stats link the delivery rates / contact engagement details to the sending time of the messages. If no query parameters are used, the stats shown will be for messages sent since 00:00 UTC on the current day.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve message-based aggregated stats.

Full API path

https://api.mailjet.com/v3/REST/messagestatistics

Query string parameters

CampaignID

integer

Retrieves statistics only for the specified Campaign ID.

ContactEmail

string

Retrieves statistics only for this contact email address.

ContactID

integer

Retrieves statistics only for this contact ID.

ContactListID

integer

Retrieves statistics only for this contact list ID.

ContactsList

integer

Retrieves statistics only for this contact list ID.

CustomCampaign

string

Retrieves statistics only for the campaign with the specified Custom Value.

From

string

Retrieves statistics only for messages sent from the specified Sender Email address.

FromDomain

string

Retrieves statistics only for messages sent from the specified sender domain.

FromID

integer

Retrieves statistics only for messages sent from the sender address with the specified ID.

FromTS

string

Retrieves statistics only for messages sent after the specified timestamp.

FromType

integer

Retrieves statistics only for a specific type of messages:

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

IsDeleted

boolean

When true, will retrieve statistics only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

IsNewsletterTool

boolean

When true, will retrieve statistics only for campaigns created with the Legacy template builder. When false, campaigns created with the Legacy builder 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.

MessageStatus

integer

Retrieves statistics only for messages with the specified status:

  • 0 (Processed)
  • 1 (Queued)
  • 2 (Sent)
  • 3 (Opened)
  • 4 (Clicked)
  • 5 (Bounce)
  • 6 (Spam)
  • 7 (Unsub)
  • 8 (Blocked)
  • 9 (SoftBounce)
  • 10 (HardBounce)
  • 11 (Deferred)

Period

string

Retrieves statistics only for messages sent between the start of the selected period and the current timestamp.

  • Day - since the start of the current day
  • Week - since the start of the current week
  • Month - since the start of the current month
  • Year - since the start of the current year

ProcessTotalClicksCount

boolean

When true, will calculate and return the total number of click events in the TotalClicksCount property.

Default value: false

ProcessTotalOpensCount

boolean

When true, will calculate and return the total number of open events in the TotalOpensCount property.

Default value: false

ToTS

string

Retrieves statistics only for messages sent before the specified timestamp.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

AverageClickDelay

number

Average delay (in seconds) between the first open and first click event for a message.

AverageClickedCount

number

Average number of times a click was registered for a message.

AverageOpenDelay

number

Average delay (in seconds) between the message delivery and the first message open.

AverageOpenedCount

number

Average number of times a recipient opens the message.

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

CampaignCount

integer

Number of distinct campaigns that are part of these stats.

ClickedCount

integer

Number of clicked messages.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

OpenedCount

integer

Number of opened messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of messages that are in the queue to be sent out.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

TotalClicksCount

integer

Total number of registered open events. Calculated only when the ProcessTotalOpensCount query parameter is set as true, otherwise 0 is returned.

TotalOpensCount

integer

Total number of registered click events. Calculated only when the ProcessTotalClicksCount query parameter is set as true, otherwise 0 is returned.

TransactionalCount

integer

Number of transactional messages.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

Total

integer

get

/messagestatistics/{message_ID}

Retrieve delivery and engagement statistics for a specific message. Message-based stats link the delivery rates / contact engagement details to the sending time of the messages.

Full API path

https://api.mailjet.com/v3/REST/messagestatistics/{message_ID}

Path parameters

message_ID

integer, required

Unique numeric ID of the message you want to retrieve the statistics for.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

AverageClickDelay

number

Average delay (in seconds) between the first open and first click event for a message.

AverageClickedCount

number

Average number of times a click was registered for a message.

AverageOpenDelay

number

Average delay (in seconds) between the message delivery and the first message open.

AverageOpenedCount

number

Average number of times a recipient opens the message.

BlockedCount

integer

Number of blocked messages.

BouncedCount

integer

Number of bounced messages.

CampaignCount

integer

Number of distinct campaigns that are part of these stats.

ClickedCount

integer

Number of clicked messages.

DeferredCount

integer

Number of deferred messages - ones that could not be delivered and the system is retrying to send. If after 3 days the sending is unsuccessful, those messages become soft-bounced.

DeliveredCount

integer

Number of messages delivered to their destination.

HardbouncedCount

integer

Number of hard-bounced messages.

OpenedCount

integer

Number of opened messages.

ProcessedCount

integer

Number of processed messages.

QueuedCount

integer

Number of messages that are in the queue to be sent out.

SoftbouncedCount

integer

Number of soft-bounced messages.

SpamComplaintCount

integer

Number of messages marked as Spam by the recipients.

TotalClicksCount

integer

Total number of registered open events. Calculated only when the ProcessTotalOpensCount query parameter is set as true, otherwise 0 is returned.

TotalOpensCount

integer

Total number of registered click events. Calculated only when the ProcessTotalClicksCount query parameter is set as true, otherwise 0 is returned.

TransactionalCount

integer

Number of transactional messages.

UnsubscribedCount

integer

Number of registered unsubscribe requests.

Total

integer

get

/openstatistics

Retrieve aggregated statistics on emails opened at least once by their recipients. If no query parameters are used, the statistics shown will be for open events since 00:00 UTC on the current day.

Note: This is a legacy endpoint. We advise using /statcounters to retrieve message-based aggregated stats.

Full API path

https://api.mailjet.com/v3/REST/openstatistics

Query string parameters

CampaignID

integer

Retrieves open statistics only for the specified Campaign ID.

ContactsList

integer

Retrieves open statistics only for the specified contact list ID.

CustomCampaign

string

Retrieves open statistics only for the campaign with the specified Custom Value.

From

string

Retrieves open statistics only for messages sent from the specified Sender Email address.

FromDomain

string

Retrieves open statistics only for messages sent from the specified domain.

FromID

integer

Retrieves open statistics only for messages sent from the sender address with the specified ID.

FromTS

string

Retrieves open statistics only for messages sent after the specified timestamp.

Note: If no query parameters are used, FromTS defaults to the current day at 00:00 UTC.

FromType

integer

Retrieves open statistics only for a specific type of messages:

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

IsDeleted

boolean

When true, will retrieve open statistics only for deleted campaigns. When false, stats for deleted campaigns will be excluded from the response.

IsNewsletterTool

boolean

When true, will retrieve open statistics only for campaigns created with the Legacy template builder. When false, campaigns created with the Legacy builder will be excluded from the response.

IsStarred

boolean

When true, will retrieve open statistics only for starred campaigns. When false, starred campaigns will be excluded from the response.

MessageStatus

integer

Retrieves open statistics only for messages with the specified status:

  • 0 (Processed)
  • 1 (Queued)
  • 2 (Sent)
  • 3 (Opened)
  • 4 (Clicked)
  • 5 (Bounce)
  • 6 (Spam)
  • 7 (Unsub)
  • 8 (Blocked)
  • 9 (SoftBounce)
  • 10 (HardBounce)
  • 11 (Deferred)

Period

string

Retrieves open statistics only for messages sent between the start of the selected period and the current timestamp.

  • Day - since the start of the current day
  • Week - since the start of the current week
  • Month - since the start of the current month
  • Year - since the start of the current year

ToTS

string

Retrieves open statistics only for messages sent before the specified timestamp.

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

OpenedCount

integer

Number of opened messages.

OpenedDelay

number

Average delay (in seconds) between the sending of the message and the open event.

ProcessedCount

integer

Number of processed messages.

Total

integer