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.

            • Metadata

              Manage your custom metadata fields in your account.

              • Rejects

                Add, list, or delete from your Rejection Denylist.

                • Add email to denylist

                  post

                  /rejects/add

                  Adds an email to your email rejection denylist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your denylist. Attempting to denylist an address that has been added to the allowlist will have no effect.

                  body parameters

                  • keyrequired
                    string

                    a valid api key

                  • emailrequired
                    string

                    an email address to block

                  • comment
                    string

                    an optional comment describing the rejection

                  • subaccount
                    string

                    an optional unique identifier for the subaccount to limit the denylist entry

                  Add email to denylist

                  const mailchimpClient = require("@mailchimp/mailchimp_transactional")(
                    "YOUR_API_KEY"
                  );
                  
                  const run = async () => {
                    const response = await mailchimpClient.rejects.add({
                      email: "Lois76@gmail.com",
                    });
                    console.log(response);
                  };
                  
                  run();
                  
                  

                  Success Response

                  • HTTP Status 200

                    a status object containing the address and the result of the operation

                    • email
                      string

                      the email address you provided

                    • added
                      boolean

                      whether the operation succeeded

                  Example response

                  JSON
                  {
                    "email": "user@example.com",
                    "added": true
                  }
                • 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.