> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brew.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Start an Automation When Someone Unsubscribes

> An unsubscribe can now start an automation. Confirm the opt-out from a transactional domain, using the reason they gave, with nothing to wire up.

<Note>
  **October 2026** · For current behavior, see [Unsubscribe Events](/create-emails/automations#unsubscribe-events).
</Note>

## What Shipped

An unsubscribe used to be the end of the conversation. The link did its job,
the contact came off the list, and the reasons they gave sat in a report.
There was no way to confirm it or answer them.

Now an unsubscribe can start an automation. Pick **When a contact
unsubscribes** as the trigger and choose which list it watches. Brew starts
the flow the moment someone leaves. It's the first trigger Brew fires on its
own, so there is nothing to wire up and no event to send.

## How It Works

<Steps>
  <Step title="Choose the trigger">
    In a new automation, pick **When a contact unsubscribes**. Then choose
    **All emails** or one of your marketing domains. Transactional domains
    keep no list, so they aren't offered. The link in an
    email or the one-click button in a mail app starts it. Bounces,
    complaints, imports, and API edits never do.
  </Step>

  <Step title="Write what they need">
    The person just opted out of marketing, so send only what they need,
    such as a confirmation, from a
    [transactional domain](/create-emails/transactional-email). Merge tags
    carry the detail: the domain they left, the reasons they chose, and the
    email that held the link.
  </Step>

  <Step title="Test, then publish">
    **Test** runs the flow on a sample unsubscribe, so you see the email
    before anyone leaves. Publish refuses a flow none of whose emails could
    reach the contact.
  </Step>
</Steps>

## What to Send

* **A confirmation.** "You're off the list" from your transactional domain,
  so they know it worked.
* **A reply to their reason.** `{{ unsubscribe.reasonText }}` carries what
  they wrote on the unsubscribe page, so the confirmation can acknowledge it.

Never send a promotion or a win-back. Mail from another marketing domain
reaches them only while they are still on that domain's list, and never after
an unsubscribe from all.

## From an Agent or Code

Ask your agent to "email a confirmation whenever someone unsubscribes from
mail.acme.com." It calls `ensure_brew_event_trigger` for that domain, then
saves the automation.

Code uses `POST /v1/automations/triggers/brew-events`,
`brew.automations.triggers.ensureBrewEvent()` in SDK 12.4.0, or `brew-cli
automations triggers ensure-brew-event` in CLI 0.16.0. Details are in the
[API Changelog](/changelog/api).

## Get Started

Open **Automations**, start a new one, and pick **When a contact
unsubscribes**. [Unsubscribe Events](/create-emails/automations#unsubscribe-events)
covers the scopes, the payload, and what the flow may send.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.