> ## 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.

# Monitor Campaign Sends

> List sends, poll a single send's lifecycle and stats, read its per-recipient events, and fire a test send with the Brew Public API v1.

A **send** is the unit of delivery and analytics in Brew. Every email you
send with `POST /v1/sends` mints one `sendId`, the thing you poll for
lifecycle status and aggregate `stats`. Reads are flat: one endpoint,
identity in the query.

* `GET /v1/analytics/sends`: list every send for the brand, with `stats`.
* `GET /v1/analytics/sends?sendId=…`: one send's lifecycle status + stats.
* `GET /v1/analytics/sends?sendId=…&include=events`: the same row with its
  per-recipient event feed inlined.
* `GET /v1/analytics/sends?emailId=…`: every send for one design.

These reads use the `emails` scope. The send action, `POST /v1/sends`,
is polymorphic by `test` and uses the `sends` scope (or `emails`).

## List Recent Sends

<CodeGroup>
  ```bash curl theme={null}
  curl -G "https://brew.new/api/v1/analytics/sends" \
    -H "Authorization: Bearer $BREW_API_KEY" \
    --data-urlencode "status=sent" \
    --data-urlencode "limit=50"
  ```

  ```ts SDK theme={null}
  import { createBrewClient } from '@brew.new/sdk'

  const brew = createBrewClient({ apiKey: process.env.BREW_API_KEY! })

  const { data, pagination } = await brew.analytics.sends.list({ status: 'sent', limit: 50 })
  for (const send of data) {
    console.log(send.sendId, send.status, send.stats?.delivered, '/', send.stats?.sent)
  }
  ```
</CodeGroup>

The response is the uniform list envelope: `{ data, pagination }`. See
[Pagination](/api-reference/api/pagination) for the cursor loop, or use the
SDK auto-pager:

```ts theme={null}
for await (const send of brew.analytics.sends.listAll({ status: 'sent' })) {
  console.log(send.sendId, send.stats?.opened)
}
```

## Poll a Single Send

Look one send up by passing `?sendId=` to watch it move from `queued` →
`sending` → `sent` and to read its rolled-up `stats`. An unknown or
cross-brand id returns `404 SEND_NOT_FOUND`.

<CodeGroup>
  ```bash curl theme={null}
  curl -G "https://brew.new/api/v1/analytics/sends" \
    -H "Authorization: Bearer $BREW_API_KEY" \
    --data-urlencode "sendId=snd_8fK2mQ4p"
  ```

  ```ts SDK theme={null}
  const { data } = await brew.analytics.sends.list({ sendId: 'snd_8fK2mQ4p' })
  const send = data[0]!
  console.log(send.status, send.completedAt, send.stats)
  ```
</CodeGroup>

## Read the Per-Recipient Feed

Once a send is in flight, drill into its individual delivery events:
`sent` / `delivered` / `opened` / `clicked` / `bounced` / `complained`
/ `unsubscribed`. Add `?include=events` to the single-send read to inline
the feed on the same row.

<CodeGroup>
  ```bash curl theme={null}
  curl -G "https://brew.new/api/v1/analytics/sends" \
    -H "Authorization: Bearer $BREW_API_KEY" \
    --data-urlencode "sendId=snd_8fK2mQ4p" \
    --data-urlencode "include=events"
  ```

  ```ts SDK theme={null}
  const { data } = await brew.analytics.sends.list({
    sendId: 'snd_8fK2mQ4p',
    include: 'events',
  })
  for (const event of data[0]?.events ?? []) {
    console.log(event.recipientEmail, event.url, event.occurredAt)
  }
  ```
</CodeGroup>

## Send a Test Email

The same `POST /v1/sends` endpoint sends a test when you pass `test: true`.
A test send forces the Brew default sender, requires no verified domain or
audience, does **not** write a send row, and resolves synchronously to
`200 { status: 'sent', recipient }`.

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "https://brew.new/api/v1/sends" \
    -H "Authorization: Bearer $BREW_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "test": true,
      "emailId": "eml_promo",
      "subject": "Preview: Black Friday",
      "to": "qa@example.com"
    }'
  ```

  ```ts SDK theme={null}
  const { status, recipient } = await brew.emails.send({
    test: true,
    emailId: 'eml_promo',
    subject: 'Preview: Black Friday',
    to: 'qa@example.com',
  })
  // { status: 'sent', recipient: 'qa@example.com' }
  ```
</CodeGroup>

The live (campaign) send is the same endpoint **without** `test`. It
returns `202 { status: 'queued' | 'scheduled', sendId, runId }`. See
[Async jobs & polling](/api-reference/api/async-jobs).

## See Also

* `GET /v1/analytics/sends` in the [Public API v1 reference](/api-reference/api/api-introduction) (sidebar): full parameter + schema reference.
* [Errors](/api-reference/api/errors): `SEND_NOT_FOUND`, `DOMAIN_NOT_READY`, `AUDIENCE_NOT_FOUND`.
* [Sends (SDK)](/sdks/typescript/resources): `emails.send` (pass `test: true` for a QA send), `analytics.sends.{list,listAll}` (`?sendId`, `?include=events`).

## Need help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

<Tabs>
  <Tab title="Self-Service Tools">
    <CardGroup cols="2">
      <Card title="Search Documentation" icon="magnifying-glass" color="#c44925">
        Type in the "Ask any question" search bar at the top left to instantly find relevant documentation pages.
      </Card>

      <Card title="ChatGPT/Claude Integration" icon="robot" color="#c44925">
        Click "Open in ChatGPT" at the top right of any page to analyze documentation with ChatGPT or Claude for deeper insights.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Talk to Our Team">
    <CardGroup cols="2">
      <Card title="Schedule a Call" icon="calendar" color="#c44925" href="https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ1iYoRUG1J792XQpbuQLjSRRDupr7MwraFK-HQRCtTYdBmrQi8nZu2qXfzKQigb8gbKJK3KN3-R">
        Book time with our founders for personalized guidance on strategy, best practices, or complex implementation questions.
      </Card>

      <Card title="Call Us Directly" icon="phone" color="#c44925">
        Need immediate assistance? Reach us at **+1-(332)-203-2145** for urgent issues or time-sensitive questions.
      </Card>

      <Card title="Slack Channel" icon="slack" color="#c44925">
        Our preferred support channel. You'll receive an invite after signup for direct founder support and fast responses.
      </Card>

      <Card title="Email Support" icon="envelope" color="#c44925" href="mailto:support@brew.new">
        Contact us at **[support@brew.new](mailto:support@brew.new)** for detailed inquiries or if you prefer not to use Slack.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
