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.

                • Senders

                  Manage or get information about your sending domains.

                  • Add sender domain

                    post

                    /senders/add-domain

                    Adds a sender domain to your account. Sender domains are added automatically as you send, but you can use this call to add them ahead of time.

                    body parameters

                    • keyrequired
                      string

                      a valid api key

                    • domainrequired
                      string

                      a domain name

                    Add sender domain

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

                    Success Response

                    • HTTP Status 200

                      information about the domain

                      • domain
                        string

                        the sender domain name

                      • created_at
                        string

                        the date and time that the sending domain was first seen as a UTC string in YYYY-MM-DD HH:MM:SS format

                      • last_tested_at
                        string

                        when the domain's DNS settings were last tested as a UTC string in YYYY-MM-DD HH:MM:SS format

                      • spf
                        object

                        details about the domain's SPF record

                        Show Properties
                      • dkim
                        object

                        details about the domain's DKIM record

                        Show Properties
                      • verified_at
                        string

                        if the domain has been verified, this indicates when that verification occurred as a UTC string in YYYY-MM-DD HH:MM:SS format

                      • valid_signing
                        boolean

                        whether this domain can be used to authenticate mail, either for itself or as a custom signing domain. If this is false but spf and dkim are both valid, you will need to verify the domain before using it to authenticate mail

                      • verify_txt_key
                        string

                        a unique key used to verify a domain by adding a TXT record. Append this key to 'mandrill_verify.' and add it to your domain's TXT records to verify

                    Example response

                    JSON
                    {
                      "domain": "string",
                      "created_at": "2019-08-24T14:15:22Z",
                      "last_tested_at": "2019-08-24T14:15:22Z",
                      "spf": {
                        "valid": true,
                        "valid_after": "2019-08-24T14:15:22Z",
                        "error": "string"
                      },
                      "dkim": {
                        "valid": true,
                        "valid_after": "2019-08-24T14:15:22Z",
                        "error": "string"
                      },
                      "verified_at": "2019-08-24T14:15:22Z",
                      "valid_signing": true,
                      "verify_txt_key": "string"
                    }
                  • 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.