---
ref: tool:brew/create-audience-from-events
name: Create an audience from email events
company: company:brew
workflows: [workflow:resend-to-unopened]
access: [mcp, cli, api]
tags: [capability:build-audience, category:email, has:api, has:cli, has:mcp]
docs: https://docs.brew.new/api-reference/public-v1/audiences/create-an-audience-from-analytics-events
updated: 2026-09-27
---

# Create an audience from email events

Saves a frozen cohort of the contacts who opened, clicked or otherwise engaged in a time window or send, or with an exclude rule those who did not.

The audience builds asynchronously: poll it with `include=build` until it is
ready before sending to it.

## Set up

Use the first option your agent supports.

### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "brew": { "url": "https://brew.new/api/mcp" } } }
```

Call the MCP tool `create_audience_from_events`.

Server URL: https://brew.new/api/mcp

### CLI (official)

Install the command, then confirm it runs.

```sh
brew install getbrew/tap/brew-cli
brew-cli --version
```

Run `brew-cli audiences from-events`.

Set `$BREW_API_KEY` in your environment first (get a key: https://brew.new/settings/api).

### API (official)

- Base URL: https://brew.new/api
- Endpoint: `POST /v1/audiences/from-events`
- Auth: send the header `Authorization: Bearer $BREW_API_KEY`
- Get a key: https://brew.new/settings/api
- Docs: https://docs.brew.new/api-reference/api/api-introduction

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
