V3 REFERENCE Messages

/message

Allows you to list and view the details of a Message (an e-mail) processed by Mailjet

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

# list message resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/message
Properties
Name Description
ArrivedAt Timestamp indicated when the message arrived at Mailjet.
  • [ Type TRFC3339DateTime ]
AttachmentCount Number of attachments detected in the message.
  • [ Type LongInt ]
AttemptCount Number of attempts made to deliver the message.
  • [ Type LongInt ]
CampaignID
OR
CampaignALT
CampaignID
ID reference to Campaign
CampaignALT
Value of the CustomValue field of the related Campaign resource
  • Mandatory
  • [ Type TCampaign ]
ContactID
OR
ContactALT
ContactID
ID reference to Contact
ContactALT
Value of the Email field of the related Contact resource
  • Mandatory
  • [ Type TContact ]
Delay Delay between arrival and delivery [?].
  • [ Type Currency ]
Destination Reference to destination domain.
  • Mandatory
  • [ Type TDestination ]
FilterTime Time spent processing the text of the message (milliseconds).
  • [ Type LongInt ]
FromID
OR
FromALT
FromID
ID reference to Sender
FromALT
Value of the Email field of the related Sender resource
  • Mandatory
  • [ Type TSender ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsClickTracked Was click tracking requested for this message ?.
  • [ Type Boolean ]
IsHTMLPartIncluded Did the message contain a HTML part ?.
  • [ Type Boolean ]
IsOpenTracked Was open tracking requested for this message ?.
  • [ Type Boolean ]
IsTextPartIncluded Did the message contain a text part ?.
  • [ Type Boolean ]
IsUnsubTracked Was unsubscription tracking requested for this message ?.
  • [ Type Boolean ]
MessageSize Size of the message (in bytes).
  • [ Type Int64 ]
SenderID
OR
SenderALT
SenderID
ID reference to Sender
SenderALT
Value of the Email field of the related Sender resource
  • [ Type TSender ]
SpamassassinScore Spam assassin score for this message.
  • [ Type Currency ]
SpamassRules Matched spam assassin rules.
  • [ Type AnsiString ]
StateID ID reference to MessageState Current state of the message.
  • [ Type TMessageState ]
StatePermanent Is the state of the message permanent (i.e. will no longer change).
  • [ Type Boolean ]
Status Status of the message.
  • [ Type AnsiString ]

Allowed values:
  • unknown
  • queued
  • sent
  • opened
  • clicked
  • bounce
  • spam
  • unsub
  • blocked
Filters
Name Description
Campaign Only retrieve message resources for which Campaign ID equals the specified value.
  • [ Type Int64 ]
Contact Only retrieve message resources for which Contact ID equals the specified value.
  • [ Type Int64 ]
Destination Only retrieve message resources for which Destination ID equals the specified value.
  • [ Type Int64 ]
FromID Filter the dataset on messages sent from the given ID.
  • [ Type Int64 ]
MessageState Only show messages with this state.
  • [ Type Int64 ]
PlanSubscription Only retrieve message resources for which PlanSubscription ID equals the specified value.
  • [ Type Int64 ]
Sender Deprecrated - Only show messages from this sender.
  • [ Type Int64 ]
SenderID Filter the dataset on messages sent using a sender address with the given ID.
  • [ Type Int64 ]

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

# access the message resource identified by $ID

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

    
    
Properties
Name Description
ArrivedAt Timestamp indicated when the message arrived at Mailjet.
  • [ Type TRFC3339DateTime ]
AttachmentCount Number of attachments detected in the message.
  • [ Type LongInt ]
AttemptCount Number of attempts made to deliver the message.
  • [ Type LongInt ]
CampaignID
OR
CampaignALT
CampaignID
ID reference to Campaign
CampaignALT
Value of the CustomValue field of the related Campaign resource
  • Mandatory
  • [ Type TCampaign ]
ContactID
OR
ContactALT
ContactID
ID reference to Contact
ContactALT
Value of the Email field of the related Contact resource
  • Mandatory
  • [ Type TContact ]
Delay Delay between arrival and delivery [?].
  • [ Type Currency ]
Destination Reference to destination domain.
  • Mandatory
  • [ Type TDestination ]
FilterTime Time spent processing the text of the message (milliseconds).
  • [ Type LongInt ]
FromID
OR
FromALT
FromID
ID reference to Sender
FromALT
Value of the Email field of the related Sender resource
  • Mandatory
  • [ Type TSender ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsClickTracked Was click tracking requested for this message ?.
  • [ Type Boolean ]
IsHTMLPartIncluded Did the message contain a HTML part ?.
  • [ Type Boolean ]
IsOpenTracked Was open tracking requested for this message ?.
  • [ Type Boolean ]
IsTextPartIncluded Did the message contain a text part ?.
  • [ Type Boolean ]
IsUnsubTracked Was unsubscription tracking requested for this message ?.
  • [ Type Boolean ]
MessageSize Size of the message (in bytes).
  • [ Type Int64 ]
SenderID
OR
SenderALT
SenderID
ID reference to Sender
SenderALT
Value of the Email field of the related Sender resource
  • [ Type TSender ]
SpamassassinScore Spam assassin score for this message.
  • [ Type Currency ]
SpamassRules Matched spam assassin rules.
  • [ Type AnsiString ]
StateID ID reference to MessageState Current state of the message.
  • [ Type TMessageState ]
StatePermanent Is the state of the message permanent (i.e. will no longer change).
  • [ Type Boolean ]
Status Status of the message.
  • [ Type AnsiString ]

Allowed values:
  • unknown
  • queued
  • sent
  • opened
  • clicked
  • bounce
  • spam
  • unsub
  • blocked