nextmail traffic
Every command in this namespace, with its arguments, flags and examples.
Commands
What happened to every message at the edge of the workspace: where the mail that arrived for your addresses went, and what the receiving server said about the mail you sent.
Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags
nextmail traffic list
List one page of the traffic log
lsUsage
nextmail traffic list [flags]
Resolves one page of the traffic log, newest first: one entry for each message and recipient at each step it took in or out of the workspace.
Inbound, each recipient of a message that arrived gets an entry saying where it went: filed in the inbox, spam, routed to a webhook, forwarded without a copy kept, refused with a bounce back to the sender, or dropped without one, and reason says why mail was refused or dropped. Outbound, each recipient of a message you sent or forwarded gets an entry for each answer from the receiving server: delivered, deferred while it keeps trying, bounced, complained, suppressed when it was never tried, rejected when it was refused before it left, and failed for a forward that could not be relayed.
An entry never changes once it is written, and the same step keeps the same id. Entries are kept for 30 days. detail holds the reply of the receiving server and remoteMta, reportingMta and sendingIp the servers on each side, and inbound entries carry the SPF, DKIM, DMARC, spam and virus verdicts the message arrived with.
Add --all to walk every page: a table on a terminal, one JSON object per line when piped or with --ndjson, and one { items, hasMore, nextCursor } document with --json. --max <n> stops after that many items.
Flags
--domain-id <value>Keeps one domain, by the id
domains.listreturns. A domain the key does not reach is a 404.--direction <value>inboundfor mail that arrived,outboundfor mail the workspace sent or forwarded. Left out, both, as far as the key's scopes reach.--outcomes <a,b>RepeatableKeeps these outcomes, such as
['bounced', 'deferred'].--address <value>Keeps one of your addresses: the one the mail arrived for, or the one it was sent from.
--recipient <value>Keeps one recipient, matched whole: the person you wrote to on an outbound entry, the address in the envelope on an inbound one.
--since <when>Keeps entries at or after this instant: a
Dateor an ISO 8601 string.--until <when>Keeps entries before this instant. It must be later than
since.--limit <n>Page size, from 1 to 100. The server defaults to 25.
Default25--cursor <value>The
nextCursorof the previous page. Leave it out for the first page.--allFetch every page and stream the items as they arrive.
--max <n>Stop after this many items. Implies
--all.--ndjsonPrint every item as one JSON object per line. Implies
--all
Examples
nextmail traffic listnextmail traffic list --direction outbound --outcomes bounced,deferrednextmail traffic list --all --max 100nextmail traffic list --all > traffic.ndjsonAlso available in
- API
GET /traffic- TypeScript
traffic.list()- Python
traffic.list()- Ruby
traffic.list- PHP
traffic->list- Go
Traffic.List- Java
traffic().list- C#
Traffic.ListAsync
Google Workspace