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. Our system will retry every 30s and will stop after 24h, unless a new event is generated.
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 typetime
: unix timestamp of event (free of timezone concerns)
open event
email
: email address of recipient triggering the eventmj_campaign_id
: internal Mailjet campaign id for REST API access to messagemj_contact_id
: internal Mailjet contact id for REST API access to contactcustomcampaign
: value of X-Mailjet-Campaignip
: IP address (can be IPv4 or IPv6) that triggered the eventgeo
: 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 eventmj_campaign_id
: internal Mailjet campaign id for REST API access to messagemj_contact_id
: internal Mailjet contact id for REST API access to contactcustomcampaign
: value of X-Mailjet-Campaignblocked
: true if this bounce leads to recipient being blockedhard_bounce
: true if error was permanenterror_related_to
: see error tableerror
: see error table
spam event
email
: email address of recipient triggering the eventmj_campaign_id
: internal Mailjet campaign id for REST API access to messagemj_contact_id
: internal Mailjet contact id for REST API access to contactcustomcampaign
: value of X-Mailjet-Campaignsource
: indicates which feedback loop program reported this complaint
blocked event
email
: email address of recipient triggering the eventmj_campaign_id
: internal Mailjet campaign id for REST API access to messagemj_contact_id
: internal Mailjet contact id for REST API access to contactcustomcampaign
: value of X-Mailjet-Campaignerror_related_to
: see error tableerror
: see error table
unsub event
email
: email address of recipient triggering the eventmj_campaign_id
: internal Mailjet campaign id for REST API access to messagemj_contact_id
: internal Mailjet contact id for REST API access to contactmj_list_id
: internal Mailjet List id for REST API access to lists managementcustomcampaign
: value of X-Mailjet-Campaignip
: IP address (can be IPv4 or IPv6) that triggered the eventgeo
: country code of IP address (see http://www.maxmind.com/app/iso3166)agent
: User-Agent
typofix event
original_address
: original recipient of the messagenew_address
: recipient after modification
Possible values for errors
ERROR_RELATED_TO |
ERROR |
WHAT REALLY HAPPENED ? |
---|---|---|
recipient |
user unknown |
Email address doesn't exist, double check it for typos ! |
mailbox inactive |
Account has been inactive for too long, you should consider this address doesn't exist anymore. | |
quota exceeded |
Even though this may be a non permanent error, most of the time when accounts are over quota, it means they are inactive. | |
domain |
invalid domain |
There's a typo in the domain name part of the address. Or the address is so old that its domain has expired ! |
no mail host |
Nobody answers when we knock at the door.. | |
relay/access denied |
The destination mail server is refusing to talk to us. | |
greylisted |
This is always very temporary, and you should never see this for a bounce ! | |
spam |
sender blocked |
This is quite bad! You should contact us to investigate this issue. |
content blocked |
Something 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 issue |
We 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 issue |
Something went wrong with our servers. This should not happen, and never be permanent ! |
protocol issue |
||
connection issue |
||
mailjet |
preblocked |
You 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 campaign |
You used X-Mailjet-DeduplicateCampaign and sent more than one email to a single recipient. Only the first was sent, others are blocked. |