---
title: "Announce product news"
description: "Tell people about a release from the admin console: a dismissible notice in <BackendNotices> with an expiry, and an optional broadcast to the people who opted into a topic, created once, sent by id, and never outside production."
canonical_url: "https://nuxt-backend.dev/docs/build/growth/engage/announcements"
---
# Announce product news

> Tell people about a release from the admin console: a dismissible notice in <BackendNotices> with an expiry, and an optional broadcast to the people who opted into a topic, created once, sent by id, and never outside production.

Version: nuxt-backend 0.6.x · Tab: Build · Kind: how-to · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

- [API reference](https://nuxt-backend.dev/docs/reference/api/email)
- [Source](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/announcements.ts)

Ship a feature, then say so where people will see it. An administrator composes an announcement in the admin console. Every signed-in person sees its notice in the app until it expires or they dismiss it. If you choose, it also emails the people who opted into product news.

**What Resend does natively** (checked on 2026-10-25, [Broadcasts](https://resend.com/docs/dashboard/broadcasts/introduction)): broadcasts to a segment, limited to a topic's subscribers, sent at once or scheduled, with Resend's unsubscribe page behind `{{{RESEND_UNSUBSCRIBE_URL}}}`.

**What the package adds:** the Announcements tab, the in-app notice, a broadcast that is created once and sent by id, the production-only rule, and the marketing helpers on your email instance for campaigns of your own.

## Compose an announcement

The admin console gains an **Announcements** tab. An announcement has:

- **A message** for the notice, and an optional link, such as the release notes or a pricing link that carries a [promotion](https://nuxt-backend.dev/docs/build/growth/offers/campaign-links).
- **An expiry**, after which the notice goes away by itself.
- **An optional broadcast**: a subject and a body for email, sent under a topic you choose.

Publishing it shows the notice at once, live, without a reload. Publishing, ending a notice early, and sending or cancelling its broadcast are an administrator's writes: each asks for a [recent sign-in](https://nuxt-backend.dev/docs/build/auth/access/step-up), and the [activity trail](https://nuxt-backend.dev/docs/build/auth/admin/audit-log) records it (`announcement.published`, `announcement.ended`, `announcement.sent`, `announcement.cancelled`), never the words.

The tab and the notice read the functions `setupEmail` returns on `email.api`. The scaffolded `backend/email.ts` re-exports them:

```ts [backend/email.ts]
export const { getAnnouncements, dismissAnnouncement, getAnnouncementsConsole, publishAnnouncement, endAnnouncement, previewAnnouncement, sendAnnouncement, cancelAnnouncement } = email.api
```

The tab is for the administrators `setupEmail({ adminRoles, adminUserIds })` names, `['admin']` by default: pass the same as `setupAdmin`. A screen of your own builds on `useAnnouncementsAdmin()`, which returns the tab's data and its `publish`, `end`, `preview`, `send` and `cancel`.

## The notice

The notice shows in `<BackendNotices>`, the one region for every app-wide notice, which the app shell and every packaged page render. It takes its place among the others: an administrator acting as someone first, then the [maintenance notice](https://nuxt-backend.dev/docs/ship/operate/flags), then announcements. Each person can dismiss it, and it stays dismissed for them. Its words are yours; its controls are labels, translated with the rest of the UI.

A page of your own shows the same region by rendering `<BackendNotices />`. Override the announcement's look through its `announcement` slot, which receives `announcements`, `dismiss(id)` and `isPending` ([Show app-wide notices](https://nuxt-backend.dev/docs/build/ui/notices)). `useAnnouncements()` returns the same, live, for markup of your own.

## The broadcast

The email goes out as a Resend broadcast, and follows the [rules every marketing email follows](https://nuxt-backend.dev/docs/build/growth/engage#the-rules-every-marketing-email-follows):

- **To a topic.** The broadcast goes to the segment that holds your app's accounts, under a topic, so only the people who opted in receive it. An address with no account, such as one you sent a topic email to, is never in that segment. Topics are declared on `setupEmail` ([Let people choose their emails](https://nuxt-backend.dev/docs/build/email/preferences)), and `npx nuxt-backend email sync` makes the segment and the topics at Resend before the first send.
- **Created once, sent by id.** The broadcast is created without being sent, and its id is kept with the announcement. It is then sent, or cancelled, by that id, so a retried request never sends it twice. A cancel deletes it at Resend first: when Resend refuses, because it started sending, the broadcast stays as it was and the tab shows the refusal.
- **Only on production.** Outside `production`, the broadcast is refused. Test mode keeps mail away from real people, and a broadcast would reach every real contact in the segment. **Send me a preview** in the tab emails the broadcast to your own address through the transactional path, test mode included.
- **With the way out.** Its template carries Resend's unsubscribe link and your [postal address](https://nuxt-backend.dev/docs/build/email/templates/theme#the-postal-address). It is sent from the topic's own sender, a subdomain of its own, so a campaign does not spend the reputation sign-in codes depend on.

The broadcast's delivery events reach your `events` handlers with its id ([Track delivery](https://nuxt-backend.dev/docs/build/email/delivery#reacting-to-events)).

## Launch from a waitlist

An app that opens sign-ups from a waitlist pairs the switch with an announcement. The notice reaches the people already in. A broadcast to **the waitlist's launch-news list** reaches the waitlist's segment under its launch topic ([Run a waitlist](https://nuxt-backend.dev/docs/build/growth/launch/waitlist)): give it a **Send at** time to schedule it for the launch, or leave it empty to send it now. It goes out once; until it does, **Cancel email** stops it. From your own server code, `waitlist.launchAudience(ctx)` gives the same segment and topic for a broadcast of your own.

## Marketing email

Send one email to many people: a newsletter, a launch, a product update. Marketing email goes through Resend's own contacts, segments and broadcasts, which honor unsubscribes natively, so the package keeps no contact list of its own. Three groups of methods on your email instance call Resend's API with `EMAIL_API_KEY`:

- **email.segments**: `create`, `list`, `remove`, plus `addContact` and `removeContact` for a contact that already exists. A segment is the group a broadcast goes to.
- **email.contacts**: `add`, `list`, `update`, `remove`. A contact is one record however many segments it sits in: `contacts.add({ email, segments: [{ id }] })` places it at creation, `segments.addContact({ email, segmentId })` later.
- **email.broadcasts**: `create`, then `send(id, payload?)`, at once or at a `scheduledAt` time.

A refusal from Resend throws `unavailable` with the reason `provider_refused`, and Resend's own words stay in the log.

### Add the actions

The scaffold ships none of these, since every app sends different campaigns. Add the ones you need to `backend/email.ts` as internal actions. A public function would let anyone who signs in send mail from your verified domain:

```ts [backend/email.ts]
export const createSegment = internalAction({
  args: { name: v.string() },
  handler: async (ctx, { name }) => email.segments.create({ name }),
})

export const addContact = internalAction({
  args: { segmentId: v.string(), email: v.string(), firstName: v.optional(v.string()) },
  handler: async (ctx, { segmentId, ...contact }) =>
    email.contacts.add({ ...contact, segments: [{ id: segmentId }] }),
})
```

A broadcast goes to a segment, and to the people in it who opted into a topic when you pass its `topicId`:

```ts [backend/email.ts]
export const createBroadcast = internalAction({
  args: { segmentId: v.string(), topicId: v.string(), from: v.string(), subject: v.string(), html: v.string() },
  handler: async (ctx, args) => email.broadcasts.create(args),
})

export const sendBroadcast = internalAction({
  args: { broadcastId: v.string() },
  handler: async (ctx, { broadcastId }) => email.broadcasts.send(broadcastId),
})
```

Run them from the command line or from your own server code:

```bash
npx convex run email:createSegment '{"name":"Launch list"}'
```

To run one from an admin screen, declare it with the `admin.action` builder from `backend/functions.ts` instead of `internalAction` ([Protect backend functions](https://nuxt-backend.dev/docs/build/auth/access/functions)). An administrator's write takes a [recent sign-in](https://nuxt-backend.dev/docs/build/auth/access/step-up).

### Before you send a broadcast

A broadcast is not a transactional send, and what keeps test mail away from real people does not reach it:

- **Test mode does not apply.** These calls go straight to Resend, not through the component, so `BACKEND_ENVIRONMENT` does not hold them back and the dev inbox lists nothing. A broadcast reaches every real contact in its segment from any deployment, a dev one included. Keep development's contacts in a Resend account of their own.
- **No delivery record.** The component keeps no record of a broadcast's emails, so `useEmailStatus` does not follow them. Their events still reach your `events` handlers, with a `broadcast_id` ([Track delivery](https://nuxt-backend.dev/docs/build/email/delivery#reacting-to-events)).
- **A full-access key.** Resend refuses a key restricted to sending for contacts, segments and broadcasts.
- **A verified domain.** Resend refuses a broadcast from its onboarding sender.
- **The way out, in the HTML.** Put Resend's unsubscribe placeholder, `{{{RESEND_UNSUBSCRIBE_URL}}}`, and your postal address in every broadcast. Resend does not add them to HTML you send it.
- **Consent.** Pass a `topicId`, so only people who opted in receive it. A broadcast to a stale list raises the bounce and complaint rates that also decide whether sign-in codes get through ([Keep marketing from stopping sign-in](https://nuxt-backend.dev/docs/build/email/delivery/deliverability#keep-marketing-from-stopping-sign-in)).

Resend's plan also caps how many marketing contacts an account holds; past it, Resend refuses broadcasts.

[Announce product news](https://nuxt-backend.dev/docs/build/growth/engage/announcements) does all of this for you: an admin composes the broadcast, and the package sends it to a topic, with the way out, and never outside production.

### When a person leaves

Deleting an account removes its address's contact at Resend, with the segments and topics it was in, as part of the [account's erasure](https://nuxt-backend.dev/docs/build/auth/accounts/data). `email.contacts.remove` does the same for someone without an account.

## What happens when…

<table>
<thead>
  <tr>
    <th>
      Situation
    </th>
    
    <th>
      Result
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      A non-administrator publishes or sends
    </td>
    
    <td>
      Refused as <code>
        forbidden
      </code>
      
      , reason <code>
        admin_only
      </code>
      
       (<a href="https://nuxt-backend.dev/docs/reference/backend/errors#forbidden">
        Errors
      </a>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      The sign-in is older than the step-up window
    </td>
    
    <td>
      Refused as <code>
        reauthentication_required
      </code>
      
       (<a href="https://nuxt-backend.dev/docs/build/auth/access/step-up">
        Require a recent sign-in
      </a>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      A broadcast is sent outside <code>
        production
      </code>
    </td>
    
    <td>
      Refused as <code>
        unavailable
      </code>
      
      , reason <code>
        test_mode
      </code>
      
      : test mode keeps mail from real people
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email sync
      </code>
      
       has not made the audience at Resend yet
    </td>
    
    <td>
      Refused as <a href="https://nuxt-backend.dev/docs/reference/backend/errors#not_ready">
        <code>
          not_ready
        </code>
      </a>
      
      , reason <code>
        not_synced
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        brand.address
      </code>
      
       is not set
    </td>
    
    <td>
      Refused as <code>
        not_ready
      </code>
      
      , reason <code>
        no_postal_address
      </code>
      
      : every marketing email carries it
    </td>
  </tr>
  
  <tr>
    <td>
      A notice that is not a path of the app or an <code>
        https:
      </code>
      
       URL, or expires more than 90 days ahead
    </td>
    
    <td>
      Refused as <code>
        invalid_input
      </code>
      
       on <code>
        link
      </code>
      
       or <code>
        expiresAt
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Resend refuses the broadcast
    </td>
    
    <td>
      Refused as <code>
        unavailable
      </code>
      
      , reason <code>
        provider_refused
      </code>
      
      , with Resend's words in the log
    </td>
  </tr>
  
  <tr>
    <td>
      The send is retried
    </td>
    
    <td>
      The same broadcast id is sent once; a broadcast already sent answers when it went out
    </td>
  </tr>
</tbody>
</table>

## Limits

- **One topic per broadcast.** Send a second broadcast for a second topic.
- **Resend's marketing contact limit.** Past your plan's cap, Resend refuses broadcasts.
- **No caps or sunset rule.** Resend sends a broadcast to every opted-in contact of its segment at once, so `caps` and the sunset rule, which the package checks per send ([Caps, quiet hours and the sunset rule](https://nuxt-backend.dev/docs/build/growth/engage/lifecycle-emails#caps-quiet-hours-and-the-sunset-rule)), do not reach it. Keep announcements rare, and to a topic people chose.
- **Three notices at once.** A person sees the three newest live announcements they have not dismissed.

## Test it

Compose an announcement on a development deployment and check the notice in a second browser signed in as another account. The broadcast is refused there by design. To check its HTML, send yourself a preview from the composer, which goes through the transactional path in test mode.

## Related

- [Let people choose their emails](https://nuxt-backend.dev/docs/build/email/preferences): the topics a broadcast is sent under.
- [Show app-wide notices](https://nuxt-backend.dev/docs/build/ui/notices): the region the notice shows in.
- [Roll out features and pause services](https://nuxt-backend.dev/docs/ship/operate/flags): the maintenance notice that shares the region.
- [Share campaign links](https://nuxt-backend.dev/docs/build/growth/offers/campaign-links): a pricing link with a discount, for the announcement's link.
- [Resend](https://nuxt-backend.dev/docs/services/resend): the full-access key and the verified domain broadcasts need.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
