Mailchimp Developer LogoMailchimp Developer Wordmark

Transactional API

  • Allowlists

    Add, list, or delete from your Rejection Allowlist.

    • Exports

      Start an export, or get information on export jobs in progress.

      • IPs

        Request and manage Dedicated IPs for your account, and set up reverse DNS.

        • Inbound

          Manage your inbound domains and routes.

          • Messages

            Send, schedule, or get information on your emails.

            • Parse mime document

              post

              /messages/parse

              Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces.

              body parameters

              • keyrequired
                string

                a valid api key

              • raw_messagerequired
                string

                the full MIME document of an email message

              Parse mime document

              const mailchimpClient = require("@mailchimp/mailchimp_transactional")(
                "YOUR_API_KEY"
              );
              
              const run = async () => {
                const response = await mailchimpClient.messages.parse({
                  raw_message: "raw_message",
                });
                console.log(response);
              };
              
              run();
              
              

              Success Response

              • HTTP Status 200

                the parsed message

                • subject
                  string

                  the subject of the message

                • from_email
                  string

                  the email address of the sender

                • from_name
                  string

                  the alias of the sender (if any)

                • to
                  object[]

                  an array of any recipients in the message

                  Show Properties
                • headers
                  object

                  the key-value pairs of the MIME headers for the message's main document

                • text
                  string

                  the text part of the message, if any

                • html
                  string

                  the HTML part of the message, if any

                • attachments
                  object[]

                  an array of any attachments that can be found in the message

                  Show Properties
                • images
                  object[]

                  an array of any embedded images that can be found in the message

                  Show Properties

              Example response

              JSON
              {
                "subject": "string",
                "from_email": "user@example.com",
                "from_name": "string",
                "to": [
                  {
                    "email": "string",
                    "name": "string"
                  }
                ],
                "headers": {},
                "text": "string",
                "html": "string",
                "attachments": [
                  {
                    "name": "string",
                    "type": "string",
                    "binary": true,
                    "content": "string"
                  }
                ],
                "images": [
                  {
                    "name": "string",
                    "type": "string",
                    "content": "string"
                  }
                ]
              }
            • Metadata

              Manage your custom metadata fields in your account.

              • Rejects

                Add, list, or delete from your Rejection Denylist.

                • Senders

                  Manage or get information about your sending domains.

                  • Subaccounts

                    Manage your subaccounts, including the abilitiy to pause and resume sending.

                    • Tags

                      List, delete, or get information on your Tags and their sending statistics.

                      • Templates

                        Manage the Templates in your account.

                        • URLs

                          Manage your tracking domains. Some of these endpoints may be deprecated.

                          • Users

                            Get information about your account, or ping Transactional.

                            • Webhooks

                              Manage the webhooks in your account.

                              • Whitelists

                                Add, list, or delete from your Rejection Allowlist. These endpoints are being replaced with a series of functionally identical endpoints called /allowlists.