---
name: emit
description: Programmable RSS feeds via emit (rssemit.com). Use when the user wants to send an RSS feed as an email newsletter, build a filtered feed from a plain-language interest (a `watcher` in the API), get a feed for a page that has none, or push a feed's items to Slack/Discord/webhooks — all via the emit API.
---

# Set up emit on this project

Emit (rssemit.com) is a programmable RSS feeds platform: anything in (feeds, pages,
prompts), anything out (newsletter, Slack/Discord, webhooks, plain RSS). Drive it
through its REST API (`https://api.rssemit.com`, OpenAPI at `/openapi.json`) or the
emit MCP server if registered.

## Steps

1. **Find the feed.** Look in the repo for an RSS/Atom URL (e.g. `/rss.xml`,
   `/feed.xml`, `CLAUDE.md`, the site config). Confirm it with the user.

2. **Create an account** (skip if they already have a key):
   `POST /v1/accounts {"name","email"}` → store the returned `api_key` as
   `EMIT_API_KEY` (shown once). All later calls use `Authorization: Bearer $EMIT_KEY`.

3. **Verify the sending domain:** `POST /v1/domains {"domain"}` → add the returned
   DNS records (ownership TXT, SPF, DMARC, and SES DKIM CNAMEs) at the user's DNS
   provider, then `POST /v1/domains/{id}/verify`.

4. **Connect the feed:** `POST /v1/feeds {"url","from_email","schedule"}`
   (`on_publish` | `daily` | `weekly`).

5. **Subscribers:** add the embed snippet from `GET /v1/snippets` to the site, and/or
   import an existing list with `POST /v1/subscribers/import`.

6. **Top up:** `POST /v1/billing/topup {"amount_usd"}` → open the Stripe Checkout URL.

7. **Done.** New posts now email subscribers automatically. Confirm the balance and
   subscriber count with `GET /v1/account` and `GET /v1/account/analytics`.

## Smart feeds (watchers), page→feed, and broadcasts

- **Anything → feed:** `POST /v1/watchers {"prompt"}` discovers sources and returns
  durable `atom_url`/`json_url` endpoints (the API calls these feeds `watchers`).
  Filter feeds the user already has with
  `{"prompt", "sources": [urls], "discover": false}`; omit `prompt` for a pure
  merge. Pages without feeds are accepted as sources and watched by link diffing.
- **Broadcast by email:** `POST /v1/watchers/{id}/pipe {"from_email","schedule"}`.
- **Audit the filter:** `GET /v1/watchers/{id}/items?include_suppressed=true`
  shows every item with its relevance score and reason.
- **Chat sink:** `POST /v1/sinks {"kind": "slack"|"discord", "url", "feed_url"}`
  pushes any feed's new items to an incoming webhook. Preview it with
  `POST /v1/sinks/{id}/test` — no body posts the feed's newest item through the
  sink's template; pass `{"title","url","summary"}` to preview unpublished copy.
- Filtering meters credits (1 per 5 judged items; summaries 1 per item); polling
  and feeds out are free.

## Notes

- New accounts start at a zero balance — they must top up before anything sends.
- Subscribers are double-opt-in: they're `pending` until they click the confirm link.
- Never print or commit the API key; store it in the environment.
