Connect Brevo to a tool built with Claude or ChatGPT (2026)
Your tool built with Claude needs to add contacts to Brevo, or send an email when a quote goes out. The Brevo credential opens your whole email marketing 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.
By Aloïs Oddon, co-founder of Nextmap. Facts checked on November 18, 2026.
Brevo holds your contacts, lists, campaigns and transactional emails. A tool built with Claude or ChatGPT becomes valuable when it talks to Brevo: adding a form’s contact to the right list, sending an email when a quote goes out, finding who opened the last campaign. To do that, it needs a Brevo API credential, and an API key opens the whole account.
That is where things often go wrong: the key ends up pasted into the code, or into the conversation with the AI, where it can leak. On while, the Brevo credential stays in while. The tool calls Brevo without ever holding it, and your AI never sees it.
The short version. Generate an API key in Brevo’s SMTP & API settings. Ask your AI to connect Brevo, then paste the key into while through the link it gives you. The tool adds your contacts and sends your emails, every call is logged, and a campaign send waits for your approval if you ask.
API key or machine to machine
Brevo offers two ways to connect a tool, and the first is enough in most cases1,3.
| API key | Machine to machine | |
|---|---|---|
| What it opens | The whole account | Only the chosen scopes |
| How long it lasts | Until you delete it | Tokens of about an hour, renewed |
| Where to create it | In the SMTP & API settings | In a terminal, with Brevo’s command tool |
| Who it is for | Everyone | A team comfortable with a terminal |
On while, both work: the API key is pasted as is, and for machine to machine, while exchanges the client credentials for a token and renews it on its own.
Connect Brevo to your tool, in three steps
The whole thing takes a few minutes, and you have no code to write.
- Generate a key in Brevo. Open the SMTP & API settings, then the API keys tab, and generate a new key. Give it a name that says what it is for, like “Quotes tool”. Copy it right away: Brevo shows it only once1.
- Ask your AI to connect Brevo. It declares the connection in while and gives you a link.
- Paste the key into while. You open the link, paste the key and confirm. Neither your AI nor the tool’s code sees it.
If IP security is on for your account, Brevo blocks calls from an unknown address, even with a valid key. It then sends you an email to authorize the address, or you add it in the authorized IPs of the Security menu2.
You, to your AI: Connect Brevo to this tool: each new contact from the form goes into the "Prospects" list, and a welcome email goes out right away.

What while does on each call
The tool calls Brevo 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 contact or sending an email, goes through once you approve its rule. After that, an unexpected call is refused, and your AI is told.
An email 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 Brevo.
The credentials of your software are detailed on our security page, and the same mechanism works for any API in connect an API with no credentials in the code.
Changing the key
If the key leaks or you lose it, generate a new one in Brevo and delete the old one1. Paste the new one into while: the tool uses it from the next call, without being put back in place, and your AI has nothing to redo.
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.
- Connected software: one on the Libre plan, and 25 on the Pro plan, Brevo included.
- The tool’s data is backed up every day, and your tools are hosted in France by Nextmap.
For contacts followed end to end, see build a simple CRM, and for related connections, HubSpot and Slack.
Try it with your tool
Give this message to your AI, then ask it to connect Brevo. The trial is free, with no sign-up, and your tool has its address in 3 minutes.
Read while.sh/agents and help me get started with while.
Sources
- Brevo, Generate an API key, accessed November 18, 2026
- Brevo, IP security & authorization, accessed November 18, 2026
- Brevo, Machine-to-machine authentication, accessed November 18, 2026