1. Mailjet
  2. Support
  3. Documentation

Event Tracking API

Endpoint URL


The endpoint is an URL our server will call for each event (it can lead to a lot of hits !). You can configure it in your account preferences.

It must return a 200 Ok HTTP code if all goes well. Any other HTTP code will result in our server retrying the request later (up to 10 times, every 10 minutes). If the request if still failing after 10 errors, we stop trying.

We strongly recommend using a secure URL (HTTPS) in combination with a basic authentification to make sure data cannot be intercepted, and that only our servers can send you data.

Eg: https://username:password@www.example.com/mailjet_triggers.php

The event data is sent in the POST request body using a JSON object. Its content depends on the event.

 

Events


All events contain these properties :
event : the event type
time : unix timestamp of event (free of timezone concerns)

open event

email : email address of recipient triggering the event
mj_campaign_id : internal Mailjet campaign id for REST API access to message
mj_contact_id : internal Mailjet contact id for REST API access to contact
customcampaign : value of X-Mailjet-Campaign
ip : IP address (can be IPv4 or IPv6) that triggered the event
geo : country code of IP address (see http://www.maxmind.com/app/iso3166)
agent : User-Agent

click event

Contains all open event data, plus :
url : the link that was clicked

bounce event

email : email address of recipient triggering the event
mj_campaign_id : internal Mailjet campaign id for REST API access to message
mj_contact_id : internal Mailjet contact id for REST API access to contact
customcampaign : value of X-Mailjet-Campaign
blocked : true if this bounce leads to recipient being blocked
hard_bounce : true if error was permanent
error_related_to : see error table
error : see error table

spam event

email : email address of recipient triggering the event
mj_campaign_id : internal Mailjet campaign id for REST API access to message
mj_contact_id : internal Mailjet contact id for REST API access to contact
customcampaign : value of X-Mailjet-Campaign
source : indicates which feedback loop program reported this complaint

blocked event

email : email address of recipient triggering the event
mj_campaign_id : internal Mailjet campaign id for REST API access to message
mj_contact_id : internal Mailjet contact id for REST API access to contact
customcampaign : value of X-Mailjet-Campaign
error_related_to : see error table
error : see error table

unsub event

email : email address of recipient triggering the event
mj_campaign_id : internal Mailjet campaign id for REST API access to message
mj_contact_id : internal Mailjet contact id for REST API access to contact
mj_list_id : internal Mailjet List id for REST API access to lists management
customcampaign : value of X-Mailjet-Campaign
ip : IP address (can be IPv4 or IPv6) that triggered the event
geo : country code of IP address (see http://www.maxmind.com/app/iso3166)
agent : User-Agent

typofix event

original_address : original recipient of the message
new_address : recipient after modification

Possible values for errors



error_related_toerrorWhat really happened ?
recipient user unknownEmail address doesn't exist, double check it for typos !
mailbox inactiveAccount has been inactive for too long, you should consider this address doesn't exist anymore.
quota exceededEven though this may be a non permanent error, most of the time when accounts are over quota, it means they are inactive.
domain invalid domainThere's a typo in the domain name part of the address. Or the address is so old that its domain has expired !
no mail hostNobody answers when we knock at the door..
relay/access deniedThe destination mail server is refusing to talk to us.
greylistedThis is always very temporary, and you should never see this for a bounce !
spam sender blockedThis is quite bad! You should contact us to investigate this issue.
content blockedSomething in your email has triggered an antispam and your email was rejected. Please contact us so we can study the email content and report any false positive.
policy issueWe do our best to avoid these, with outbound throttling and following the best practices. We receive alerts when this happens, but make sure to contact us for further information and workaround.
system system issueSomething went wrong with our servers. This should not happen, and never be permanent !
protocol issue
connection issue
mailjet preblockedYou tried to send an email to an address that recently (or repeatedly) bounced. We didn't try to send it to avoid damaging your reputation. (Soon: see options to bypass email blocking)
duplicate in campaignYou used X-Mailjet-DeduplicateCampaign and sent more than one email to a single recipient. Only the first was sent, others are blocked.

Try Mailjet now ?
Create an account - no engagement, no hidden fees