{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/email-api/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"What is delivered to your webhook","siteUrl":"https://dev.mailjet.com/","projectTitle":"Mailjet Developer Documentation","description":"Breakdown of the JSON Mailjet Parse API delivers to your webhook: Sender, Headers, Parts, SpamAssassinScore, CustomID, and ContentRef.","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":"what-is-delivered-to-your-webhook","__idx":0},"children":["What is delivered to your webhook"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example","__idx":1},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"Sender\": \"pilot@mailjet.com\",\n  \"Recipient\": \"passenger@mailjet.com\",\n  \"Date\": \"20150410T160638\",\n  \"From\": \"Pilot <pilot@mailjet.com>\",\n  \"Subject\": \"Hey! It's Friday!\",\n  \"Headers\": {\n    \"Return-Path\": [\"<pilot@mailjet.com>\"],\n    \"Received\": [\n      \"by 10.107.134.160 with HTTP; Fri, 10 Apr 2015 09:06:38 -0700 (PDT)\"\n    ],\n    \"DKIM-Signature\": [\n      \"v=1; a=rsa-sha256; c=relaxed/relaxed;        d=mailjet.com; s=google;        h=mime-version:date:message-id:subject:from:to:content-type;        bh=tsc4ruu5r5loLtAFUwhFp8BIbKzV0AYljT0+Bb/QwWI=;        b=............\"\n    ],\n    \"MIME-Version\": [\"1.0\"],\n    \"Content-Transfer-Encoding\": [\"quoted-printable\"],\n    \"Content-Type\": [\n      \"multipart/alternative; boundary=001a1141f3c406f1b2051360f37d\"\n    ],\n    \"X-CSA-Complaints\": [\"whitelist-complaints@eco.de\"],\n    \"List-Unsubscribe\": [\n      \"<mailto:unsub-e7221da9.org1.x61425y8x4pt@bnc3.mailjet.com>\"\n    ],\n    \"X-Google-DKIM-Signature\": [\n      \"v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:date:message-id:subject:from:to         :content-type;        bh=tsc4ruu5r5loLtAFUwhFp8BIbKzV0AYljT0+Bb/QwWI=;        b=...........\"\n    ],\n    \"X-Gm-Message-State\": [\n      \"ALoCoQlJBEYSiauMbHc8RXQpv3sUJvPmYAd7exYJKZIZFRZtFkSHqDEP59rQK6oIp9mCwPKCirCL\"\n    ],\n    \"X-Received\": [\n      \"by 10.107.41.72 with SMTP id p69mr3774075iop.58.1428681998638; Fri, 10 Apr 2015 09:06:38 -0700 (PDT)\"\n    ],\n    \"Date\": \"Fri, 10 Apr 2015 18:06:38 +0200\",\n    \"Message-ID\": \"<CAE5Zh0ZpHZ6G5DC+He5426a4RkVab7uWaTDwiMcHzOR=YB3urA@mail.gmail.com>\",\n    \"Subject\": \"Hey! It's Friday!\",\n    \"From\": \"Pilot <pilot@mailjet.com>\",\n    \"To\": \"passenger@mailjet.com\"\n  },\n  \"Parts\": [\n    {\n      \"Headers\": {\n        \"Content-Type\": \"text/plain; charset=UTF-8\"\n      },\n      \"ContentRef\": \"Text-part\"\n    },\n    {\n      \"Headers\": {\n        \"Content-Type\": \"text/html; charset=UTF-8\",\n        \"Content-Transfer-Encoding\": \"quoted-printable\"\n      },\n      \"ContentRef\": \"Html-part\"\n    }\n  ],\n  \"Text-part\": \"Hi,\\n\\nImportant notice: it's Friday. Friday *afternoon*, even!\\n\\n\\nHave a *great* weekend!\\nThe Anonymous Friday Teller\\n\",\n  \"Html-part\": \"<div dir=\\\"ltr\\\">Hi,<div><br></div><div>Important notice: it&#39;s Friday. Friday <i>afternoon</i>, even!</div><div><br><br></div><div>Have a <i style=\\\"font-weight:bold\\\">great</i> weekend!</div><div>The Anonymous Friday Teller</div></div>\\n\",\n  \"SpamAssassinScore\": \"0.602\",\n  \"CustomID\": \"helloworld\",\n  \"Payload\": \"{'message': 'helloworld'}\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When an email is sent to the email address associated with your instance of the Parse API, the contents of this email will be delivered to your webhook in a JSON format. Note that the spam score of the email is delivered in the payload via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SpamAssassin"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This payload contains a lot of useful information about the message processed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This payload is built following a structure where you can parse it and use key information by pointing to them directly (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["From"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Subject"]},", etc.)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["n case you need to loop over every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Headers"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Parts"]},", you can also use the related collections and loop over it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Parts"]}," collection, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ContentRef"]}," property is here to link a specific part (Html or Text for instance) to its associated headers."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Also, note that the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomID"]}," and the Payload properties are returned back if they were provided in the original message sent through the Send API."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Finally, be advised that most Headers will be provided as arrays containing the multiple header lines of the parsed email. Some headers in the payload will be represented by single strings:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Date"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["From"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sender"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Reply-To"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["To"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cc"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Bcc"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Message-ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In-Reply-To"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["References"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Subject"]}]}]},"headings":[{"value":"What is delivered to your webhook","id":"what-is-delivered-to-your-webhook","depth":1},{"value":"Example","id":"example","depth":3}],"frontmatter":{"title":"Parse API- inbound emails","seo":{"description":"Breakdown of the JSON Mailjet Parse API delivers to your webhook: Sender, Headers, Parts, SpamAssassinScore, CustomID, and ContentRef.","title":"What is delivered to your webhook"}},"lastModified":"2026-08-26T10:53:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/email-api/parse-api/delivered-to-webhook","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}