---
title: "Mailchimp API: connect it to a tool built with AI (2026)"
url: https://while.sh/en/guides/connect-mailchimp-api-ai-tool/
author: "Aloïs Oddon, co-founder of Nextmap"
updated: 2026-11-18
---

# Connect Mailchimp to a tool built with Claude or ChatGPT (2026)

Your tool built with Claude needs to add trade show sign-ups to your Mailchimp audience, or show the results of the last campaign. The Mailchimp credential opens your whole account, and it must end up neither in the code nor in the conversation. On while, it stays in while, and your AI never sees it. Here is how.

Mailchimp holds your audiences, subscribers and campaigns. A tool built with Claude or ChatGPT becomes valuable when it **talks to Mailchimp**: adding trade show sign-ups to the right audience, removing a customer who asked, showing management the results of the last campaign. To do that, it needs a **Mailchimp API key**, and that key opens **the whole account**.

That is where things often go wrong: **the key ends up pasted into the code**, or emailed to a contractor, where it can leak. On while, the Mailchimp credential **stays in while**. The tool calls Mailchimp without ever holding it, and your AI never sees it.

> **The short version.** Generate a key in the Extras of your Mailchimp profile, one key per tool. Ask your AI to connect Mailchimp, then paste the key into while through the link it gives you. The tool adds your subscribers and reads your campaigns, every call is logged, and a send waits for your approval if you ask.

## One key per tool

Mailchimp advises it itself: **give each integration its own key**, with a name that says what it is for. If a key is compromised, you revoke it without cutting off the others (source 1).

| What to know | What it changes |
|---|---|
| The key is shown only once | After that, Mailchimp shows only its name and first four digits |
| A revoked key cannot be reactivated | You must generate a new one and put it back everywhere |
| Manager level is enough to create your key | Admin level also sees other people's keys |
| It opens the whole account | A leak gives access to your audiences and campaigns |

With while, the new key goes in **only one place**.

## Connect Mailchimp to your tool, in three steps

The whole thing takes a few minutes, and you have no code to write.

1. **Generate a key in Mailchimp.** Click your profile icon, then **Profile**, the **Extras** menu and **API keys**. Under Your API keys, click **Create A Key**, give it the tool's name, then Generate Key. Copy it right away: you will not be able to see it again (source 1).
2. **Ask your AI to connect Mailchimp.** It declares the connection in while and gives you a link.
3. **Paste the key into while.** You open the link, paste the key and confirm. Neither your AI nor the tool's code sees it.

> You, to your AI: Connect Mailchimp to this tool: every visitor who signs up at our trade show booth goes into the "Trade show 2026" audience, with their company.

<figure class="illus"><img src="/illustrations/mailchimp-relais-1200.webp" srcset="/illustrations/mailchimp-relais-768.webp 768w, /illustrations/mailchimp-relais-1200.webp 1200w" sizes="(min-width: 48rem) 46rem, 100vw" width="1536" height="1024" loading="lazy" decoding="async" alt="The tool built with AI calls the Mailchimp API through while: the key is added to each call inside while, out of the code, every subscriber added to an audience is logged, and a campaign send waits for a person's approval" /><figcaption>The tool calls Mailchimp through while, which adds the credential to each call.</figcaption></figure>

## What while does on each call

The tool calls Mailchimp **through while**, without a credential. while adds the key to each call, and logs it in the history. For the first seven days, reads go through and teach while what the tool calls. **A write**, like adding a subscriber or sending a campaign, goes through once you approve its rule. After that, an unexpected call is refused, and your AI is told.

A campaign that has gone out cannot be taken back. You can ask for your approval before a sensitive call.

> You, to your AI: Ask me before every campaign the tool sends in Mailchimp.

The credentials of your software are detailed on our [security](/en/security/) page, and the same mechanism works for any API in [connect an API with no credentials in the code](/en/guides/api-keys-out-of-code/).

## What while adds around it

- **Your colleagues** use the tool with a while account for up to 3 people, or, on the Pro plan, with their email account, Google or Microsoft. See [keep a tool for your colleagues](/en/guides/internal-tool-company-sign-in/).
- **Connected software**: one on the Libre plan, and 25 on the Pro plan, Mailchimp included.
- **The tool's data** is backed up every day, and your tools are hosted in France by Nextmap.

For the other major email tool, see [connect Brevo](/en/guides/connect-brevo-api-ai-tool/), and to follow your contacts, [build a simple CRM](/en/guides/simple-crm-small-business-claude-chatgpt-2026/) and [connect HubSpot](/en/guides/connect-hubspot-ai-tool/).

## Try it with your tool

Give this message to your AI, then ask it to connect Mailchimp. The trial is **free, with no sign-up**, and your tool has its address **in 3 minutes**.

```text titre="The message to give your AI"
Read while.sh/agents and help me get started with while.
```

## Sources

1. [Mailchimp, About API keys](https://mailchimp.com/help/about-api-keys/), 2026-11-18
2. [Mailchimp, Marketing API Quick Start](https://mailchimp.com/developer/marketing/guides/quick-start/), 2026-11-18

## Questions

### How do you generate a Mailchimp API key?

Click your profile icon, then Profile, the Extras menu and API keys. Under Your API keys, click Create A Key, name it, then Generate Key. Copy it right away: Mailchimp shows it only once (source 1).

### Who can create an API key in Mailchimp?

People with at least Manager level create their own keys. Those with Admin level also see the keys of other people on the account (source 1).

### Does my AI see the Mailchimp credential?

No. Your AI declares the connection to Mailchimp and gives you a link. You paste the key into while there, and neither your AI nor the tool's code sees it.

### What do you do if the Mailchimp key leaks?

Revoke it on the same page. A revoked key cannot be reactivated: generate a new one and paste it into while, where the tool uses it from the next call (source 1).

### Can you block a campaign send by the tool?

Yes. On while, ask for your approval before each campaign send: it waits for your approval before reaching Mailchimp.
