Back to Blog
⌨️
/4 min read/By SMTPfast Team

Everything in the dashboard is now an API, and there is a CLI

Every action in the SMTPfast dashboard now has an API endpoint, the hosted MCP server covers almost all of it, and a new command-line tool turns each endpoint into a command. Tests keep all four in step.

apiclimcpresendproduct
Share:𝕏in

Some things in SMTPfast could only be done in the dashboard. You could replay a failed webhook, see your open rate for last week or remove a teammate, but only by clicking. That is fine for a person. It does not work for a deploy script, a CI job or an AI agent.

So we went through the dashboard, action by action, and gave each one an API endpoint. Then we built the tools on top: the MCP server now covers almost all of it, and there is a new CLI.

New endpoints

The public API now has 135 operations. The new ones, most of them in the same shape as Resend's API:

  • Webhook events. List the events sent to a webhook and the attempts for each one, replay an event, and rotate the signing secret.
  • Email metrics. GET /v1/emails/metrics returns sent, delivered, opened, clicked, bounced and more for a time range, by period, domain or broadcast, in your time zone.
  • Received mail. Filter by recipient, domain or unread, and mark messages read.
  • Contacts. Add a contact to a segment or remove it, and list a contact's segments.
  • Suppressions. Add or remove up to 100 addresses in one call.
  • Broadcasts. List the recipients of a broadcast with their status, opens, clicks and bounce type, and see which links people clicked.
  • Team. List members, invite people, change roles and remove members. This needs the new team:read and team:manage scopes, which are off by default.
  • Templates and inboxes, which we wrote about in their own posts.

For example, last week's delivery and open numbers by day:

curl "https://smtpfa.st/api/v1/emails/metrics?dimensions=period&granularity=daily&metrics=sent,delivered,open_rate" \
  -H "Authorization: Bearer $SMTPFAST_API_KEY"

How we keep it complete

An API that covers everything today can fall behind next month, when someone adds a button and forgets the endpoint. We wrote tests that fail the build when that happens:

  • Every route in the code must be in the OpenAPI spec.
  • Every operation in the spec must have an MCP tool, or a written reason why agents should not have it.
  • Every dashboard route must have a public API operation, or a written reason.
  • Every path in the spec must appear in the docs.

So the dashboard, the API, the MCP server and the docs move together. A new feature cannot ship in one and be missing from the others.

MCP: the whole API for agents

The hosted MCP server at /api/mcp now has a tool for almost every API operation. The few without one are left out on purpose: agents cannot create or change API keys, and they cannot invite, remove or change the role of team members. Those stay with people. A received email should never be able to talk an agent into adding someone to your team.

Connect Claude, Cursor or any MCP client with OAuth. The agent gets only the scopes you approve. The MCP docs list every tool.

The CLI

smtpfast is a command-line tool for the whole API. Install it with npm, or download a single binary that does not need Node:

npm install -g smtpfast
smtpfast login
smtpfast send --from [email protected] --to [email protected] --subject "Hello" --text "It works"

Each API operation is a command. Path parameters are arguments and body fields are flags:

smtpfast domains verify acme.com --wait      # check DNS every 10 seconds until verified
smtpfast logs tail --type bounced,complained   # follow events as they happen
smtpfast contacts list --json | jq -r '.data[].email'

On a terminal, lists print as tables. In a pipe, or with --json, you get the raw API response, so the CLI fits into scripts and CI. In CI you set SMTPFAST_API_KEY and skip the login.

The commands are generated from the OpenAPI spec. When we add an endpoint, the CLI repository builds and publishes a new version by itself. Between releases, the CLI picks up new endpoints from the live spec, so a new API feature works from the terminal on the day it ships. The source is on GitHub, MIT licensed.

Get started

Install the CLI and run smtpfast whoami to see your team, plan and the scopes of your key. The API docs cover every endpoint.

If something in the dashboard still has no endpoint, that is a bug. Reply to any of our emails and tell us.

Ready to get started?

Start sending transactional email today. Free to start, no credit card required.

Get Started for Free