API

A simple REST-style JSON API. Base path: /api

All responses are JSON. A mailbox is authorized by its token (48 hex), returned when the mailbox is created.

GET /api/domains

List active domains.

GET /api/suggest

A suggested address name + password.

POST /api/accounts

Create a mailbox. Optional: local_part, domain_id, password. Returns {address, token, password}.

POST /api/token

Sign in with address + password → {token}.

GET /api/messages?token=…

Messages in the mailbox (preview, sender, subject, counters).

GET /api/messages/{id}?token=…

A full message (text/HTML, attachments, auto-detected code & activation link).

GET /api/attachments/{id}?token=…

Download an attachment.

POST /api/mark_all_read

Mark every message in the mailbox as read. Body: token; optional max_id limits it to messages up to that id. Returns {ok, marked}.

POST /api/wipe

Delete the mailbox itself, with all its messages and attachments. Body: token. Cannot be undone — the address and token stop working.

Example: POST /api/accounts

Using an AI assistant? The same operations are available over the Model Context Protocol — see MCP.