The command-line tool for SMTPfast, the Resend-compatible email API. Send email, manage domains, contacts and webhooks, and call every API endpoint from a terminal or a script.
- Install
- Quick start
- Authentication and profiles
- Examples
- How commands map to the API
- Output and errors
- How it stays up to date
- Command reference
- Exit codes
- Environment variables
- Contributing
API documentation: https://smtpfa.st/docs
With Node 18 or later:
npx smtpfast --help # run it without installing
npm install -g smtpfast # or install itOr download a standalone binary from the latest release. It does not need Node.
# Pick your platform: linux-x64, linux-arm64, darwin-x64, darwin-arm64
curl -fsSL -o smtpfast https://github.com/smtpfast/smtpfast-cli/releases/latest/download/smtpfast-linux-x64
chmod +x smtpfast
sudo mv smtpfast /usr/local/bin/On Windows, download smtpfast-windows-x64.exe. Each release has a SHA256SUMS file to check the download. If macOS blocks a binary you downloaded in a browser, run xattr -d com.apple.quarantine smtpfast.
smtpfast login
smtpfast send --from hello@yourapp.com --to you@example.com --subject "Hello" --text "It works"
smtpfast emails get <id>login asks for an API key without showing it, checks it with GET /v1/me, and saves it. send prints the new email's id. emails get shows its status.
The CLI looks for an API key in this order:
- The
--api-keyflag - The
SMTPFAST_API_KEYenvironment variable - The current profile in
~/.config/smtpfast/config.json
smtpfast login writes the key to a profile. The file is readable only by you (mode 600), and a new config directory gets mode 700. If config.json is a symbolic link, the CLI refuses to write the key. Keep keys for several accounts or environments in named profiles:
smtpfast login --profile staging --base-url https://staging.example.com/api
smtpfast profiles list
smtpfast profiles use staging
smtpfast whoami --profile default
smtpfast logout --profile stagingThe profile comes from --profile, then SMTPFAST_PROFILE, then the current profile. The base URL comes from --base-url, then SMTPFAST_BASE_URL, then the profile, then https://smtpfa.st/api.
smtpfast whoami shows the team, plan and scopes of the key in use. In CI, set SMTPFAST_API_KEY as a secret. You do not need to log in. To log in from a script, pipe the key: echo "$KEY" | smtpfast login.
smtpfast send \
--from "Acme Billing <billing@acme.com>" \
--to jane@example.com \
--subject "Your invoice" \
--html-file invoice.html \
--attach invoice.pdfThe CLI reads each file and sends it base64 encoded. Repeat --to, --cc, --bcc and --attach as needed. Use --text-file - to read the body from stdin.
smtpfast send --from hi@acme.com --to jane@example.com --subject "Tomorrow" \
--text "See you soon" --scheduled-at 2026-11-01T09:00:00Z
smtpfast emails update <id> --scheduled-at 2026-11-02T09:00:00Z # move it
smtpfast emails cancel <id> # or cancel itsmtpfast domains add --domain acme.com
smtpfast domains verify acme.com --wait --timeout 30mdomains add prints the DNS records to create. domains verify --wait checks the domain every 10 seconds and prints the DKIM, SPF, DMARC and MAIL FROM results until the domain is verified. It exits with code 1 if the timeout passes first. You can pass the domain name or its id.
smtpfast logs tail
smtpfast logs tail --type bounced,complained
smtpfast logs tail --recipient jane@example.com --json | jq .logs tail prints recent events, then new ones, oldest first. Press Ctrl-C to stop. It needs a key with the logs:read scope.
The API creates one contact per request. Pipe each object in the file to contacts create:
# contacts.json: [{"email": "jane@example.com", "first_name": "Jane"}, ...]
jq -c '.[]' contacts.json | while read -r contact; do
printf '%s' "$contact" | smtpfast contacts create --data - --quiet
donesmtpfast webhooks create --url https://acme.com/hooks/smtpfast --events email.delivered,email.bounced
smtpfast webhooks test <id>
smtpfast webhooks deliveries <id>smtpfast api GET /v1/usage
smtpfast api POST /v1/contacts --data '{"email":"jane@example.com"}'api uses the same key, base URL, retries and output as every other command. The CLI refuses any request whose final URL is not under the base URL.
Each API operation is a command: smtpfast <group> <command> [args] [flags].
- The group is the resource:
emails,domains,contacts,webhooksand so on. Received mail is underreceived. The key's own details are underaccount. - Path parameters are positional arguments.
POST /v1/webhooks/{id}/deliveries/{delivery_id}/retryissmtpfast webhooks retry-delivery <id> <delivery_id>. An argument cannot be.or... - Query parameters and body fields are flags in kebab case.
scheduled_atis--scheduled-at. The exact API name works too. - A list takes a repeated flag or a comma list:
--to a@x.com --to b@x.comor--to a@x.com,b@x.com. - A boolean is
--flagor--no-flag. - A flag that takes a value always takes the next word, even one that starts with a dash.
--subject --helpsets the subject to--help. - Global flags like
--jsonand--profilego before or after the command. After--, every word is an argument. - An object takes JSON or
key=valuepairs:--properties '{"plan":"pro"}'or--properties plan=pro. --datasends a whole body: inline JSON,@file.json, or-for stdin. Flags override fields from--data.
Every command has help with its flags, their types, the required ones and an example:
smtpfast emails --help # the commands in a group
smtpfast emails send --help # one command
smtpfast commands # every commandA few commands are written by hand for a smoother workflow: send, domains verify --wait, logs tail and api, plus login, logout, whoami and profiles. They call the same API.
On a terminal, lists print as tables and single objects as keys and values. When you pipe the output, or pass --json, the CLI prints the API response as JSON. --quiet (-q) prints only ids.
smtpfast contacts list --json | jq -r '.data[].email'
id=$(smtpfast send --from hi@acme.com --to jane@example.com --subject Hi --text Hi --quiet)Errors go to stderr with the HTTP status and the API's message. When a key lacks a scope, the CLI names the scope. On HTTP 429 the CLI waits for the Retry-After time and tries once more. Pass --idempotency-key to make a retried send safe. --debug prints each request and response status to stderr. Errors and debug output never show the API key. If a response repeats the key, the CLI prints [redacted] in its place. Set NO_COLOR to turn colors off.
New API endpoints become commands without code changes in this repo:
- Each release ships a manifest generated from the API's OpenAPI spec.
- When the API spec changes, a workflow in this repo regenerates the manifest, runs the tests and publishes a new version: minor when commands or flags change, patch when only help text does.
- Between releases, the CLI downloads the live spec in the background, at most once a day. Operations that are new in it run right away.
smtpfast --versionandsmtpfast commandstell you when your version is behind.
The background download never blocks or fails a command, and it never sends your key. Each base URL has its own cache, so a staging profile never shows production's commands. Turn it off with --no-update-check or SMTPFAST_NO_UPDATE_CHECK=1. docs/keeping-in-sync.md explains the whole flow.
source <(smtpfast completion bash) # add this line to ~/.bashrc
source <(smtpfast completion zsh) # add this line to ~/.zshrc, after compinit
smtpfast completion fish | source # or save it in ~/.config/fish/completions/smtpfast.fishThe script asks the CLI for candidates each time, so new commands complete without reinstalling it.
146 API operations in 18 groups, plus the hand-written commands below.
| Command | What it does |
|---|---|
smtpfast send |
Send an email |
smtpfast login |
Store an API key |
smtpfast logout |
Remove the stored API key |
smtpfast whoami |
Show the team, plan and scopes of the API key in use |
smtpfast profiles <list|use|remove> [name] |
List, switch and remove stored profiles |
smtpfast api <method> <path> |
Make a raw API request |
smtpfast commands |
List every command |
smtpfast completion <bash|zsh|fish> |
Print a shell completion script |
smtpfast version |
Show the version and whether the live API is ahead of it |
smtpfast domains verify <id-or-name> |
Verify a domain, and optionally wait until its DNS records pass |
smtpfast logs tail |
Print email events as they happen |
The API key's scopes, plan, rate limit and usage
| Command | API | What it does |
|---|---|---|
smtpfast account capabilities |
GET /v1/me |
What this API key can do |
smtpfast account usage |
GET /v1/usage |
Usage against the plan |
Email sending analytics and metrics
| Command | API | What it does |
|---|---|---|
smtpfast analytics get |
GET /v1/analytics |
Get analytics |
Create, list, and revoke API keys
| Command | API | What it does |
|---|---|---|
smtpfast api-keys create |
POST /v1/api-keys |
Create API key |
smtpfast api-keys list |
GET /v1/api-keys |
List API keys |
smtpfast api-keys revoke <id> |
DELETE /v1/api-keys/{id} |
Revoke API key |
smtpfast api-keys update <id> |
PATCH /v1/api-keys/{id} |
Update API key |
Create, test, schedule, cancel, and measure broadcast campaigns
| Command | API | What it does |
|---|---|---|
smtpfast broadcasts archive <id> |
POST /v1/broadcasts/{id}/archive |
Archive a broadcast |
smtpfast broadcasts audience |
GET /v1/broadcasts/audience |
Preview a broadcast audience |
smtpfast broadcasts cancel <id> |
POST /v1/broadcasts/{id}/cancel |
Cancel a scheduled broadcast |
smtpfast broadcasts clicked-links <id> |
GET /v1/broadcasts/{id}/clicked-links |
List clicked links |
smtpfast broadcasts create |
POST /v1/broadcasts |
Create a broadcast draft |
smtpfast broadcasts delete <id> |
DELETE /v1/broadcasts/{id} |
Delete a draft broadcast |
smtpfast broadcasts duplicate <id> |
POST /v1/broadcasts/{id}/duplicate |
Duplicate broadcast |
smtpfast broadcasts get <id> |
GET /v1/broadcasts/{id} |
Get broadcast details |
smtpfast broadcasts list |
GET /v1/broadcasts |
List broadcasts |
smtpfast broadcasts recipients <id> |
GET /v1/broadcasts/{id}/recipients |
List broadcast recipients |
smtpfast broadcasts send <id> |
POST /v1/broadcasts/{id}/send |
Send or schedule a broadcast |
smtpfast broadcasts send-test <id> |
POST /v1/broadcasts/{id}/test |
Send a test broadcast email |
smtpfast broadcasts unarchive <id> |
POST /v1/broadcasts/{id}/unarchive |
Unarchive a broadcast |
smtpfast broadcasts update <id> |
PATCH /v1/broadcasts/{id} |
Update a draft or scheduled broadcast |
Declare custom contact properties
| Command | API | What it does |
|---|---|---|
smtpfast contact-properties create |
POST /v1/contact-properties |
Declare a contact property |
smtpfast contact-properties delete <id> |
DELETE /v1/contact-properties/{id} |
Delete a contact property |
smtpfast contact-properties get <id> |
GET /v1/contact-properties/{id} |
Get a contact property |
smtpfast contact-properties list |
GET /v1/contact-properties |
List contact properties |
smtpfast contact-properties update <id> |
PATCH /v1/contact-properties/{id} |
Update a contact property default |
Manage subscribers, subscription status, and custom properties
| Command | API | What it does |
|---|---|---|
smtpfast contacts add-to-segment <id> <segment_id> |
POST /v1/contacts/{id}/segments/{segment_id} |
Add a contact to a segment |
smtpfast contacts create |
POST /v1/contacts |
Create a contact |
smtpfast contacts delete <id> |
DELETE /v1/contacts/{id} |
Delete a contact |
smtpfast contacts delete-many |
DELETE /v1/contacts |
Delete contacts in bulk |
smtpfast contacts export |
GET /v1/contacts/export |
Export contacts |
smtpfast contacts get <id> |
GET /v1/contacts/{id} |
Retrieve a contact |
smtpfast contacts list |
GET /v1/contacts |
List contacts |
smtpfast contacts remove-from-segment <id> <segment_id> |
DELETE /v1/contacts/{id}/segments/{segment_id} |
Remove a contact from a segment |
smtpfast contacts segments <id> |
GET /v1/contacts/{id}/segments |
List a contact's segments |
smtpfast contacts update <id> |
PATCH /v1/contacts/{id} |
Update a contact |
Manage and verify sending domains, and the custom link domains under them
| Command | API | What it does |
|---|---|---|
smtpfast domains add |
POST /v1/domains |
Add a domain |
smtpfast domains claim |
POST /v1/domains/claim |
Claim a domain held by another account |
smtpfast domains claim-record |
GET /v1/domains/claim |
Get the claim record for a domain |
smtpfast domains delete <id> |
DELETE /v1/domains/{id} |
Delete a domain |
smtpfast domains get <id> |
GET /v1/domains/{id} |
Get domain details |
smtpfast domains list |
GET /v1/domains |
List domains |
smtpfast domains start-cloudflare-connect <id> |
POST /v1/domains/{id}/domain-connect/cloudflare |
Set up sending DNS on Cloudflare in one click |
smtpfast domains start-cloudflare-inbound-connect <id> |
POST /v1/domains/{id}/domain-connect/cloudflare-inbound |
Set up receiving DNS on Cloudflare in one click |
smtpfast domains update-receiving <id> |
PATCH /v1/domains/{id} |
Turn inbound receiving on or off |
smtpfast domains verify <id-or-name> |
POST /v1/domains/{id}/verify |
Verify a domain, and optionally wait until its DNS records pass (hand-written) |
Send and track transactional emails
| Command | API | What it does |
|---|---|---|
smtpfast emails cancel <id> |
POST /v1/emails/{id}/cancel |
Cancel a scheduled email |
smtpfast emails clicked-links |
GET /v1/emails/clicked-links |
List clicked links |
smtpfast emails get <id> |
GET /v1/emails/{id} |
Get email details |
smtpfast emails list |
GET /v1/emails |
List sent emails |
smtpfast emails metrics |
GET /v1/emails/metrics |
Retrieve email metrics |
smtpfast emails send |
POST /v1/emails |
Send an email |
smtpfast emails send-batch |
POST /v1/emails/batch |
Send a batch of emails |
smtpfast emails share <id> |
POST /v1/emails/{id}/share |
Create a share link for a sent email |
smtpfast emails update <id> |
PATCH /v1/emails/{id} |
Reschedule a scheduled email |
Signup forms and pending double opt-in signups
| Command | API | What it does |
|---|---|---|
smtpfast forms approve-all-pending <id> |
POST /v1/forms/{id}/pending/approve-all |
Approve all pending signups |
smtpfast forms approve-pending <id> <pendingId> |
POST /v1/forms/{id}/pending/{pendingId}/approve |
Approve a pending signup |
smtpfast forms create |
POST /v1/forms |
Create a signup form |
smtpfast forms delete <id> |
DELETE /v1/forms/{id} |
Delete a signup form |
smtpfast forms get <id> |
GET /v1/forms/{id} |
Retrieve a signup form |
smtpfast forms list |
GET /v1/forms |
List signup forms |
smtpfast forms pending <id> |
GET /v1/forms/{id}/pending |
List pending signups |
smtpfast forms preview-welcome-email <id> |
POST /v1/forms/{id}/welcome-preview |
Preview a form's welcome email |
smtpfast forms remove-pending <id> <pendingId> |
DELETE /v1/forms/{id}/pending/{pendingId} |
Remove a pending signup |
smtpfast forms update <id> |
PATCH /v1/forms/{id} |
Update a signup form |
Addresses on your own domains organised as mailboxes: threads, labels, folders and drafts
| Command | API | What it does |
|---|---|---|
smtpfast inboxes create |
POST /v1/inboxes |
Create an inbox |
smtpfast inboxes create-draft <inbox_id> |
POST /v1/inboxes/{inbox_id}/drafts |
Create a draft |
smtpfast inboxes create-label <inbox_id> |
POST /v1/inboxes/{inbox_id}/labels |
Create a label |
smtpfast inboxes delete <inbox_id> |
DELETE /v1/inboxes/{inbox_id} |
Delete an inbox |
smtpfast inboxes delete-draft <inbox_id> <draft_id> |
DELETE /v1/inboxes/{inbox_id}/drafts/{draft_id} |
Delete a draft |
smtpfast inboxes delete-label <inbox_id> <label_id> |
DELETE /v1/inboxes/{inbox_id}/labels/{label_id} |
Delete a label |
smtpfast inboxes delete-thread <inbox_id> <thread_id> |
DELETE /v1/inboxes/{inbox_id}/threads/{thread_id} |
Delete a thread |
smtpfast inboxes drafts <inbox_id> |
GET /v1/inboxes/{inbox_id}/drafts |
List drafts |
smtpfast inboxes forward-thread-email <inbox_id> <thread_id> <email_id> |
POST /v1/inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/forward |
Forward a thread email |
smtpfast inboxes get <inbox_id> |
GET /v1/inboxes/{inbox_id} |
Retrieve an inbox |
smtpfast inboxes get-draft <inbox_id> <draft_id> |
GET /v1/inboxes/{inbox_id}/drafts/{draft_id} |
Retrieve a draft |
smtpfast inboxes get-label <inbox_id> <label_id> |
GET /v1/inboxes/{inbox_id}/labels/{label_id} |
Retrieve a label |
smtpfast inboxes get-thread <inbox_id> <thread_id> |
GET /v1/inboxes/{inbox_id}/threads/{thread_id} |
Retrieve a thread |
smtpfast inboxes get-thread-email <inbox_id> <thread_id> <email_id> |
GET /v1/inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id} |
Retrieve a thread email |
smtpfast inboxes labels <inbox_id> |
GET /v1/inboxes/{inbox_id}/labels |
List labels |
smtpfast inboxes list |
GET /v1/inboxes |
List inboxes |
smtpfast inboxes reply-to-thread-email <inbox_id> <thread_id> <email_id> |
POST /v1/inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/reply |
Reply to a thread email |
smtpfast inboxes send-draft <inbox_id> <draft_id> |
POST /v1/inboxes/{inbox_id}/drafts/{draft_id}/send |
Send a draft |
smtpfast inboxes thread-emails <inbox_id> <thread_id> |
GET /v1/inboxes/{inbox_id}/threads/{thread_id}/emails |
List thread emails |
smtpfast inboxes threads <inbox_id> |
GET /v1/inboxes/{inbox_id}/threads |
List threads |
smtpfast inboxes update <inbox_id> |
PATCH /v1/inboxes/{inbox_id} |
Update an inbox |
smtpfast inboxes update-draft <inbox_id> <draft_id> |
PATCH /v1/inboxes/{inbox_id}/drafts/{draft_id} |
Update a draft |
smtpfast inboxes update-label <inbox_id> <label_id> |
PATCH /v1/inboxes/{inbox_id}/labels/{label_id} |
Update a label |
smtpfast inboxes update-thread <inbox_id> <thread_id> |
PATCH /v1/inboxes/{inbox_id}/threads/{thread_id} |
Update a thread |
Manage and verify sending domains, and the custom link domains under them
| Command | API | What it does |
|---|---|---|
smtpfast link-domains create |
POST /v1/link-domains |
Add a link domain |
smtpfast link-domains delete <id> |
DELETE /v1/link-domains/{id} |
Delete a link domain |
smtpfast link-domains get <id> |
GET /v1/link-domains/{id} |
Get a link domain |
smtpfast link-domains get-connect <id> |
GET /v1/link-domains/{id}/domain-connect |
Check one-click DNS setup for a link domain |
smtpfast link-domains list |
GET /v1/link-domains |
List link domains |
smtpfast link-domains refresh <id> |
POST /v1/link-domains/{id}/refresh |
Refresh a link domain's status |
smtpfast link-domains start-connect <id> |
POST /v1/link-domains/{id}/domain-connect |
Set up a link domain's DNS in one click |
The event log behind the Logs page
| Command | API | What it does |
|---|---|---|
smtpfast logs list |
GET /v1/logs |
List email events |
Inbound email: received messages and attachments
| Command | API | What it does |
|---|---|---|
smtpfast received attachments <id> |
GET /v1/emails/receiving/{id}/attachments |
List attachments of a received email |
smtpfast received delete <id> |
DELETE /v1/emails/receiving/{id} |
Delete a received email |
smtpfast received get <id> |
GET /v1/emails/receiving/{id} |
Get a received email |
smtpfast received get-attachment <id> <attachment_id> |
GET /v1/emails/receiving/{id}/attachments/{attachment_id} |
Get one attachment of a received email |
smtpfast received list |
GET /v1/emails/receiving |
List received emails |
smtpfast received mark |
PATCH /v1/emails/receiving |
Mark received emails read or unread |
smtpfast received reply <id> |
POST /v1/emails/receiving/{id}/reply |
Reply to a received email |
smtpfast received update <id> |
PATCH /v1/emails/receiving/{id} |
Mark a received email read or unread |
Group contacts into segments
| Command | API | What it does |
|---|---|---|
smtpfast segments contacts <id> |
GET /v1/segments/{id}/contacts |
List contacts in a segment |
smtpfast segments create |
POST /v1/segments |
Create a segment |
smtpfast segments delete <id> |
DELETE /v1/segments/{id} |
Delete a segment |
smtpfast segments get <id> |
GET /v1/segments/{id} |
Retrieve a segment |
smtpfast segments list |
GET /v1/segments |
List segments |
smtpfast segments update <id> |
PATCH /v1/segments/{id} |
Update a segment |
Addresses that SMTPfast will not send to
| Command | API | What it does |
|---|---|---|
smtpfast suppressions add-batch |
POST /v1/suppressions/batch/add |
Suppress addresses in bulk |
smtpfast suppressions create |
POST /v1/suppressions |
Create a manual suppression |
smtpfast suppressions delete <id> |
DELETE /v1/suppressions/{id} |
Delete a suppression |
smtpfast suppressions get <id> |
GET /v1/suppressions/{id} |
Retrieve a suppression |
smtpfast suppressions list |
GET /v1/suppressions |
List suppressions |
smtpfast suppressions remove-batch |
POST /v1/suppressions/batch/remove |
Remove suppressions in bulk |
Members and invitations
| Command | API | What it does |
|---|---|---|
smtpfast team create-invite |
POST /v1/team/invites |
Invite someone to the team |
smtpfast team get-invite <id> |
GET /v1/team/invites/{id} |
Retrieve a pending invitation |
smtpfast team invites |
GET /v1/team/invites |
List pending invitations |
smtpfast team members |
GET /v1/team/members |
List team members |
smtpfast team remove-member <id> |
DELETE /v1/team/members/{id} |
Remove a member |
smtpfast team revoke-invite <id> |
DELETE /v1/team/invites/{id} |
Revoke an invitation |
smtpfast team update-member <id> |
PATCH /v1/team/members/{id} |
Change a member's role or billing access |
Reusable emails with variables, Resend-compatible: draft, publish, then send by id or alias
| Command | API | What it does |
|---|---|---|
smtpfast templates create |
POST /v1/templates |
Create a template |
smtpfast templates delete <id> |
DELETE /v1/templates/{id} |
Delete a template |
smtpfast templates duplicate <id> |
POST /v1/templates/{id}/duplicate |
Duplicate a template |
smtpfast templates get <id> |
GET /v1/templates/{id} |
Get a template |
smtpfast templates list |
GET /v1/templates |
List templates |
smtpfast templates publish <id> |
POST /v1/templates/{id}/publish |
Publish a template |
smtpfast templates update <id> |
PATCH /v1/templates/{id} |
Update a template |
Configure webhook endpoints for delivery events
| Command | API | What it does |
|---|---|---|
smtpfast webhooks create |
POST /v1/webhooks |
Create webhook |
smtpfast webhooks delete <id> |
DELETE /v1/webhooks/{id} |
Delete webhook |
smtpfast webhooks deliveries <id> |
GET /v1/webhooks/{id}/deliveries |
List webhook deliveries |
smtpfast webhooks event-attempts <id> <event_id> |
GET /v1/webhooks/{id}/events/{event_id}/attempts |
List the attempts of a webhook event |
smtpfast webhooks events <id> |
GET /v1/webhooks/{id}/events |
List webhook events |
smtpfast webhooks get <id> |
GET /v1/webhooks/{id} |
Get webhook |
smtpfast webhooks get-delivery <id> <delivery_id> |
GET /v1/webhooks/{id}/deliveries/{delivery_id} |
Get a webhook delivery |
smtpfast webhooks get-event <id> <event_id> |
GET /v1/webhooks/{id}/events/{event_id} |
Retrieve a webhook event |
smtpfast webhooks list |
GET /v1/webhooks |
List webhooks |
smtpfast webhooks replace <id> |
PUT /v1/webhooks/{id} |
Update webhook |
smtpfast webhooks replay-event <id> <event_id> |
POST /v1/webhooks/{id}/events/{event_id}/replay |
Replay a webhook event |
smtpfast webhooks retry-delivery <id> <delivery_id> |
POST /v1/webhooks/{id}/deliveries/{delivery_id}/retry |
Retry a webhook delivery |
smtpfast webhooks rotate-signing-secret <id> |
POST /v1/webhooks/{id}/signing-secret/rotate |
Rotate a webhook signing secret |
smtpfast webhooks test <id> |
POST /v1/webhooks/{id}/test |
Test webhook |
smtpfast webhooks update <id> |
PATCH /v1/webhooks/{id} |
Update webhook |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | The API returned an error, the network failed, or domains verify --wait timed out |
| 2 | Usage or setup error: unknown command or flag, missing argument, invalid JSON, no API key |
| 130 | Stopped with Ctrl-C. logs tail exits with 0 instead, since Ctrl-C is how it ends. |
| Variable | What it does |
|---|---|
SMTPFAST_API_KEY |
API key. Takes precedence over the stored profile. |
SMTPFAST_BASE_URL |
API base URL. Default https://smtpfa.st/api. |
SMTPFAST_PROFILE |
Profile to use. |
SMTPFAST_NO_UPDATE_CHECK |
Set to 1 to turn off the background spec refresh. |
SMTPFAST_SPEC_URL |
Where the background refresh gets the spec. Default <base URL>/v1/openapi.json. |
SMTPFAST_DEBUG |
Set to 1 to print each HTTP request to stderr, like --debug. |
NO_COLOR |
Turns colors off. |
XDG_CONFIG_HOME |
Moves the config directory. Default ~/.config/smtpfast. |
You need bun 1.3 or later.
bun install
bun test # the full suite; it never touches the network
bun run typecheck
bun src/cli.ts --help # run from source
npm run build # plain JavaScript in dist/ for Node
bun scripts/generate.ts # regenerate after changing spec/openapi.json or the naming rules
bun scripts/build-binaries.ts # standalone binaries in dist-bin/Do not edit src/generated/manifest.json or the command reference above by hand. Change spec/openapi.json, the naming rules in src/spec/naming.ts, or a hand-written command in src/commands/, then run the generator. Bug reports and pull requests are welcome at https://github.com/smtpfast/smtpfast-cli.
MIT. See LICENSE.