Email from the CLI
Drive Longbridge Email from your terminal with lbr email — the domain, send-key, webhook, route, message, suppression, and settings command groups, with examples for minting a key and reading it back once.
The lbr CLI manages every Email resource from your terminal,
over the same public API the Console and Terraform provider use. This page covers
the lbr email command groups; for install, sign-in, output formats, and profiles,
start with the CLI introduction.
Early access. Email is being rolled out behind an Org flag. If you don’t see it in the Console, it isn’t enabled for your organization yet.
The command groups
lbr email mirrors the product’s nouns:
| Group | Manages |
|---|---|
lbr email domain | Register domains, arm receiving, inspect DNS. |
lbr email send-key | Mint, list, and revoke send keys. |
lbr email webhook | Manage endpoints, deliveries, and secret rotation. |
lbr email route | Manage inbound routes. |
lbr email message | Browse the message log and fetch raw content. |
lbr email suppression | Manage the suppression list. |
lbr email settings | Read the Org’s sending posture (quota, paused). |
Every read command speaks -o table (the default), json, yaml, or name, so it
composes with jq and scripts.
Set up a domain
lbr email domain create mail.example.com # register; returns records to publish
lbr email domain get <domain-id> # the domain and its DNS records
lbr email domain check-dns <domain-id> # which records resolve right now
check-dns is the debugging view — for each expected record, whether it currently
resolves (found, missing, mismatch) — distinct from the verification state it helps
explain. To turn on receiving (the exclusive MX takeover):
lbr email domain arm-receive <domain-id>
Mint a key, read it back once
Minting prints the secret exactly once — capture it right there:
lbr email send-key mint "production api"
# Send key lpk_a1b2c3d4 minted. Save this secret now — it is shown only once
# (it is also the SMTP password):
#
# lpk_a1b2c3d4.9f8e7d6c5b4a39281706f5e4d3c2b1a0
For scripting, take JSON and pull the secret with jq — still your one chance to
read it:
lbr email send-key mint ci -o json | jq -r '.secret'
Restrict a key to specific domains with repeated --domain flags, and revoke one
the moment it leaks:
lbr email send-key mint "staging worker" --domain <domain-id>
lbr email send-key revoke <key-id>
Wire up receiving
lbr email webhook create https://app.example.com/hooks/email \
--event email.delivered --event email.bounced --event email.received
lbr email route create \
--domain <domain-id> --pattern support --endpoint <endpoint-id>
Then inspect and, if needed, replay deliveries:
lbr email webhook deliveries <endpoint-id>
lbr email webhook redeliver <delivery-id>
Browse the log and manage suppression
lbr email message list --direction send --state bounced
lbr email message get <message-id> # with its delivery events
lbr email message content <message-id> > message.eml
lbr email suppression list
lbr email suppression remove <suppression-id> # deliverable again
Where to next
- CLI introduction — install, sign in, output, and profiles.
- Send keys — the credential model behind
send-key. - Webhooks — what
webhook deliveriesandredeliveroperate on.