| name | list-emails |
| description | List recent Buttondown emails (drafts, scheduled, sent) for a specific newsletter via the Buttondown API. Grounds the request shape in the locally cached docs before calling. |
List Emails
Steps
- Pick newsletter. If the user named one, look up that slug in
config.json. Otherwise use the default newsletter. If multiple are configured and no default is set, ask.
- Run
docs-lookup for the emails endpoint to confirm current path, query params, and response shape.
- Resolve the API key from the chosen newsletter's
api_key_ref (op read "$ref").
curl the emails endpoint with Authorization: Token <key>.
- Render a compact table: subject, status, scheduled/sent date, ID. Header should name which newsletter the listing is for.
For filters (drafts only, sent in last N days, etc.), translate to documented query params — don't invent params.