# Tokenmail docs (full text) > Tokenmail gives each AI agent its own email address, on tokenmail.dev or your own domain: it signs up for a service and reads the one-time code or verification link itself (`tokenmail wait ADDRESS --code`). Messages, threads, labels, search, SPF/DKIM/DMARC checks, webhooks, an events feed and MCP tools; $2 per inbox a month. Sending isn't on yet. This file is generated from https://docs.tokenmail.dev/ (the index is https://docs.tokenmail.dev/llms.txt). ## Tokenmail docs Tokenmail gives each AI agent its own email address, on `tokenmail.dev` or your own domain. An agent signs up for a service, then reads the one-time code or verification link itself: `tokenmail wait ADDRESS --code` prints just the code. **$2 per inbox a month**, on its own subscription. ```sh $ curl -fsSL https://tokenmail.dev/install | sh $ tokenmail login $ tokenmail create --username signup # signup-k3f9qz@tokenmail.dev $ tokenmail wait signup-k3f9qz@tokenmail.dev --code ``` ### What's here - [Get started](https://docs.tokenmail.dev/get-started/): install the CLI, sign in, make an inbox, read a code, call the API. - [Inboxes](https://docs.tokenmail.dev/inboxes/): addresses, messages, threads, labels, waiting for a code, sender checks, settings and lists. - [Events](https://docs.tokenmail.dev/events/): webhooks, the events feed and the WebSocket. - [Your own domain](https://docs.tokenmail.dev/domains/), [sending](https://docs.tokenmail.dev/sending/) (not on yet) and [billing](https://docs.tokenmail.dev/billing/). - [Moving an agent off your Gmail](https://docs.tokenmail.dev/off-gmail/), and the [CLI reference](https://docs.tokenmail.dev/cli/). ### One product of froog's Tokenmail is made by [froog](https://froog.tech/), which also makes [Soulsand](https://soulsand.ai/) sandboxes, [Seaeye](https://seaeye.sh/) CI runners and [Revere](https://revere.sh/) uptime monitors. Each has its own account, API, keys and CLI: a Tokenmail account or key does nothing on the others. How accounts, [API keys](https://docs.froog.tech/api-keys/), [organizations](https://docs.froog.tech/organizations/), [webhooks](https://docs.froog.tech/webhooks/) and the [MCP server](https://docs.froog.tech/mcp/) work is the same on every product, and is in [froog's docs](https://docs.froog.tech/). ## Tokenmail: Get started One Tokenmail account works for the dashboard at [dash.tokenmail.dev](https://dash.tokenmail.dev/), the `tokenmail` CLI and the API at `https://api.tokenmail.dev`. Signing in the first time makes it. ### Install the CLI ```sh $ curl -fsSL https://tokenmail.dev/install | sh ``` On macOS and Linux (and WSL). The installer checks the CLI's SHA-256 and puts it in `~/.local/bin` (`TOKENMAIL_BIN_DIR` to change it). On Windows 10 or later, in PowerShell: `irm https://tokenmail.dev/install.ps1 | iex`. ### Sign in ```sh $ tokenmail login # approve a code in the dashboard ``` Sign in with Google or a 6-digit code by email ([sign-in methods](https://docs.froog.tech/sign-in/)). On a machine without a browser, use an API key instead: `tokenmail login --key KEY`, pipe it in, or set `TOKENMAIL_API_KEY`. ### Make an inbox and read a code ```sh $ tokenmail create --username signup --name "acme trial" # signup-k3f9qz@tokenmail.dev; first time opens Checkout $ tokenmail wait signup-k3f9qz@tokenmail.dev --code # prints just the code $ tokenmail wait signup-k3f9qz@tokenmail.dev --link --from acme # or the verification link ``` The first inbox opens Stripe Checkout ($2 a month; see [billing](https://docs.tokenmail.dev/billing/)). `wait` counts mail from the last minute, so start it right after submitting the form. ### The API Make a key on the dashboard's API keys page or with `tokenmail api-key create` ([scopes](https://docs.froog.tech/api-keys/): `inbox.read`, `inbox.send`, `inbox.write`), then: ```sh $ curl -H "Authorization: Bearer $TOKENMAIL_API_KEY" https://api.tokenmail.dev/v1/inboxes $ curl -H "Authorization: Bearer $TOKENMAIL_API_KEY" "https://api.tokenmail.dev/v1/inboxes/ADDRESS/wait?timeout=60" ``` Everything is under `/v1/inboxes` (messages, threads, drafts, `wait`, events, lists, domains, forwarding, suppressions, billing); see the [OpenAPI document](https://froog.tech/openapi.json) and [SDKs](https://docs.froog.tech/sdks/). ### For agents: MCP ```sh $ claude mcp add tokenmail -- tokenmail mcp ``` Or the hosted server at `https://api.tokenmail.dev/mcp`, signed in by browser or with a key. See froog's [MCP server](https://docs.froog.tech/mcp/) docs. ## Tokenmail: Inboxes An inbox is an email address on `tokenmail.dev` or [your own domain](https://docs.tokenmail.dev/domains/). On tokenmail.dev, Tokenmail adds a random suffix to the name you choose: `signup` becomes `signup-k3f9qz@tokenmail.dev`. `name+anything@` delivers to `name@`. Name an inbox in commands by address, local part or id. ```sh $ tokenmail messages ADDRESS # newest first; --label, --sent, --all $ tokenmail read ADDRESS msg_… # --html, --raw $ tokenmail threads ADDRESS · thread ADDRESS thr_… $ tokenmail search "invoice" [--inbox ADDRESS] $ tokenmail label ADDRESS msg_… --add done --remove unread $ tokenmail attachment ADDRESS msg_… att_0 $ tokenmail list · billing · rm ADDRESS ``` ### Codes, links and waiting Each message carries the `codes` and verification `links` found in it, most likely first; footer links are skipped. `tokenmail wait ADDRESS --code` (or `--link`) waits for the next message and prints just that. `wait` counts mail from the last minute, so start it right after submitting the form. Options: `--from`, `--subject`, `--timeout` seconds (default 300), `--json`. Over the API: `GET /v1/inboxes/ADDRESS/wait?timeout=60`. ### Messages, threads and labels Messages have headers, text, HTML, `attachments`, and `extracted_text`/`extracted_html` (the reply without quotes or signature). Replies join their thread. System labels: `received`, `sent`, `unread`, `unauthenticated`, `blocked`, `bounced`. Add your own, plus `spam` and `trash`, on messages, threads or up to 100 at once. Lists and waits hide `spam`, `blocked`, `unauthenticated` and `trash` unless asked (`include_spam=true` etc.). Search covers subjects, addresses and bodies. ### Sender checks Received mail is checked with SPF, DKIM and DMARC (`auth` on the message). DMARC `reject`/`quarantine` failures are refused. Mail passing neither SPF nor DKIM gets `unauthenticated`, so a forged code never reaches `wait`. See it with `--unverified` or `include_unauthenticated=true`. ### Inbox settings Display name, `client_id` (idempotent create), `metadata`, `signature`, `expiry_hours` (under the 30-day default) and `status` (`deactivated` refuses mail; optionally at `deactivate_at`). ### Allow and block lists For receiving, sending and replying, per account or inbox: `tokenmail rules add receive block spam.example`. Once an allow list has entries, only those pass. Blocked mail is kept with the `blocked` label. ### The dashboard [dash.tokenmail.dev](https://dash.tokenmail.dev/#email) is a mail client with folders, search, Domains and Settings. HTML mail renders without scripts or remote images. ### What's kept Only mail for existing inboxes is accepted. Messages are kept 30 days. A deleted address is never reissued. Don't use inboxes to create accounts in bulk, evade bans or bypass CAPTCHAs; solve a CAPTCHA yourself, for example in a Soulsand sandbox's [desktop](https://docs.soulsand.ai/desktop/) (see the [acceptable use policy](https://froog.tech/acceptable-use/)). ## Tokenmail: Events Tokenmail's events: `message.received` (and `.spam`, `.blocked`, `.unauthenticated`), `message.sent`, `.delivered`, `.bounced`, `.complained`, `.rejected`, `label.added`, `label.removed`, `domain.verified`. Three ways to get them: - **Webhooks:** signed POSTs to your URL (no label events): `tokenmail webhooks add URL`. Signatures, retries and deliveries are in froog's [webhooks](https://docs.froog.tech/webhooks/) docs. - **The feed:** `GET /v1/inboxes/events?after=CURSOR&wait=55`, kept 30 days; `tokenmail events --follow` in a terminal. - **A WebSocket:** `/v1/inboxes/events/ws`. ## Tokenmail: Your own domain `tokenmail domain add example.com` lists the DNS records: MX, an ownership TXT at `_froog-verify.example.com`, SPF, DKIM and DMARC. Only MX and TXT are required while sending is off. If you already have an SPF record, add the `include:` it shows to it instead of a second one. It verifies within about 10 minutes (`tokenmail domain verify` checks now). Then `tokenmail create --username sales --domain example.com`; `--subdomains` allows `name@team.example.com`. `domain zone` prints a zone file, `domain link` a page for your DNS admin. ## Tokenmail: Sending (not on yet) **Sending isn't on yet:** send, reply, forward and draft-send answer `503 mail_send_off`. Until it is, read mail with `wait`, the API or a `message.received` [webhook](https://docs.tokenmail.dev/events/). What it will do: `tokenmail send ADDRESS --to … --subject … --text …`, `reply`, `reply-all`, `forward`, drafts and scheduled `send_at`, DKIM-signed, with `Idempotency-Key`. Hard bounces and complaints go on the suppression list. Limits: 50 recipients, 10 MB attachments, 100 messages per 5 minutes and 1,000 a day per account; 25 new recipients a day in the first week. Auto-forwarding (up to 5 confirmed addresses) also waits for sending. ## Tokenmail: Billing **$2 per inbox a month**, on its own Stripe subscription (not a wallet). No free tier or trial. The first create opens Stripe Checkout. Later inboxes add a seat, prorated for the month. A deleted inbox's seat stays paid until renewal and can be reused. If payment lapses, mail is refused. `tokenmail billing` shows seats; cancel or change card in Manage billing (the dashboard's Billing page, or `tokenmail billing portal`). ## Tokenmail: Moving an agent off your Gmail An agent signed in to your Google account puts the whole account at risk. Give it an inbox and forward only the mail it needs: ```sh $ tokenmail create --username invoices # Gmail: Settings, Forwarding and POP/IMAP, add the address $ tokenmail wait ADDRESS --from google.com # enter Google's code back in Gmail # Gmail: a filter with "Forward it to" the address ``` The agent never has your Google login, and the inbox's key reads only that inbox. Forwarded mail keeps its DKIM signature. ## Tokenmail: CLI reference `tokenmail` is Tokenmail's CLI. Every command takes `--json`. It keeps its sign-in in `~/.config/tokenmail/config.json` (`%APPDATA%\tokenmail` on Windows); `TOKENMAIL_API_KEY` and `TOKENMAIL_API_URL` override it. | `tokenmail create\|list\|rm\|messages\|read\|wait\|billing` | Inboxes, $2/month. `wait ADDR --code` (or `--link`). | | --- | --- | | `tokenmail threads\|thread\|search\|label\|attachment\|events` | Read a mailbox. | | `tokenmail send\|reply\|forward\|drafts` | [Send](https://docs.tokenmail.dev/sending/) (not turned on yet). | | `tokenmail domain\|rules\|forwarding\|settings\|metrics` | [Domains](https://docs.tokenmail.dev/domains/), allow/block lists, forwarding, inbox settings. | | `tokenmail login` | Approve a code in the [dashboard](https://dash.tokenmail.dev/). `--paste`, `--key KEY` or stdin for an API key. | | `tokenmail mcp` | The [MCP server](https://docs.froog.tech/mcp/) on stdio: `claude mcp add tokenmail -- tokenmail mcp`. | | `tokenmail api-key list\|create\|rotate\|revoke\|actions` | [Scoped keys](https://docs.froog.tech/api-keys/). | | `tokenmail webhooks list\|add\|update\|deliveries\|rm\|rotate\|test` | Signed [event](https://docs.tokenmail.dev/events/) notifications. | | `tokenmail org …` · `connections` · `audit` · `account` · `dashboard` | The account commands every froog CLI has: froog's [CLI reference](https://docs.froog.tech/cli/#cli-account). |