{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/email-api/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Event types","siteUrl":"https://dev.mailjet.com/","projectTitle":"Mailjet Developer Documentation","description":"Reference for Mailjet webhook event types: sent, open, click, bounce, spam, blocked, and unsub with sample JSON and per-event properties.","image":"https://dev.mailjet.com/og-image.png","lang":"en-US","keywords":["Mailjet API","Email API","Content API","SMTP Relay","transactional email","email delivery","Send API","email templates","developer documentation"],"meta":[{"name":"og:type","content":"website"},{"name":"og:site_name","content":"Mailjet Developer Documentation"},{"name":"twitter:card","content":"summary_large_image"},{"name":"robots","content":"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"},{"name":"googlebot","content":"index, follow, max-snippet:-1, max-image-preview:large"}],"jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://dev.mailjet.com/#organization","name":"Mailjet","alternateName":"Sinch Mailjet","url":"https://www.mailjet.com","logo":"https://assets.mailjet.com/lib/images/mailjetLogo/mj_logo_with_text_color.png","parentOrganization":{"@type":"Organization","name":"Sinch","url":"https://www.sinch.com"}},{"@type":"WebSite","@id":"https://dev.mailjet.com/#website","name":"Mailjet Developer Documentation","description":"Official developer documentation for the Mailjet Email API, Content API and SMTP Relay.","url":"https://dev.mailjet.com/","inLanguage":"en-US","publisher":{"@id":"https://dev.mailjet.com/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://dev.mailjet.com/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]},"llmstxt":{"hide":false,"title":"Mailjet Developer Documentation","description":"Developer documentation for the Mailjet Email API, Content API and SMTP Relay - guides, API references and code samples for sending, templating and tracking email at scale.","details":{"content":"Mailjet (part of Sinch) provides APIs for sending and managing email.\n\nThis documentation covers four main areas:\n\n- **Email API** - the Send API (v3 and v3.1) for transactional and marketing email,\n  plus contact management, segmentation, campaigns, statistics, webhooks, the Parse API\n  and the Mailjet Templating Language.\n- **Content API** - programmatic management of email templates, template contents,\n  images, labels and authentication tokens (v1).\n- **SMTP Relay** - sending through Mailjet's SMTP servers, including custom headers.\n- **API Reference** - the complete, generated reference for every endpoint, built directly\n  from the OpenAPI specifications.\n\nBase URL for all REST APIs: `https://api.mailjet.com`.\nAuthentication uses HTTP Basic auth with an API key and secret key.\n\n## Machine-readable entry points\n\nPrefer these when you need the API surface in as few requests as possible:\n\n- `/openapi/openapi-mailjet.md` - the **complete** Email API reference (every endpoint,\n  grouped by resource) as a single Markdown document.\n- `/openapi/openapi-passport.md` - the **complete** Content API reference as a single\n  Markdown document.\n- `/_bundle/openapi/openapi-mailjet.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Email API.\n- `/_bundle/openapi/openapi-passport.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Content API.\n- `/sitemap.xml` - every indexable URL on this site.\n\nEvery page on this site is also available as clean Markdown by appending `.md` to its URL."},"sections":[{"title":"Email API","description":"Sending, contacts, campaigns, statistics, webhooks and templating.","includeFiles":["docs/email-api/**/*.md"],"excludeFiles":[]},{"title":"Content API","description":"Manage templates, template contents, images, labels and tokens.","includeFiles":["docs/content-api/**/*.md","docs/content-api.md"],"excludeFiles":[]},{"title":"SMTP Relay","description":"Send email through Mailjet's SMTP servers.","includeFiles":["docs/smtp-relay/**/*.md"],"excludeFiles":[]},{"title":"API Reference","description":"Complete generated reference for every Mailjet API endpoint.","includeFiles":["openapi/openapi-mailjet.yaml","openapi/openapi-passport.yaml","docs/api-reference/**/*.md"],"excludeFiles":[]},{"title":"Migrating from Mandrill","description":"Guides for switching from Mandrill to Mailjet.","includeFiles":["docs/mandrill/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"event-types","__idx":0},"children":["Event types"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"event-object-overview","__idx":1},"children":["Event object overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All JSON event objects contain the following properties:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["event"]},": the event type"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]},": Unix timestamp of event"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]},": email address of recipient triggering the event"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mj_campaign_id"]},": internal Mailjet campaign ID associated to the message"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mj_contact_id"]},": internal Mailjet contact ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customcampaign"]},": value of the X-Mailjet-Campaign header when provided"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MessageID"]},": The unique message ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomID"]},": the custom ID, when provided at send time"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payload"]},": the event payload, when provided at send time"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sent-event","__idx":2},"children":["Sent event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dispatched when the destination SMTP server (gmail, hotmail, yahoo, etc) has accepted the message. Depending on your volume, it could dispatch a lot of events to your system, please make sure you have checked the Group Events Checkbox in the Event API user interface or that the /eventcallbackurl ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["version"]}," property is set at",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sent event additional properties:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mj_message_id"]}," : The unique message ID as a string (deprecated, see MessageID)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["smtp_reply"]},": The raw SMTP response message"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-sent-event","__idx":3},"children":["Sample sent event"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"sent\",\n  \"time\": 1433333949,\n  \"MessageID\": 19421777835146490,\n  \"Message_GUID\": \"1ab23cd4-e567-8901-2345-6789f0gh1i2j\",\n  \"email\": \"api@mailjet.com\",\n  \"mj_campaign_id\": 7257,\n  \"mj_contact_id\": 4,\n  \"customcampaign\": \"\",\n  \"mj_message_id\": \"19421777835146490\",\n  \"smtp_reply\": \"sent (250 2.0.0 OK 1433333948 fa5si855896wjc.199 - gsmtp)\",\n  \"CustomID\": \"helloworld\",\n  \"Payload\": \"\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"open-event","__idx":4},"children":["Open event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open event additional properties:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ip"]}," : IP address (can be IPv4 or IPv6) that triggered the event"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["`geo : country code of IP address (see list)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["agent"]}," : User-Agent"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-open-event","__idx":5},"children":["Sample open event"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"open\",\n  \"time\": 1433103519,\n  \"MessageID\": 19421777396190490,\n  \"Message_GUID\": \"1ab23cd4-e567-8901-2345-6789f0gh1i2j\",\n  \"email\": \"api@mailjet.com\",\n  \"mj_campaign_id\": 7173,\n  \"mj_contact_id\": 320,\n  \"customcampaign\": \"\",\n  \"CustomID\": \"helloworld\",\n  \"Payload\": \"\",\n  \"ip\": \"127.0.0.1\",\n  \"geo\": \"US\",\n  \"agent\": \"Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"click-event","__idx":6},"children":["Click event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click event additional properties:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["~url~ : the link that was clicked"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-click-event-api-response","__idx":7},"children":["Sample click event API Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"click\",\n  \"time\": 1433334653,\n  \"MessageID\": 19421777836302490,\n  \"Message_GUID\": \"1ab23cd4-e567-8901-2345-6789f0gh1i2j\",\n  \"email\": \"api@mailjet.com\",\n  \"mj_campaign_id\": 7272,\n  \"mj_contact_id\": 4,\n  \"customcampaign\": \"\",\n  \"CustomID\": \"helloworld\",\n  \"Payload\": \"\",\n  \"url\": \"https://mailjet.com\",\n  \"ip\": \"127.0.0.1\",\n  \"geo\": \"FR\",\n  \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bounce-event","__idx":8},"children":["Bounce event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Bounce event additional properties:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["blocked"]}," : true if this bounce leads to the recipient being blocked"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hard_bounce"]}," : true if error was permanent"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_related_to"]}," : see error table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," : see error table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["comment"]}," : the raw SMTP error code, including descriptions of the reason for the bounce"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-bounce-event-api-response","__idx":9},"children":["Sample bounce event API Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n   \"event\": \"bounce\",\n   \"time\": 1430812195,\n   \"MessageID\": 13792286917004336,\n   \"Message_GUID\": \"1ab23cd4-e567-8901-2345-6789f0gh1i2j\",\n   \"email\": \"bounce@mailjet.com\",\n   \"mj_campaign_id\": 0,\n   \"mj_contact_id\": 0,\n   \"customcampaign\": \"\",\n   \"CustomID\": \"helloworld\",\n   \"Payload\": \"\",\n   \"blocked\": false,\n   \"hard_bounce\": true,\n   \"error_related_to\": \"recipient\",\n   \"error\": \"user unknown\",\n   \"comment\": \"Host or domain name not found. Name service error for name=lbjsnrftlsiuvbsren.com type=A: Host not found\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you consider using this event to modify the status of your recipient subscription or viability , please take into account the value of the hard_bounce and error property. All bounce events may not have the same level of importance"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"blocked-event","__idx":10},"children":["Blocked event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Blocked event additional properties:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_related_to"]}," : ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["see error table"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["`error' : see error table"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-blocked-event-api-response","__idx":11},"children":["Sample blocked event API Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"blocked\",\n  \"time\": 1430812195,\n  \"MessageID\": 13792286917004336,\n  \"Message_GUID\": \"1ab23cd4-e567-8901-2345-6789f0gh1i2j\",\n  \"email\": \"bounce@mailjet.com\",\n  \"mj_campaign_id\": 0,\n  \"mj_contact_id\": 0,\n  \"customcampaign\": \"\",\n  \"CustomID\": \"helloworld\",\n  \"Payload\": \"\",\n  \"error_related_to\": \"recipient\",\n  \"error\": \"user unknown\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you consider using this event to modify the status of your recipient subscription, please take into account the value of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," property. All blocked events may not have the same reason and perpetuity on the status of the contact (i.e. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["duplicate in campaign"]}," indicates that the recipient message was blocked for the campaign and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preblocked"]}," indicates that the recipient is blocked for all messages)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"spam-event","__idx":12},"children":["Spam event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Spam event additional properties:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source"]}," : indicates which feedback loop program reported this complaint."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-spam-event-api-response","__idx":13},"children":["Sample spam event API Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"spam\",\n  \"time\": 1430812195,\n  \"MessageID\": 13792286917004336,\n  \"Message_GUID\": \"1ab23cd4-e567-8901-2345-6789f0gh1i2j\",\n  \"email\": \"bounce@mailjet.com\",\n  \"mj_campaign_id\": 0,\n  \"mj_contact_id\": 0,\n  \"customcampaign\": \"\",\n  \"CustomID\": \"helloworld\",\n  \"Payload\": \"\",\n  \"source\": \"JMRPP\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"unsub-event","__idx":14},"children":["Unsub event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Unsub event additional properties:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mj_list_id"]}," : internal Mailjet List id for REST API access to lists management"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ip"]}," : IP address (can be IPv4 or IPv6) that triggered the event"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geo"]}," : country code of IP address (see list)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["agent"]}," : User-Agent"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-unsub-event-api-response","__idx":15},"children":["Sample unsub event API Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"unsub\",\n  \"time\": 1433334941,\n  \"MessageID\": 20547674933128000,\n  \"Message_GUID\": \"1ab23cd4-e567-8901-2345-6789f0gh1i2j\",\n  \"email\": \"api@mailjet.com\",\n  \"mj_campaign_id\": 7276,\n  \"mj_contact_id\": 126,\n  \"customcampaign\": \"\",\n  \"CustomID\": \"helloworld\",\n  \"Payload\": \"\",\n  \"mj_list_id\": 1,\n  \"ip\": \"127.0.0.1\",\n  \"geo\": \"FR\",\n  \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36\"\n}\n"},"children":[]}]},"headings":[{"value":"Event types","id":"event-types","depth":1},{"value":"Event object overview","id":"event-object-overview","depth":2},{"value":"Sent event","id":"sent-event","depth":2},{"value":"Sample sent event","id":"sample-sent-event","depth":3},{"value":"Open event","id":"open-event","depth":2},{"value":"Sample open event","id":"sample-open-event","depth":3},{"value":"Click event","id":"click-event","depth":2},{"value":"Sample click event API Response","id":"sample-click-event-api-response","depth":3},{"value":"Bounce event","id":"bounce-event","depth":2},{"value":"Sample bounce event API Response","id":"sample-bounce-event-api-response","depth":3},{"value":"Blocked event","id":"blocked-event","depth":2},{"value":"Sample blocked event API Response","id":"sample-blocked-event-api-response","depth":3},{"value":"Spam event","id":"spam-event","depth":2},{"value":"Sample spam event API Response","id":"sample-spam-event-api-response","depth":3},{"value":"Unsub event","id":"unsub-event","depth":2},{"value":"Sample unsub event API Response","id":"sample-unsub-event-api-response","depth":3}],"frontmatter":{"title":"Mailjet Send Webhooks","seo":{"description":"Reference for Mailjet webhook event types: sent, open, click, bounce, spam, blocked, and unsub with sample JSON and per-event properties.","title":"Event types"}},"lastModified":"2026-08-26T10:53:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/email-api/webhooks/event-types","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}